Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7562373
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T13:23:55+00:00 2026-05-30T13:23:55+00:00

I am new to Eclipse. Currently developing a sample web application using primefaces 3.1

  • 0

I am new to Eclipse.
Currently developing a sample web application using primefaces 3.1 and glassfish 3.

I have created a oracle database connection under datasource explorer. I would like to know how to
integrate this with my web application, so that I could connect to database from my web application. I know that by creating context.xml and entering the following might be suffice for database access, but are there anyways to integrate database connection with my application? So that I do not need to hard code password in context.xml.

I have used Jdeveloper in the past and by creating a database connection corresponding datasource entries in xml are generated. So I was wondering something similar would be possible using Eclipse?

Any help is highly appreciated.

<?xml version="1.0" encoding="UTF-8"?>

<Context>
   <Resource name="jdbc/SampleDB" auth="Container"
       type="javax.sql.DataSource" 
       username="app" password="app"
       driverClassName="org.apache.derby.jdbc.ClientDriver"
       url="jdbc:derby://localhost:1527/sample" 
       maxActive="8"    /> 
</Context> 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T13:23:56+00:00Added an answer on May 30, 2026 at 1:23 pm

    I have found a solution to create datasource for glassfish.

    I created a a JDBC Resource under GlassFish and pointed connection to my connection created under Date Source Explorer. It created a sun-resources.xml. I had to manually rename this to glassfish-resource.xml. By default there are no entry for password,so I had to manually add . When I ran my web application I was getting this error

    java.sql.SQLException: Error in allocating a connection. Cause: No PasswordCredential found
    

    So to resolve this error I added a property in JDBC Connection Pool in glassfish admin server. Now I could connect to Oracle database.

    Not sure why I have to do two steps manually. Besides by default it creates sun-resources.xml. Perhaps someone could point out how to workaround these.

    Thanks

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am developing a web application using JSF and JPA(Eclipse link). I have two
I am having trouble with developing my Android application, I am currently using Eclipse
I'm new to Eclipse and am using it currently to play with Java EE.
Hi i am new to php, I currently learning php using eclipse. I know
I am currently using Eclipse Helios Service Release 1. I am new to both
I am using Ubuntu and Eclipse as an IDE for C/C++. I currently have
I am developing an Eclipse RCP application and have a strange problem: I open
I have just started using Eclipse and Mylyn together, so I'm quite new to
I am kind of new to the Eclipse IDE. I have a hierarchy of
So I set up a new project into Eclipse and created a build.xml that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.