java.lang.NoClassDefFoundError: com.ibm.CORBA.iiop.GlobalORBFactory

Hi,

I'm really having a hard time on the problem I encountered on WSAD. Can anybody help me or give me an idea on how to solve this problem since I've been working this problem for 4 days now.

Here is my simple code and the error I encountered: WebSphere Studio Application Developer Integration Edition (Windows) Version: 5.1.1

Code:

try {

ResourceBundle dbBundle = ResourceBundle.getBundle("com.bms.properties.application.backcharge");

String dsjndi= dbBundle.getString("ICBC_DATASOURCE");

ctx = new InitialContext();

ds = (DataSource) ctx.lookup(dsjndi);

}catch (NamingException ne) {

System.err.println(ne.getMessage());

System.out.println("ejbCreate: could not lookup datasource gmsDS");

} finally{

System.out.println("DBConnect()");

}

I had a property file with a statement "ICBC_DATASOURCE=jdbc/ICBC" which the url, etc. are configured on WSAD. All the configuration for dbase connection are configured in WSAD.

Error:

java.lang.NoClassDefFoundError: com.ibm.CORBA.iiop.GlobalORBFactory

at com.ibm.ejs.oa.EJSORBImpl.class$(EJSORBImpl.java:44)

at com.ibm.ejs.oa.EJSORBImpl.initializeORB(EJSORBImpl.java:195)

at com.ibm.ejs.oa.EJSClientORBImpl.<init>(EJSClientORBImpl.java:93)

at com.ibm.ejs.oa.EJSClientORBImpl.<init>(EJSClientORBImpl.java:65)

at com.ibm.ejs.oa.EJSORB.init(EJSORB.java:385)

at com.ibm.ws.naming.util.Helpers.getOrb(Helpers.java:260)

at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(WsnInitCtxFactory.java:166)

at com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:98)

at com.ibm.ws.naming.util.WsnInitCtx.<init>(WsnInitCtx.java:79)

at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContext(WsnInitCtxFactory.java:137)

at com.ibm.websphere.naming.WsnInitialContextFactory.getInitialContext(WsnInitialContextFactory.java:80)

at com.ibm.ejs.ns.jndi.CNInitialContextFactory.getInitialContext(CNInitialContextFactory.java:68)

at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)

at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)

at javax.naming.InitialContext.init(InitialContext.java:219)

at javax.naming.InitialContext.<init>(InitialContext.java:195)

at com.bms.chargeback.application.util.DBaseQuery.getConnection(DBaseQuery.java:148)

at com.bms.chargeback.application.util.DBaseQuery.getData10(DBaseQuery.java:31)

at com.bms.chargeback.application.util.SendMail.main(SendMail.java:18)

Exception in thread "main"

I think the error is a missing class but I really dont have any idea on what class is missing. Some forums on the net said that there are missing jar file such as naming.jar, namingclient.jar, etc. etc. I try to check the jar files on my end and all of the said jar are in place, I'm really not sure if my setup of WSAD in terms of jar files are correct.

In case you have an idea regarding this matter, kindly please send it to me and please explain the details on how to do the idea.

thanks in advance.... =)

[3199 byte] By [tanskia] at [2007-10-2 15:44:38]
# 1

The NoClassDefFoundError is thrown if the JVM tries to load the definition of the said class, in this case the GlobalORBFactory factory class but could not find a definition of the class. The definition existed when the current class was compiled, that is the class that is attempting to use GlobalORBFactory, but the class can not be found. So yeah, this is a classpath issue. You'll need to track down the jar file it belongs to and add it to the classpath. Also, in my experience I have seen this message if there were two conflicting classes on the classpath. So the issue may be the presence of an additional maybe older jar file somewhere.

http://java.sun.com/j2se/1.4.2/docs/api/java/lang/NoClassDefFoundError.html

nantucketa at 2007-7-13 15:37:20 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...