This week's book giveaway is in the Server-Side JavaScript and NodeJS forum.
We're giving away four copies of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques and have Mario Casciaro & Luciano Mammino on-line!
See this thread for details.
Win a copy of Node.js Design Patterns: Design and implement production-grade Node.js applications using proven patterns and techniques this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

was advanced single server 4.0 + db2 udb ERROR

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all
I'm a newbie in the ejb development. I�m working with WebSphere Advanced Edition Single Server 4.0 with DB2 UDB v 7.1 Fixpack 5, with IBM HTTP Server, all over Linux Red Hat 7.2.
I've done a tutorial which I've downloaded from www.webspherepro.com. I've deployed a CMP entity bean which uses a instantdb. Everything worked fine until I tried to use the same entity bean with db2, creating the same db with the same tables. In the AAT I switched the jndi reference from instantdb to respective db2 db, and I generated the code again, later I deployed it and I got the following error:
79518ccb Helpers W NMSV0610I: A NamingException is being thrown from a javax.naming.Context implementation. Details follow:
Context implementation: com.ibm.ws.naming.urlns.genericURLContextRoot
Context method: lookup(Name)
Context name: local:
Target name: jdbc/jdbc/sample40
Other data:
Exception stack trace: java.lang.NoClassDefFoundError: javax/sql/ConnectionPoolDataSource
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java(Compiled Code))
at java.net.URLClassLoader.defineClass(URLClassLoader.java(Compiled Code))
at java.net.URLClassLoader.defineClass(URLClassLoader.java(Compiled Code))
at java.net.URLClassLoader.access$300(URLClassLoader.java(Compiled Code))
at java.net.URLClassLoader$ClassFinder.run(URLClassLoader.java(Compiled Code))
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java(Compiled Code))
at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java(Compiled Code))
at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java(Compiled Code))
at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java(Compiled Code))
at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
at com.ibm.ws.classloader.ReloadableClassLoader.loadClass(ReloadableClassLoader.java:66)
at com.ibm.websphere.advanced.cm.factory.DataSourceFactory.isJTAEnabled(DataSourceFactory.java:491)
at com.ibm.ejs.cm.DataSourceFactory.createDataSource(DataSourceFactory.java:128)
at com.ibm.ejs.cm.DataSourceFactory.getDataSource(DataSourceFactory.java:112)
at com.ibm.websphere.advanced.cm.factory.DataSourceFactory.getDataSource(DataSourceFactory.java:387)
at com.ibm.websphere.advanced.cm.factory.DataSourceFactory$ResourceReferenceObjectFactory.getObjectInstance(DataSourceFactory.java:750)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:308)
at com.ibm.ws.naming.urlbase.UrlContextHelper.isReference(UrlContextHelper.java:115)
at com.ibm.ws.naming.urlbase.UrlContextHelper.processBoundObjectForLookup(UrlContextHelper.java:221)
at com.ibm.ws.naming.urlbase.UrlContext.lookup(UrlContext.java:1181)
at com.ibm.ws.naming.urlbase.UrlContext.lookup(UrlContext.java:1158)
at com.ibm.ws.naming.urlbase.UrlContext.lookup(UrlContext.java:1210)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at com.ibm.ws.cpi.JDBCPersisterFactoryImpl.create(JDBCPersisterFactoryImpl.java:88)
at com.ibm.ejs.container.EJSContainer.loadBeanMetaData(EJSContainer.java:1511)
at com.ibm.ejs.container.EJSContainer.getHomeInstance(EJSContainer.java:1255)
at com.ibm.ejs.container.EJSContainer.startBean(EJSContainer.java:1219)
at com.ibm.ws.runtime.BeanHelper.startBean(BeanHelper.java:154)
at com.ibm.ws.runtime.EJBEngine.addEjbModule(EJBEngine.java:437)
at com.ibm.ws.runtime.Server.startModule(Server.java:605)
at com.ibm.ws.runtime.Server.startApplication(Server.java:399)
at com.ibm.ejs.sm.util.debug.DrAdminServer.basicStartApplication(DrAdminServer.java:2311)
at com.ibm.ejs.sm.util.debug.DrAdminServer.startApplication(DrAdminServer.java:2276)
at com.ibm.ejs.sm.util.debug.DrAdminServer.handleRestartApplication(DrAdminServer.java:1359)
at com.ibm.ejs.sm.util.debug.DrAdminServer.processMethod(DrAdminServer.java:750)
at com.ibm.ejs.sm.util.debug.DrAdminServer.processRequest(DrAdminServer.java:603)
at com.ibm.ejs.sm.util.debug.DrAdminServer.processRequest(DrAdminServer.java:555)
at com.ibm.ejs.sm.util.debug.DrAdminServer.listen(DrAdminServer.java:504)
at com.ibm.ejs.sm.util.debug.DrAdminServer$ServerRunner.run(DrAdminServer.java:243)

