| Author |
Getting database connection failed
|
Hritika Sheren
Greenhorn
Joined: Aug 17, 2004
Posts: 2
|
|
Environment : 1) WSAD 5.1 2) EJB 3) A client application My data connection code in EJB container is like DataSourceFactory dsFactory = DataSourceFactory.getSingleton(); if (dataSource == null || dbUserName == null || dbPassword == null || dbViewSchema == null || dbTableSchema == null) throw new Exception(" No db user id and password or schema name specified"); DataSource ds = dsFactory.lookupHome("jdbc/" + dataSource); if(ds!=null){ dbCon = ds.getConnection(dbUserName,dbPassword); } This works fine when accessed from within EJB container, but when I try to use the same connection from standalone java program, it give me following exception at line dbCon = ds.getConnection(dbUserName,dbPassword) com.ibm.ejs.jts.jts.CurrentSet$InitializationError: not initialized Immediate help will be really appreciated. Thanks in advance.
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26218
|
|
Hritika, I'm moving this to our Websphere forum. You could have posted this in IDEs or Websphere, but I think you'll get a better answer there.
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26218
|
|
Hritika, Is this being run as a java application or as an application client?
|
 |
Hritika Sheren
Greenhorn
Joined: Aug 17, 2004
Posts: 2
|
|
Hi Jeanne, It is a java application. A standalone java application is calling a method which uses connection from connection pool which is maintained by EJB container. I got the solution for this. This was problem with WAS 5.0 release and a fix pack for this was already released. In our setup, we installed Fix Pack 1 over WAS 5.1 installation and it solved the problem. This problem is fixed by APAR PQ78401. Thanks anyway Jeanne for forwarding a helping hand.
|
 |
 |
|
|
subject: Getting database connection failed
|
|
|