Bonjour,
la société pour laquelle je travaille actuellement a choisi Websphere comme serveur cible (c'est un choix ma foi).
J'ai actuellement une version 7 sur mon poste pour débroussailler la chose.
Nous avons des EJBs déployé sur le Websphere (déjà configurer les ressources JMS fut un 'plaisir' ....) et un client de test stand alone tournant avec une JVM sun.
J'ai dans mon code les choses suivantes :
et on obtient la magnifique exception suivante :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7 Hashtable<String, String> h = new Hashtable<String, String>(); h.put(Context.INITIAL_CONTEXT_FACTORY, "com.ibm.websphere.naming.WsnInitialContextFactory"); h.put(Context.PROVIDER_URL, "iiop://localhost:2809"); h.put("org.omg.CORBA.ORBClass", "com.ibm.CORBA.iiop.ORB"); Context context = new InitialContext(h); logger.debug(context.list(context.getNameInNamespace()));
j'ai dans mon classpath la lib ibmorb.jar
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33 javax.naming.NamingException: Failed to initialize the ORB [Root exception is org.omg.CORBA.INITIALIZE: can't instantiate default ORB implementation com.ibm.CORBA.iiop.ORB vmcid: 0x0 minor code: 0 completed: No] at com.ibm.ws.naming.util.Helpers.getOrb(Helpers.java:314) at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(WsnInitCtxFactory.java:384) at com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:113) at com.ibm.ws.naming.util.WsnInitCtx.getContextIfNull(WsnInitCtx.java:428) at com.ibm.ws.naming.util.WsnInitCtx.getNameInNamespace(WsnInitCtx.java:418) at javax.naming.InitialContext.getNameInNamespace(InitialContext.java:497) at nbe.test.ejb.TestEjbCall.main(TestEjbCall.java:43) Caused by: org.omg.CORBA.INITIALIZE: can't instantiate default ORB implementation com.ibm.CORBA.iiop.ORB vmcid: 0x0 minor code: 0 completed: No at org.omg.CORBA.ORB.create_impl(ORB.java:297) at org.omg.CORBA.ORB.init(ORB.java:336) at com.ibm.ws.orb.GlobalORBFactory.init(GlobalORBFactory.java:85) at com.ibm.ejs.oa.EJSORBImpl.initializeORB(EJSORBImpl.java:174) at com.ibm.ejs.oa.EJSClientORBImpl.<init>(EJSClientORBImpl.java:97) at com.ibm.ejs.oa.EJSClientORBImpl.<init>(EJSClientORBImpl.java:73) at com.ibm.ejs.oa.EJSORB.init(EJSORB.java:386) at com.ibm.ws.naming.util.Helpers.getOrb(Helpers.java:305) ... 6 more Caused by: java.lang.NoSuchFieldError: UNKNOWN at com.ibm.rmi.util.RepositoryId.createHashString(RepositoryId.java:738) at com.ibm.rmi.util.RepositoryId.<clinit>(RepositoryId.java:254) at com.ibm.rmi.iiop.CDROutputStream.<clinit>(CDROutputStream.java:1107) at com.ibm.rmi.corba.ORB.<init>(ORB.java:281) at com.ibm.rmi.iiop.ORB.<init>(ORB.java:187) at com.ibm.CORBA.iiop.ORB.<init>(ORB.java:576) 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:494) at java.lang.Class.newInstance0(Class.java:350) at java.lang.Class.newInstance(Class.java:303) at org.omg.CORBA.ORB.create_impl(ORB.java:295) ... 13 more
Visiblement y'a de la redéfinition de lib corba dans la chose.
Je ne souhaite pas lancer mon programme avec la jre d'IBM et je cherche donc comment IBM fait fonctionner sa chose avec le reste du monde JAVA (c'est sensé être interopérable non?).
Quelqu'un peut-il m'aider à débrouiller le petit problème auquel je suis confronté?
Merci d'avance.
Theoden
Partager