URGENT : Problem in DataSource usage in Client applIcation
Hi ALL
I have deployed a EJB(Session Bean) in Oracle-OC4J Container.I am using datasources, in my bean as well as in my client
application.Here Client is deployed along with bean in container.
I am using "ejb-location"JNDI Name inside Client to get connection.
(Which is mentioned in datasource element of datasources.xml)
For this i have configured datasources.xml also.
If i use "oracle.jdbc.pool.OracleDataSource" in datasources.xml then ClassNotFoundException is coming.
But i have included classes12.jar in home/lib directory
STACK TARCE FOR CLASSNOT FOUNDEXCEPTION
=========================================================================================================================
javax.naming.NamingException: ClassNotFoundException: oracle.jdbc.pool.OracleDataSource
at com.evermind.server.rmi.RMIContext.lookup(RMIContext.java:125)
at com.evermind.naming.SubFilterContext.lookup(SubFilterContext.java:56)
at javax.naming.InitialContext.lookup(InitialContext.java:354)
at EjbTransaction.client.exRateEJBClient.dbConnection(exRateEJBClient.java:188)
at EjbTransaction.client.exRateEJBClient.main(exRateEJBClient.java:66)
at java.lang.reflect.Method.invoke(Native Method)
at com.evermind.client.applicationlauncher.ApplicationLauncher.startApplication(ApplicationLauncher.java:188)
at com.evermind.client.applicationlauncher.ApplicationLauncher.main(ApplicationLauncher.java, Compiled Code)
=========================================================================================================================
But if i use "com.evermind.sql.ConnectionDataSource" or "com.evermind.sql.DriverManagerDataSource" then i am getting
connection.But if i do some operations(Even setAutoCommit(false))its giving NULL PointerException.
STACK TRACE FOR NULLPOINTEREXCEPTION
=========================================================================================================================
java.lang.NullPointerException
at com.evermind.sql.OrionPooledDataSource.addUsedConnection(OrionPooledDataSource.java, Compiled Code)
at com.evermind.sql.OrionPooledDataSource.getPooledInstance(OrionPooledDataSource.java, Compiled Code)
at com.evermind.sql.OrionCMTConnection.setConnection(OrionCMTConnection.java:119)
at com.evermind.sql.OrionCMTConnection.intercept(OrionCMTConnection.java:98)
at com.evermind.sql.OrionCMTConnection.setAutoCommit(OrionCMTConnection.java:248)
at EjbTransaction.client.exRateEJBClient.dbConnection(exRateEJBClient.java:200)
at EjbTransaction.client.exRateEJBClient.main(exRateEJBClient.java:66)
at java.lang.reflect.Method.invoke(Native Method)
at com.evermind.client.applicationlauncher.ApplicationLauncher.startApplication(ApplicationLauncher.java:188)
at com.evermind.client.applicationlauncher.ApplicationLauncher.main(ApplicationLauncher.java, Compiled Code)
=========================================================================================================================
In all the above 2 cases i am using ejb-location JNDI name for look up inside client code.
Why this is happening?
Thanx in advance
Venky
Discussions
EJB programming & troubleshooting: URGENT : Problem in DataSource usage in Client applIcation
-
URGENT : Problem in DataSource usage in Client applIcation (2 messages)
- Posted by: Venkatesh Srinivasan
- Posted on: July 22 2001 06:55 EDT
Threaded Messages (2)
- URGENT : Problem in DataSource usage in Client applIcation by Race Condition on July 23 2001 12:13 EDT
- Re: URGENT : Problem in DataSource usage in Client applIcation by Shanthi Chinta on October 30 2007 03:32 EDT
-
URGENT : Problem in DataSource usage in Client applIcation[ Go to top ]
- Posted by: Race Condition
- Posted on: July 23 2001 12:13 EDT
- in response to Venkatesh Srinivasan
Why is this so urgent? -
Re: URGENT : Problem in DataSource usage in Client applIcation[ Go to top ]
- Posted by: Shanthi Chinta
- Posted on: October 30 2007 03:32 EDT
- in response to Venkatesh Srinivasan
Hello Venkatesh, I am facing the same problem, which you experienced long back. I am trying to deploy a Java application on Oracle Application Server from JDeveloper. I have tried to deploy two application with same steps. One application is working fine, while for the other application I could not perform any database operations. I could establish connection with the database, when I used the EJB JNDI location name, but could not perform any DB operation using that object. It is throwing Null Pointer Exception. Please let me know, if you have found any solution for this problem. Thanks in advance, Shanthi.