wood burning stoves 2.0*
The moose likes Websphere and the fly likes WSAD DB2 Error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "WSAD DB2 Error" Watch "WSAD DB2 Error" New topic
Author

WSAD DB2 Error

Anju Kundwani
Greenhorn

Joined: Jan 04, 2006
Posts: 1
Hi all,

I have configured a V4.0 DataSource in my Portal Server(v5.0) in WSAD(v5.1.2). The driver I am using is
"COM.ibm.db2.jdbc.DB2XADataSource"(from db2java.zip in SQLLIB folder of DB2 installation).

While trying to connect to DB2 database with this datasource, I am getting the following error.


[12/13/05 16:00:32:781 IST] 222304c1 DSFactoryImpl E CONM7019E: Attempted to use a 4.0 DataSource from a version 2.3 (or higher) servlet. Invalid configuration.
[12/13/05 16:00:32:906 IST] 222304c1 Helpers W NMSV0605W: A Reference object looked up from the context "localhost/nodes/localhost/servers/WebSphere_Portal" with the name "jdbc/idbds" was sent to the JNDI Naming Manager and an exception resulted. Reference data follows:
Reference Factory Class Name: com.ibm.websphere.advanced.cm.factory.DataSourceFactory$ResourceReferenceObjectFactory
Reference Factory Class Location URLs:
Reference Class Name: com.ibm.ejs.cm.portability.PortableDataSource
Type: name
Content: HENV IDB Database
Type: dataBaseVersion
Content: 0
Type: minimumPoolSize
Content: 1
Type: maximumPoolSize
Content: 30

....etc...

Type: dataSourceClassName
Content: COM.ibm.db2.jdbc.DB2XADataSource
Type: j2ee.resource.factory.href
Content: cells/localhost/nodes/localhost/servers/WebSphere_Portal/resources.xml#WAS40DataSource_1117191843799
Type: j2ee.resource.provider.href
Content: cells/localhost/nodes/localhost/servers/WebSphere_Portal/resources.xml#JDBCProvider_1117191843797
Type: resetReadOnly
Content: false
Type: secureXACredential
Content: false
....etc...

Exception data follows:
javax.naming.NamingException: Attempted to use a 4.0 DataSource from a 2.3 (or higher) servlet. Invalid configuration.
at com.ibm.ejs.cm.DSFactoryImpl.verifyConfiguration(DSFactoryImpl.java:253)
at com.ibm.websphere.advanced.cm.factory.DataSourceFactory$ResourceReferenceObjectFactory.getObjectInstance(DataSourceFactory.java:844)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:313)
at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookup(Helpers.java:884)
at com.ibm.ws.naming.jndicos.CNContextImpl.processResolveResults(CNContextImpl.java:1763)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1616)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1526)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1226)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:132)
at javax.naming.InitialContext.lookup(InitialContext.java:359)
at com.wpo.shared.dataaccessobject.MyDAO.(MyDAO.java:64)
at com.wpo.client.controller.business.action.MyBusinessAction.perform(MyBusinessAction.java:35)


etc....


[12/13/05 16:00:33:031 IST] 222304c1 Helpers W NMSV0610I: A NamingException is being thrown from a javax.naming.Context implementation. Details follow:
Context implementation: com.ibm.ws.naming.jndicos.CNContextImpl
Context method: lookup
Context name: localhost/nodes/localhost/servers/WebSphere_Portal
Target name: jdbc/testds
Other data:
Exception stack trace: com.ibm.websphere.naming.CannotInstantiateObjectException: Exception occurred while the JNDI NamingManager was processing a javax.naming.Reference object. Root exception is javax.naming.NamingException: Attempted to use a 4.0 DataSource from a 2.3 (or higher) servlet. Invalid configuration.
at com.ibm.ejs.cm.DSFactoryImpl.verifyConfiguration(DSFactoryImpl.java:253)
at com.ibm.websphere.advanced.cm.factory.DataSourceFactory$ResourceReferenceObjectFactory.getObjectInstance(DataSourceFactory.java:844)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:313)
at com.ibm.ws.naming.util.Helpers.processSerializedObjectForLookup(Helpers.java:884)
at com.ibm.ws.naming.jndicos.CNContextImpl.processResolveResults(CNContextImpl.java:1763)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1616)
at com.ibm.ws.naming.jndicos.CNContextImpl.doLookup(CNContextImpl.java:1526)
at com.ibm.ws.naming.jndicos.CNContextImpl.lookup(CNContextImpl.java:1226)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:132)
at javax.naming.InitialContext.lookup(InitialContext.java:359)

etc.....

The workaround got as a result of internet search is to add datasource as v5.0. But while doing this, I am not able to enter my database userId and password anywhere. In v4.0, there were options to add these. But in v5.0, I cant find any such options.

Pls suggest a solution.
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18541
    
    8

Reconfigure it as a normal data source. The "4.0" data source is for compatibility with old applications migrated from earlier versions of Websphere.
michel dzouza
Greenhorn

Joined: Apr 02, 2006
Posts: 1
its very simple...refer to some documents and if its too hard dont ask your seniors..ask some of your friends from other team..still if you dont get the answer crash the system...thats it..
Ananth Prakash
Greenhorn

Joined: Apr 03, 2006
Posts: 8
In the server configuration, go to the security tab. In the JAAS Authentication Entries section, add a entry specifying a alias name for accessing the DB along with your DB user name and password.

Something like this
Alias: localhost/DB2Auth
Username: <DBUserName>
Password: <DBPassword>

Now, in the DataSource tab, you would have two fields by name, 'Component-Managed Alias' and Container-Managed Alias'. From the dropdown, select the JAAS Authentication Alias value you have just created.

Restart the server and you would be all set.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: WSAD DB2 Error
 
Similar Threads
Migrating 1.1 application to Websphere v5
error in context lookup
Error accessing DB2 in WSAD 5.1.2(Portal Server 5.0) with version 4.0 DataSource!!
Error while accessing DB2 with WSAD!!
failed using programmaticall created datasource