-
1. Re: Database Connection
waynebaylor Jun 14, 2007 8:20 AM (in response to alexrozario)There are several things you need to check:
1) copy oracle-ds.xml from jboss/docs/examples/jca to jboss/server/xxx/deploy (edit the client connection and user/pass fields).
2) make sure your persistence.xml file specifies Oracle as the datasource.
3) download ojdbc14.jar and put it in jboss/server/xxx/lib (has Oracle drivers). -
2. Re: Database Connection
alexrozario Jun 15, 2007 6:29 AM (in response to alexrozario)Thank you sir.
thank you for your valuable response..
i have followed the things you have specified..
now i am in a right path i think, but still i cant finish my task.
i cant connect with database.
can you help me further.
i have created an entity bean as First.java(i have table named First in my remote database). i have created FirstEjb as remote interface and created FirstEjbBean as stateless session bean. my oracle jndi name is oracle..
but
while ruinning the server it shows the following error.
ObjectName: persistence.units:ear=New.ear,jar=NewEJB.jar,unitName=First
State: FAILED
Reason: javax.naming.NameNotFoundException: Oracle not bound
I Depend On:
jboss.jca:service=ManagedConnectionFactory,name=Oracle
Depends On Me:
jboss.j2ee:ear=New.ear,jar=NewEJB.jar,name=FirstEjb,service=EJB3
<persistence-unit name="First">
<jta-data-source>Oracle</jta-data-source>
</persistence-unit>
this is my persistence file.. i think i have to change here only..
i am in confused state..
can you please guide me to overcome this issue..
thank you sir.. -
3. Re: Database Connection
andydale Jun 15, 2007 6:35 AM (in response to alexrozario)Hi
you're right, a chage is needed in the persistence file: change the following<jta-data-source>Oracle</jta-data-source>
to<jta-data-source>java:/Oracle</jta-data-source>
Cheers,
Andy -
4. Re: Database Connection
alexrozario Jun 23, 2007 7:33 AM (in response to alexrozario)Thank you for your timely help andydale.
Sorry for my belated reply.