Hi everybody !
I am an happy Java developer, and I would like to know what do you do
to be able to create an RMI connection to WebSphere6, using a Sun JVM.
I had a look in the
org.mc4j.console.connection.WebsphereConnectionNode and see some parts
of interested code (like the use of initial context factory of Sun
rather than the IBM one), but after trying to adapt your source code
to my project, I am still unable to make this properly work.
My exception is the one that everybody on Internet has :
Caused by: com.ibm.websphere.management.exception.ConnectorNotAvailableExce=
ption:
javax.naming.NamingException: Failed to initialize the ORB [Root
exception is java.lang.ClassCastException:
com.sun.corba.se.impl.orb.ORBImpl]
=09at com.ibm.ws.management.connector.rmi.RMIConnectorClient.reconnect(RMIC=
onnectorClient.java:240)
=09at com.ibm.ws.management.connector.rmi.RMIConnectorClient.<init>(RMIConn=
ectorClient.java:116)
=09... 11 more
--> The JVM seems to try to cast the IBM ORB implementation to the Sun
one, and of course, it's not legal...
When I change the default ORB implementation with a config file like this o=
ne :
org.omg.CORBA.ORBClass=3Dcom.ibm.CORBA.iiop.ORB
org.omg.CORBA.ORBSingletonClass=3Dcom.ibm.rmi.corba.ORBSingleton
The problem is different, but still here, as you can see :
Caused by: org.omg.CORBA.INITIALIZE: can't instantiate default ORB
implementation com.ibm.CORBA.iiop.ORB vmcid: 0x0 minor code: 0=20
completed: No
=09at org.omg.CORBA.ORB.create_impl(Unknown Source)
=09at org.omg.CORBA.ORB.init(Unknown Source)
=09at com.ibm.ws.orb.GlobalORBFactory.init(GlobalORBFactory.java:82)
=09at com.ibm.ejs.oa.EJSORBImpl.initializeORB(EJSORBImpl.java:174)
=09at com.ibm.ejs.oa.EJSClientORBImpl.<init>(EJSClientORBImpl.java:97)
=09at com.ibm.ejs.oa.EJSClientORBImpl.<init>(EJSClientORBImpl.java:73)
=09at com.ibm.ejs.oa.EJSORB.init(EJSORB.java:386)
=09at com.ibm.ws.naming.util.Helpers.getOrb(Helpers.java:285)
=09... 18 more
Caused by: java.lang.UnsatisfiedLinkError: registerNatives
=09at com.ibm.jvm.ExtendedSystem.registerNatives(Native Method)
In fact, I was also unable to make MC4J work with an RMI connection to
WebSphere 6.
I've tried to set a valid Initial Context Factory in the properties
dialog of my connection, but I've always got the same exception error,
that indicates me that the initial context factory is not found :
Caused by: javax.naming.NoInitialContextException: Need to specify
class name in environment or system property, or as an applet
parameter, or in an application resource file:=20
java.naming.factory.initial
I've included the right JAR files of WebSphere, so I think it's not
the problem.
Do not hesitate to recontact me to have other questions on this probable is=
sue.
Nicolas Ternisien
Thank you for your project.
|