Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Accessing Websphere Datasource through Standalone jav program.

 
Shrikant Parimi
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use a datasource created using websphere appication server to conncet to the database( using jndi ). I am able successfully access the datasource when through the websphere application server( version 3.5.5).
I also have a standalone java program that I need to run using the datasource. When ever I run the program, I get the following error
java.lang.NoClassDefFoundError: com/ibm/ejs/sm/beans/RepositoryObjectImpl
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java(Compiled Code))
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java(Compiled Code))
at java.net.URLClassLoader.defineClass(URLClassLoader.java(Compiled Code))
at java.net.URLClassLoader.access$1(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 com.ibm.ejs.sm.beans.DataSourceBean$Factory.getObjectInstance(DataSourceBean.java:963)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:310)
at com.ibm.ejs.ns.jndi.CNContextImpl.isReference(CNContextImpl.java:1303)
at com.ibm.ejs.ns.jndi.CNContextImpl.doLookup(CNContextImpl.java:801)
at com.ibm.ejs.ns.jndi.CNContextImpl.lookup(CNContextImpl.java:585)
at javax.naming.InitialContext.lookup(InitialContext.java:349)
I have the following jar files in my classpath.
ejs.jar
ujc.jar
repository.jar
Do any one of you know how to resolve this issue ?. Any help/suggestion will be well appreciated

Thank you,
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic