Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Agile forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

I need big help!!

 
Herbert Maosa
Ranch Hand
Posts: 289
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have struggled for the past four days, tying to do what I thought was a simple thing, but I am now frustrated and I just dont know why things dont work the way I thought thy should.
I am trying to access a database using an entity bean with bean managed persitence. I am just lerning. So I have created a database, called <b> SampleDataBase</b>, running on <b>mysql server</b>. I have downloaded the necessary jdbc drivers for my server, and I can access the databse from an ordinary java application without a problem. I have configured my application server, (Sun Application Server ) to point to this driver correctly in the classpath.
I have an entity bean, in it I refer to my database resource as <b>"jdbc:env/comp/jdbc/MySampleDataBase".</b>
In the Application Server, I have created the Connection Pool, and I have a resource associated with it called <b>jdbc/SampleResource</b>
I have made the necessary maping of the coded <b>jdbc/MySampleResource</b> to <b>jdbc/MySampleDataBase</b>.
When I try to run my application client, I get a RemoteException that there is an error creating the database connection.
I have tried and tried and tried and tried. I have even tried to create a database in the Pointbase server that comes with the java app server, but I get the same problem.
I dont know if my situation is clear, but I need some one patient enough to help me move forward. Otherwise my study has stalled because I cant go on untill I get this done.
Thanks.
Herbert Maosa.
 
pavi kavi
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
Before trying to use the connection of the database make sure in the application server the connection is getting created if not what is the exception its throwing?
Paste the exception here
Pavithra
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic