Software Ninja

The Software Ninja is a professional software developer. Here are some books I find interesting and useful.

My Photo
Name: Matthew O. Smith
Location: Utah, United States

While continuing to provide for his family as a computer programmer, Matt has been studying marriage and relationships for many years. He is the author of the soon to be released book: Ferocious Flirting: Making Marriage Wonderful. He is also available for speaking to groups on keeping the romance going in marriage. Feel free to email me with comments, questions or suggestions.

Monday, August 20, 2007

What have they done with com/sun/corba/se/connection/ORBSocketFactory?

We are using Weblogic 8.1.4 and I am writing a monitoring program that will let me know if all the required EJBs, data sources and other resources are up. My current project is a enterprise level system with hooks into lots of things. It can take some to to determine which resource is causing the problem.

I was using the weblogic.jar but it is way too big. replacing it with wlclient.jar results in:


Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/corba/se/connection/ORBSocketFactory
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at weblogic.corba.j2ee.naming.ORBHelper.(ORBHelper.java:113)
at weblogic.corba.client.ClientORBInitializer.initialize(ClientORBInitializer.java:84)
at weblogic.jndi.WLInitialContextFactory.(WLInitialContextFactory.java:29)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:654)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
at javax.naming.InitialContext.init(InitialContext.java:223)
at javax.naming.InitialContext.(InitialContext.java:197)
at org.springframework.jndi.JndiTemplate.createInitialContext(JndiTemplate.java:105)
at org.springframework.jndi.JndiTemplate.execute(JndiTemplate.java:83)
at org.springframework.jndi.JndiTemplate.lookup(JndiTemplate.java:121)
at com.ihc.phc.monitor.JndiMonitor.getStatus(JndiMonitor.java:29)
at com.ihc.phc.monitor.Monitor.getAllStatus(Monitor.java:21)
at com.ihc.phc.monitor.Main.main(Main.java:12)



Oh how pleasant. This error has been report as bug 6340079 which states:
Reason for compilation errors:
------------------------------
The following packages are not there on jdk1.5.0 but they are in j2sdk1.4.2
1.com.sun.corba.se.connection.*
2.com.sun.corba.se.internal.core.*
How was this problem resolved? Remove the offending unit test of course.

There is also another thread on the subject stating basically the same thing but without helpful suggestions.

The only helpful suggestion seems to have been to try the wlclient jar from a newer version of the WebLogic server (9 or 10). I tried that and now the ClassDefNotFoundError goes away. Now there is a runtime error:

[java.rmi.MarshalException: CORBA MARSHAL 0 Maybe; nested exception is:
org.omg.CORBA.MARSHAL: vmcid: 0x0 minor code: 0 completed: Maybe]


You know, indecision is bad enough in humans, I do not need it in computers. Maybe it worked? Slight chance I would say. Ok, looks like the newer (9.1) wlclient.jar is not compatible with older (8.1) weblogic instances.

Funny thing is, the weblogic.jar with all its bloat works. I wonder .....

Looks like the weblogic.jar has it's own version of the ORBSocketFactory and that is does not use the sun one. Oh bother! Guess it is back to the bloated weblogic.jar for me.

3 Comments:

Blogger Matt said...

Glad I posted this as I just ran into it again.

October 8, 2007 1:03 PM  
Blogger Subha said...

Thanks a ton.. This worked

March 18, 2009 11:31 PM  
Blogger Matthew O. Smith said...

Boy am I really glad I posted this as I ran into it again.

May 18, 2009 10:16 AM  

Post a Comment

<< Home