sandip-mehta83
asked on
How To Call Stateless EJB Deployed On Weblogic From Glassfis
Can somebody please help me with step by step guide of how to call EJB deployed on Weblogic from application deployed on glassfish server.
I have been looking for answers in different forums and never got an satisfactory solutions. All the solutions I tried created new alien problem for me.
Thanks in advance.
I have been looking for answers in different forums and never got an satisfactory solutions. All the solutions I tried created new alien problem for me.
Thanks in advance.
Can you share with us what is it that you tried?
This is a small code snippet that will help, always works like a charm (but make sure your that your properties are set according to your specs) -
Properties properties = new Properties();
properties.put("java.namin g.factory. initial"," org.jnp.in terfaces.N amingConte xtFactory" );
properties.put("java.namin g.factory. url.pkgs", "=org.jbos s.naming:o rg.jnp.int erfaces");
properties.put("java.namin g.provider .url","loc alhost:109 9");
Context context;
try
{
context = new InitialContext();
TestBeanRemote beanRemote = (TestBeanRemote) context.lookup(TestBean.Re moteJNDINa me);
beanRemote.test();
} catch (NamingException e)
{
e.printStackTrace();
}
Properties properties = new Properties();
properties.put("java.namin
properties.put("java.namin
properties.put("java.namin
Context context;
try
{
context = new InitialContext();
TestBeanRemote beanRemote = (TestBeanRemote) context.lookup(TestBean.Re
beanRemote.test();
} catch (NamingException e)
{
e.printStackTrace();
}
ASKER
Thanks for looking into this. I will post the lookup code shortly.
ASKER
Code that you have mentioned is only for looking up EJB on JBOSS server. Is this correct? If yes I need to lookup the EJB on Weblogic server from glassfish web application. Now Glassfish isn't the only server application needs to support. Webapp can be deployed on other web server such as Liferay and so on...so i am looking for portable code that can be used irrespective of web server to look up the EJB on weblogic.
I donot know if a portable code exists, as far as I know only the bean is portable. The client has to write the code based on the server.
Here is what you need for the weblogic -
java.naming.factory.initia l=weblogic .jndi.WLIn itialConte xtFactory
java.naming.provider.url=i iop://loca lhost:7011
Here is what you need for the weblogic -
java.naming.factory.initia
java.naming.provider.url=i
Also,
java.naming.factory.url.pk gs=weblogi c.jndi.fac tories
java.naming.factory.url.pk
ASKER
What jar file do i need to put in WEB-INF/lib for aforementioned context factory?
ASKER
I tried adding weblogic.jar in server classpath and got following exception.
[#|2009-07-13T08:45:28.708 +0530|INFO |sun-appse rver9.1|ja vax.enterp rise.syste m.stream.o ut|_Thread ID=17;_Thr eadName=Th read-80;|< Jul 13, 2009 8:45:28 AM IST> <Error> <IIOP> <BEA-002015> <Using javax.rmi.CORBA.UtilClass com.sun.corba.ee.impl.java x.rmi.CORB A.Util; The IIOP subsystem requires a WebLogic Server-compatible UtilClass.>
|#]
[#|2009-07-13T08:45:28.708 +0530|INFO |sun-appse rver9.1|ja vax.enterp rise.syste m.stream.o ut|_Thread ID=17;_Thr eadName=Th read-80;|< Jul 13, 2009 8:45:28 AM IST> <Error> <IIOP> <BEA-002016> <Using javax.rmi.CORBA.PortableRe moteObject Class com.sun.corba.ee.impl.java x.rmi.Port ableRemote Object, the IIOP subsystem requires a WebLogic Server-compatible PortableRemoteObjectClass. >
|#]
[#|2009-07-13T08:45:30.885 +0530|INFO |sun-appse rver9.1|ja vax.enterp rise.syste m.stream.o ut|_Thread ID=17;_Thr eadName=Th read-80;|[ 2009 Jul 13 08:45:30] DEBUG (com.cvg.icoms.ejb.helpers .ServiceLo cator:getW orkshopAPI Bean:78) - "Message: Successfully Look Up WS API Home Object...."
|#]
[#|2009-07-13T08:45:33.642 +0530|INFO |sun-appse rver9.1|ja vax.enterp rise.syste m.stream.o ut|_Thread ID=17;_Thr eadName=Th read-80;|[ 2009 Jul 13 08:45:33] DEBUG (com.cvg.icoms.ejb.helpers .ServiceLo cator:getW orkshopAPI Bean:135) - "Message: Successfully Got The WS API Remote Bean Object...."
|#]
[#|2009-07-13T08:45:34.127 +0530|WARN ING|sun-ap pserver9.1 |javax.ent erprise.sy stem.strea m.err|_Thr eadID=17;_ ThreadName =Thread-80 ;_RequestI D=050f2fcd -658f-436b -bdf0-ace3 a2ab5a05;| java.rmi.S erverExcep tion: RemoteException occurred in server thread; nested exception is:
java.rmi.RemoteException: EJB Exception: ; nested exception is:
java.lang.NullPointerExcep tion
at weblogic.iiop.InboundRespo nseImpl.un marshalRet urn(Inboun dResponseI mpl.java:1 03)
at weblogic.iiop.IIOPRemoteRe f.invokeIn ternal(IIO PRemoteRef .java:232)
at weblogic.iiop.IIOPRemoteRe f.invoke(I IOPRemoteR ef.java:16 1)
at com.ceon.pcc.workshop.Work shopContro llerRemote _IIOP_WLSt ub.searchC SDs(Unknow n Source)
at com.cvg.icoms.ejb.helpers. WSApiDeleg ate.search CSDs(WSApi Delegate.j ava:634)
at com.cvg.icoms.ejb.helpers. WSApiHelpe r.searchCS Ds(WSApiHe lper.java: 227)
at com.cvg.icoms.entity.proce ssor.RMAnd FeatProces sor.proces sIncrement alSyncEnti ties(RMAnd FeatProces sor.java:1 95)
at com.cvg.icoms.entity.proce ssor.RMAnd FeatProces sor.proces sEntities( RMAndFeatP rocessor.j ava:233)
at com.cvg.icoms.adapters.inc rementalsy nc.Increme ntalSyncAd apterImpl. startIncre mentalSync (Increment alSyncAdap terImpl.ja va:50)
at com.cvg.icoms.adapters.inc rementalsy nc.SocketM sgProcesso r.processM sg(SocketM sgProcesso r.java:78)
at com.cvg.icoms.adapters.inc rementalsy nc.SocketM sgProcesso r.run(Sock etMsgProce ssor.java: 378)
at java.lang.Thread.run(Unkno wn Source)
Caused by: java.rmi.RemoteException: EJB Exception: ; nested exception is:
java.lang.NullPointerExcep tion
at weblogic.ejb.container.int ernal.EJBR untimeUtil s.throwRem oteExcepti on(EJBRunt imeUtils.j ava:95)
at weblogic.ejb.container.int ernal.Base EJBObject. handleSyst emExceptio n(BaseEJBO bject.java :713)
at weblogic.ejb.container.int ernal.Base EJBObject. handleSyst emExceptio n(BaseEJBO bject.java :681)
at weblogic.ejb.container.int ernal.Base EJBObject. postInvoke 1(BaseEJBO bject.java :447)
at weblogic.ejb.container.int ernal.Base EJBObject. postInvoke TxRetry(Ba seEJBObjec t.java:374 )
at com.ceon.pcc.workshop.Work shopContro llerBean_i mz2jq_EOIm pl.searchC SDs(Worksh opControll erBean_imz 2jq_EOImpl .java:5396 )
at com.ceon.pcc.workshop.Work shopContro llerBean_i mz2jq_EOIm pl_WLSkel. internalIn voke3(Unkn own Source)
at com.ceon.pcc.workshop.Work shopContro llerBean_i mz2jq_EOIm pl_WLSkel. internalIn voke2(Unkn own Source)
at com.ceon.pcc.workshop.Work shopContro llerBean_i mz2jq_EOIm pl_WLSkel. internalIn voke1(Unkn own Source)
at com.ceon.pcc.workshop.Work shopContro llerBean_i mz2jq_EOIm pl_WLSkel. invoke(Unk nown Source)
at weblogic.rmi.internal.acti vation.Act ivatableSe rverRef.in voke(Activ atableServ erRef.java :85)
at weblogic.rmi.internal.Basi cServerRef $1.run(Bas icServerRe f.java:440 )
at weblogic.security.acl.inte rnal.Authe nticatedSu bject.doAs (Authentic atedSubjec t.java:363 )
at weblogic.security.service. SecurityMa nager.runA s(Security Manager.ja va:147)
at weblogic.rmi.internal.Basi cServerRef .handleReq uest(Basic ServerRef. java:436)
at weblogic.rmi.internal.Basi cServerRef .access$30 0(BasicSer verRef.jav a:58)
at weblogic.rmi.internal.Basi cServerRef $BasicExec uteRequest .run(Basic ServerRef. java:975)
at weblogic.work.ExecuteThrea d.execute( ExecuteThr ead.java:2 09)
at weblogic.work.ExecuteThrea d.run(Exec uteThread. java:181)
Caused by: java.lang.NullPointerExcep tion
at java.io.ObjectOutputStream $BlockData OutputStre am.getUTFL ength(Obje ctOutputSt ream.java)
at java.io.ObjectOutputStream .writeStri ng(ObjectO utputStrea m.java:118 7)
at java.io.ObjectOutputStream .writeEnum (ObjectOut putStream. java:1268)
at java.io.ObjectOutputStream .writeObje ct0(Object OutputStre am.java:10 77)
at java.io.ObjectOutputStream .writeObje ct(ObjectO utputStrea m.java:302 )
at java.util.ArrayList.writeO bject(Arra yList.java :569)
at sun.reflect.GeneratedMetho dAccessor1 5.invoke(U nknown Source)
at sun.reflect.DelegatingMeth odAccessor Impl.invok e(Delegati ngMethodAc cessorImpl .java:25)
at java.lang.reflect.Method.i nvoke(Meth od.java:58 5)
at java.io.ObjectStreamClass. invokeWrit eObject(Ob jectStream Class.java :917)
at java.io.ObjectOutputStream .writeSeri alData(Obj ectOutputS tream.java :1339)
at java.io.ObjectOutputStream .writeOrdi naryObject (ObjectOut putStream. java:1290)
at java.io.ObjectOutputStream .writeObje ct0(Object OutputStre am.java:10 79)
at java.io.ObjectOutputStream .defaultWr iteFields( ObjectOutp utStream.j ava:1375)
at java.io.ObjectOutputStream .writeSeri alData(Obj ectOutputS tream.java :1347)
at java.io.ObjectOutputStream .writeOrdi naryObject (ObjectOut putStream. java:1290)
at java.io.ObjectOutputStream .writeObje ct0(Object OutputStre am.java:10 79)
at java.io.ObjectOutputStream .writeObje ct(ObjectO utputStrea m.java:302 )
at weblogic.rjvm.MsgAbbrevOut putStream. writeObjec t(MsgAbbre vOutputStr eam.java:6 14)
at weblogic.rjvm.MsgAbbrevOut putStream. writeObjec tWL(MsgAbb revOutputS tream.java :605)
at weblogic.rmi.internal.Obje ctIO.write Object(Obj ectIO.java :38)
at weblogic.rjvm.BasicOutboun dRequest.m arshalArgs (BasicOutb oundReques t.java:87)
at weblogic.rmi.cluster.Clust erableRemo teRef.invo ke(Cluster ableRemote Ref.java:3 32)
at weblogic.rmi.cluster.Clust erableRemo teRef.invo ke(Cluster ableRemote Ref.java:2 52)
at com.ceon.pcc.cm.CMControll erBean_d80 4x8_EOImpl _922_WLStu b.searchCS Ds(Unknown Source)
at com.ceon.pcc.workshop.Work shopContro llerBean.s earchCSDs( WorkshopCo ntrollerBe an.java:21 69)
at com.ceon.pcc.workshop.Work shopContro llerBean_i mz2jq_EOIm pl.searchC SDs(Worksh opControll erBean_imz 2jq_EOImpl .java:5382 )
at com.ceon.pcc.workshop.Work shopContro llerBean_i mz2jq_EOIm pl_WLSkel. internalIn voke3(Unkn own Source)
at com.ceon.pcc.workshop.Work shopContro llerBean_i mz2jq_EOIm pl_WLSkel. internalIn voke2(Unkn own Source)
at com.ceon.pcc.workshop.Work shopContro llerBean_i mz2jq_EOIm pl_WLSkel. internalIn voke1(Unkn own Source)
at com.ceon.pcc.workshop.Work shopContro llerBean_i mz2jq_EOIm pl_WLSkel. invoke(Unk nown Source)
at weblogic.rmi.internal.acti vation.Act ivatableSe rverRef.in voke(Activ atableServ erRef.java :85)
|#]
[#|2009-07-13T08:45:34.143 +0530|INFO |sun-appse rver9.1|ja vax.enterp rise.syste m.stream.o ut|_Thread ID=17;_Thr eadName=Th read-80;|[ 2009 Jul 13 08:45:34] ERROR (com.cvg.icoms.ejb.helpers .WSApiDele gate:searc hCSDs:640) - "Message: Exception Occurred While Searching CSD : SS1-000"
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.RemoteException: EJB Exception: ; nested exception is:
java.lang.NullPointerExcep tion
at weblogic.iiop.InboundRespo nseImpl.un marshalRet urn(Inboun dResponseI mpl.java:1 03)
at weblogic.iiop.IIOPRemoteRe f.invokeIn ternal(IIO PRemoteRef .java:232)
at weblogic.iiop.IIOPRemoteRe f.invoke(I IOPRemoteR ef.java:16 1)
at com.ceon.pcc.workshop.Work shopContro llerRemote _IIOP_WLSt ub.searchC SDs(Unknow n Source)
at com.cvg.icoms.ejb.helpers. WSApiDeleg ate.search CSDs(WSApi Delegate.j ava:634)
at com.cvg.icoms.ejb.helpers. WSApiHelpe r.searchCS Ds(WSApiHe lper.java: 227)
at com.cvg.icoms.entity.proce ssor.RMAnd FeatProces sor.proces sIncrement alSyncEnti ties(RMAnd FeatProces sor.java:1 95)
at com.cvg.icoms.entity.proce ssor.RMAnd FeatProces sor.proces sEntities( RMAndFeatP rocessor.j ava:233)
at com.cvg.icoms.adapters.inc rementalsy nc.Increme ntalSyncAd apterImpl. startIncre mentalSync (Increment alSyncAdap terImpl.ja va:50)
at com.cvg.icoms.adapters.inc rementalsy nc.SocketM sgProcesso r.processM sg(SocketM sgProcesso r.java:78)
at com.cvg.icoms.adapters.inc rementalsy nc.SocketM sgProcesso r.run(Sock etMsgProce ssor.java: 378)
at java.lang.Thread.run(Unkno wn Source)
Caused by: java.rmi.RemoteException: EJB Exception: ; nested exception is:
java.lang.NullPointerExcep tion
at weblogic.ejb.container.int ernal.EJBR untimeUtil s.throwRem oteExcepti on(EJBRunt imeUtils.j ava:95)
at weblogic.ejb.container.int ernal.Base EJBObject. handleSyst emExceptio n(BaseEJBO bject.java :713)
at weblogic.ejb.container.int ernal.Base EJBObject. handleSyst emExceptio n(BaseEJBO bject.java :681)
at weblogic.ejb.container.int ernal.Base EJBObject. postInvoke 1(BaseEJBO bject.java :447)
at weblogic.ejb.container.int ernal.Base EJBObject. postInvoke TxRetry(Ba seEJBObjec t.java:374 )
at com.ceon.pcc.workshop.Work shopContro llerBean_i mz2jq_EOIm pl.searchC SDs(Worksh opControll erBean_imz 2jq_EOImpl .java:5396 )
at com.ceon.pcc.workshop.Work shopContro llerBean_i mz2jq_EOIm pl_WLSkel. internalIn voke3(Unkn own Source)
at com.ceon.pcc.workshop.Work shopContro llerBean_i mz2jq_EOIm pl_WLSkel. internalIn voke2(Unkn own Source)
at com.ceon.pcc.workshop.Work shopContro llerBean_i mz2jq_EOIm pl_WLSkel. internalIn voke1(Unkn own Source)
at com.ceon.pcc.workshop.Work shopContro llerBean_i mz2jq_EOIm pl_WLSkel. invoke(Unk nown Source)
at weblogic.rmi.internal.acti vation.Act ivatableSe rverRef.in voke(Activ atableServ erRef.java :85)
at weblogic.rmi.internal.Basi cServerRef $1.run(Bas icServerRe f.java:440 )
at weblogic.security.acl.inte rnal.Authe nticatedSu bject.doAs (Authentic atedSubjec t.java:363 )
at weblogic.security.service. SecurityMa nager.runA s(Security Manager.ja va:147)
at weblogic.rmi.internal.Basi cServerRef .handleReq uest(Basic ServerRef. java:436)
at weblogic.rmi.internal.Basi cServerRef .access$30 0(BasicSer verRef.jav a:58)
at weblogic.rmi.internal.Basi cServerRef $BasicExec uteRequest .run(Basic ServerRef. java:975)
at weblogic.work.ExecuteThrea d.execute( ExecuteThr ead.java:2 09)
at weblogic.work.ExecuteThrea d.run(Exec uteThread. java:181)
Caused by: java.lang.NullPointerExcep tion
at java.io.ObjectOutputStream $BlockData OutputStre am.getUTFL ength(Obje ctOutputSt ream.java)
at java.io.ObjectOutputStream .writeStri ng(ObjectO utputStrea m.java:118 7)
at java.io.ObjectOutputStream .writeEnum (ObjectOut putStream. java:1268)
at java.io.ObjectOutputStream .writeObje ct0(Object OutputStre am.java:10 77)
at java.io.ObjectOutputStream .writeObje ct(ObjectO utputStrea m.java:302 )
at java.util.ArrayList.writeO bject(Arra yList.java :569)
at sun.reflect.GeneratedMetho dAccessor1 5.invoke(U nknown Source)
at sun.reflect.DelegatingMeth odAccessor Impl.invok e(Delegati ngMethodAc cessorImpl .java:25)
at java.lang.reflect.Method.i nvoke(Meth od.java:58 5)
at java.io.ObjectStreamClass. invokeWrit eObject(Ob jectStream Class.java :917)
at java.io.ObjectOutputStream .writeSeri alData(Obj ectOutputS tream.java :1339)
at java.io.ObjectOutputStream .writeOrdi naryObject (ObjectOut putStream. java:1290)
at java.io.ObjectOutputStream .writeObje ct0(Object OutputStre am.java:10 79)
at java.io.ObjectOutputStream .defaultWr iteFields( ObjectOutp utStream.j ava:1375)
at java.io.ObjectOutputStream .writeSeri alData(Obj ectOutputS tream.java :1347)
at java.io.ObjectOutputStream .writeOrdi naryObject (ObjectOut putStream. java:1290)
at java.io.ObjectOutputStream .writeObje ct0(Object OutputStre am.java:10 79)
at java.io.ObjectOutputStream .writeObje ct(ObjectO utputStrea m.java:302 )
at weblogic.rjvm.MsgAbbrevOut putStream. writeObjec t(MsgAbbre vOutputStr eam.java:6 14)
at weblogic.rjvm.MsgAbbrevOut putStream. writeObjec tWL(MsgAbb revOutputS tream.java :605)
at weblogic.rmi.internal.Obje ctIO.write Object(Obj ectIO.java :38)
at weblogic.rjvm.BasicOutboun dRequest.m arshalArgs (BasicOutb oundReques t.java:87)
at weblogic.rmi.cluster.Clust erableRemo teRef.invo ke(Cluster ableRemote Ref.java:3 32)
at weblogic.rmi.cluster.Clust erableRemo teRef.invo ke(Cluster ableRemote Ref.java:2 52)
at com.ceon.pcc.cm.CMControll erBean_d80 4x8_EOImpl _922_WLStu b.searchCS Ds(Unknown Source)
at com.ceon.pcc.workshop.Work shopContro llerBean.s earchCSDs( WorkshopCo ntrollerBe an.java:21 69)
at com.ceon.pcc.workshop.Work shopContro llerBean_i mz2jq_EOIm pl.searchC SDs(Worksh opControll erBean_imz 2jq_EOImpl .java:5382 )
at com.ceon.pcc.workshop.Work shopContro llerBean_i mz2jq_EOIm pl_WLSkel. internalIn voke3(Unkn own Source)
at com.ceon.pcc.workshop.Work shopContro llerBean_i mz2jq_EOIm pl_WLSkel. internalIn voke2(Unkn own Source)
at com.ceon.pcc.workshop.Work shopContro llerBean_i mz2jq_EOIm pl_WLSkel. internalIn voke1(Unkn own Source)
at com.ceon.pcc.workshop.Work shopContro llerBean_i mz2jq_EOIm pl_WLSkel. invoke(Unk nown Source)
at weblogic.rmi.internal.acti vation.Act ivatableSe rverRef.in voke(Activ atableServ erRef.java :85)
|#]
[#|2009-07-13T08:45:28.708
|#]
[#|2009-07-13T08:45:28.708
|#]
[#|2009-07-13T08:45:30.885
|#]
[#|2009-07-13T08:45:33.642
|#]
[#|2009-07-13T08:45:34.127
java.rmi.RemoteException: EJB Exception: ; nested exception is:
java.lang.NullPointerExcep
at weblogic.iiop.InboundRespo
at weblogic.iiop.IIOPRemoteRe
at weblogic.iiop.IIOPRemoteRe
at com.ceon.pcc.workshop.Work
at com.cvg.icoms.ejb.helpers.
at com.cvg.icoms.ejb.helpers.
at com.cvg.icoms.entity.proce
at com.cvg.icoms.entity.proce
at com.cvg.icoms.adapters.inc
at com.cvg.icoms.adapters.inc
at com.cvg.icoms.adapters.inc
at java.lang.Thread.run(Unkno
Caused by: java.rmi.RemoteException: EJB Exception: ; nested exception is:
java.lang.NullPointerExcep
at weblogic.ejb.container.int
at weblogic.ejb.container.int
at weblogic.ejb.container.int
at weblogic.ejb.container.int
at weblogic.ejb.container.int
at com.ceon.pcc.workshop.Work
at com.ceon.pcc.workshop.Work
at com.ceon.pcc.workshop.Work
at com.ceon.pcc.workshop.Work
at com.ceon.pcc.workshop.Work
at weblogic.rmi.internal.acti
at weblogic.rmi.internal.Basi
at weblogic.security.acl.inte
at weblogic.security.service.
at weblogic.rmi.internal.Basi
at weblogic.rmi.internal.Basi
at weblogic.rmi.internal.Basi
at weblogic.work.ExecuteThrea
at weblogic.work.ExecuteThrea
Caused by: java.lang.NullPointerExcep
at java.io.ObjectOutputStream
at java.io.ObjectOutputStream
at java.io.ObjectOutputStream
at java.io.ObjectOutputStream
at java.io.ObjectOutputStream
at java.util.ArrayList.writeO
at sun.reflect.GeneratedMetho
at sun.reflect.DelegatingMeth
at java.lang.reflect.Method.i
at java.io.ObjectStreamClass.
at java.io.ObjectOutputStream
at java.io.ObjectOutputStream
at java.io.ObjectOutputStream
at java.io.ObjectOutputStream
at java.io.ObjectOutputStream
at java.io.ObjectOutputStream
at java.io.ObjectOutputStream
at java.io.ObjectOutputStream
at weblogic.rjvm.MsgAbbrevOut
at weblogic.rjvm.MsgAbbrevOut
at weblogic.rmi.internal.Obje
at weblogic.rjvm.BasicOutboun
at weblogic.rmi.cluster.Clust
at weblogic.rmi.cluster.Clust
at com.ceon.pcc.cm.CMControll
at com.ceon.pcc.workshop.Work
at com.ceon.pcc.workshop.Work
at com.ceon.pcc.workshop.Work
at com.ceon.pcc.workshop.Work
at com.ceon.pcc.workshop.Work
at com.ceon.pcc.workshop.Work
at weblogic.rmi.internal.acti
|#]
[#|2009-07-13T08:45:34.143
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.RemoteException: EJB Exception: ; nested exception is:
java.lang.NullPointerExcep
at weblogic.iiop.InboundRespo
at weblogic.iiop.IIOPRemoteRe
at weblogic.iiop.IIOPRemoteRe
at com.ceon.pcc.workshop.Work
at com.cvg.icoms.ejb.helpers.
at com.cvg.icoms.ejb.helpers.
at com.cvg.icoms.entity.proce
at com.cvg.icoms.entity.proce
at com.cvg.icoms.adapters.inc
at com.cvg.icoms.adapters.inc
at com.cvg.icoms.adapters.inc
at java.lang.Thread.run(Unkno
Caused by: java.rmi.RemoteException: EJB Exception: ; nested exception is:
java.lang.NullPointerExcep
at weblogic.ejb.container.int
at weblogic.ejb.container.int
at weblogic.ejb.container.int
at weblogic.ejb.container.int
at weblogic.ejb.container.int
at com.ceon.pcc.workshop.Work
at com.ceon.pcc.workshop.Work
at com.ceon.pcc.workshop.Work
at com.ceon.pcc.workshop.Work
at com.ceon.pcc.workshop.Work
at weblogic.rmi.internal.acti
at weblogic.rmi.internal.Basi
at weblogic.security.acl.inte
at weblogic.security.service.
at weblogic.rmi.internal.Basi
at weblogic.rmi.internal.Basi
at weblogic.rmi.internal.Basi
at weblogic.work.ExecuteThrea
at weblogic.work.ExecuteThrea
Caused by: java.lang.NullPointerExcep
at java.io.ObjectOutputStream
at java.io.ObjectOutputStream
at java.io.ObjectOutputStream
at java.io.ObjectOutputStream
at java.io.ObjectOutputStream
at java.util.ArrayList.writeO
at sun.reflect.GeneratedMetho
at sun.reflect.DelegatingMeth
at java.lang.reflect.Method.i
at java.io.ObjectStreamClass.
at java.io.ObjectOutputStream
at java.io.ObjectOutputStream
at java.io.ObjectOutputStream
at java.io.ObjectOutputStream
at java.io.ObjectOutputStream
at java.io.ObjectOutputStream
at java.io.ObjectOutputStream
at java.io.ObjectOutputStream
at weblogic.rjvm.MsgAbbrevOut
at weblogic.rjvm.MsgAbbrevOut
at weblogic.rmi.internal.Obje
at weblogic.rjvm.BasicOutboun
at weblogic.rmi.cluster.Clust
at weblogic.rmi.cluster.Clust
at com.ceon.pcc.cm.CMControll
at com.ceon.pcc.workshop.Work
at com.ceon.pcc.workshop.Work
at com.ceon.pcc.workshop.Work
at com.ceon.pcc.workshop.Work
at com.ceon.pcc.workshop.Work
at com.ceon.pcc.workshop.Work
at weblogic.rmi.internal.acti
|#]
Add the WL specific jars (there are several, don't remember the exact names, which differ between server versions anyway so check the documentation) not to the server classpath but the enterprise application classpath.
That way you won't mess up the entire server (if you add them to the server global classpath they may interfere with Glassfish's own classes).
That way you won't mess up the entire server (if you add them to the server global classpath they may interfere with Glassfish's own classes).
ASKER
I tried to add weblogic.jar into glassfishdomain/lib/ext directory but doesn't work. I have also tried to add weblogic.jar in web-inf/lib directory but doesn't seem to resolve the WLInitialContextFactory class.
ASKER
Also adding weblogic.jar in domain/lib/ext folder, doesn't allow server to start.
What ide are you using?
ASKER
i am deploying the .war file on linux box which acts as a client to another enterprise application deployed on weblogic server on different host.
You can add it to the buildpath of your project, that should do the trick.
But what IDE are you using?
ASKER
i am using Ecllipse IDE. I am using ant script to package the .war file, which also package the weblogic.jar into WEB-INF/lib folder. When I deploy it on Linux box i am getting java.lang.ClassNotFoundExc eption:web logic.jndi .WLINitial ContextFac tory. even though i have package weblogic.jar along with .war file.
I am confused, the client classpath is where you need the jar file. If you bundle it with the war file, how ill the client find the jar.
ASKER
Flow is
--> Upon application deployment servlet starts and invokes sends message. Receing message application perform some actions and based on that it will invoke the EJB. So really my webapplication is acting as a client to EJB deployed on weblogic instance. So .war file contains the code for the EJB lookup. I think the question now remain is how i should pacakge the weblogic.jar into war file since WEB-IN/lib doesn't seems to be working and adding into domain classpath, doesn't allow server to start.
--> Upon application deployment servlet starts and invokes sends message. Receing message application perform some actions and based on that it will invoke the EJB. So really my webapplication is acting as a client to EJB deployed on weblogic instance. So .war file contains the code for the EJB lookup. I think the question now remain is how i should pacakge the weblogic.jar into war file since WEB-IN/lib doesn't seems to be working and adding into domain classpath, doesn't allow server to start.
ASKER
can you please suggest on how can i set the application classpath on glassfish?
I had suggested adding to classpath on a number of occasions.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.