[02.01.30 11:51:38:025 GMT-04:00] 79518ccb Helpers W NMSV0610I: A NamingException is being thrown from a javax.naming.Context implementation. Details follow:
Context implementation: com.ibm.ws.naming.urlns.genericURLContextRoot
Context method: lookup(Name)
Context name: local:
Target name: local:jdbc/jdbc/sample40
Other data:
Exception stack trace: javax.naming.NamingException: The JNDI operation "lookup(Name)"on the context "local:" with the name "jdbc/jdbc/sample40" failed. Please get the root cause Throwable contained in this NamingException for more information. Root exception is java.lang.NoClassDefFoundError: javax/sql/ConnectionPoolDataSource
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java(Compiled Code))
at ...

I'm very tired going around in circles and surfing the ibm websphere infocenter page and get nothing of help. I feel null, I'm waiting your help, thanxs
Have a nice day
Martin
 
Martin Amaris
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Anyone can help me
The error I got basically is based on (That's what I think, but I don't know how fix it) when I'm configuring a datasource in WAS AE Single Server 4.0 for a CMP stateless bean:
1.I configured a DataSource and given a JNDI bind name as "jdbc/sample40"
2 When I start the application server, it tries to look up the Datasource as "jdbc/jdbc/sample40"
Can anyone please clarify me where I was going wrong.
Thanks
Martin
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
First check the datasource has configured correctly or not by running 'dumpNameSpace.sh" file in bin directory of WAS.
If you get jdbc/sample40 in output then there wont be any problem in configuring db2 server.
Try to access DS using InitalContext object
lookup("jdbc/sample40")
if you still have any db2 configuration problem then i will give more details. I configured my WAS Single Server 4.0 on linux and configured for both oracle and db2, both are working fine.
 
Martin Amaris
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi, thanxs, the datasource is well configured because it is recongnized by the dumpNameSpace.sh
I'm gonna try to access datasource using InitialContext object. The weird thing is the engine tries to lookup jdbc/jdbc/sample40
Thanks
Bye
Martin
 
Martin Amaris
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi again, I've found a ibm workshop about MyBank Application, written specifically to interact with a db2 database.
I did it, and everything was going well, until I started the server after I installed the application using SEAppInstall.sh and creating the datasource in the Websphere Web Administration Console. In the starting process of the WAS I got the same error early.
The engine tries to lookup a datasource putting a extra "jdbc" word before the jndi name of the datasource, eg the datasource name is jdbc/MyBank and it tries to lookup jdbc/jdbc/MyBank
What do you think is the problem? Is it about my WAS configuration or installation? or relationed with the DB2 UDB configuration?
I hope your help please
Thanks
Bye
Martin
 
Martin Amaris
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi again,
I fix it up my WAS problem, well I get no error until now again. The error seem to be about a classpath mistake, I just edited the script setupCmdLine.sh, adding the jar file j2ee.jar
Well, I hope to help anyone that have the same problem i got.
see ya
Martin
 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Martin,
I have a similar problem. Can you walk me thru, the steps you had taken for resolving the prefixed "jdbc" to the lookup ?
Please refer topic "NamingException from Resources configuration" in case you need to look at the trace...

thanks,
vijay
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic