getInitialContext() when called from within the app server with the second app
server's url ,
does not change context to point to the new app server....Is it possible to do
this ?
What are we missing ? Thanks in advance for your help/ any pointers/links.
private Context getInitialContext() throws NamingException {
try {
Properties h = new Properties();
h.put(Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory");
h.put(Context.PROVIDER_URL, url);
return new InitialContext(h);
} catch (NamingException ne) {
System.out.println("Unable to get a connection to the Application Server");
throw ne;
}
}
DK <deepa_k...@fanniemae.com> wrote:
> } catch (NamingException ne) {
--
Dimitri
thanks
DK <deepa_k...@fanniemae.com> wrote:
> thanks
--
Dimitri
thanks...
The client was unable to lookup the EJBHome with the JNDI name com.fanniemae.con
solidator.adapter.ejb.configuration.ApplicationInitHome on the Application Serve
rjavax.naming.CommunicationException [Root exception is weblogic.rmi.UnmarshalEx
ception: Unmarshalling return
- with nested exception:
[java.lang.ClassNotFoundException: class com.fanniemae.consolidator.adapter.ejb.
configuration.ApplicationInitBeanHomeImpl_ServiceStub previously not found]]
javax.naming.CommunicationException. Root exception is java.lang.ClassNotFoundE
xception: class com.fanniemae.consolidator.adapter.ejb.configuration.Application
InitBeanHomeImpl_ServiceStub previously not found
at weblogic.rjvm.MsgAbbrev.read(MsgAbbrev.java:181)
at weblogic.socket.JVMAbbrevSocket.readMsgAbbrevs(JVMAbbrevSocket.java:5
05)
at weblogic.rjvm.MsgAbbrevInputStream.prime(MsgAbbrevInputStream.java:13
4)
at weblogic.rjvm.RJVMImpl.dispatch(RJVMImpl.java:610)
at weblogic.rjvm.ConnectionManagerServer.handleRJVM(ConnectionManagerSer
ver.java:123)
at weblogic.rjvm.ConnectionManager.dispatch(ConnectionManager.java:630)
at weblogic.socket.JVMAbbrevSocket.dispatch(JVMAbbrevSocket.java:393)
at weblogic.socket.JVMSocketT3.dispatch(JVMSocketT3.java:355)
at weblogic.socket.NTSocketMuxer.processSockets(NTSocketMuxer.java:424)
at weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:
23)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
--------------- nested within: ------------------
weblogic.rmi.UnmarshalException: Unmarshalling return
- with nested exception:
[java.lang.ClassNotFoundException: class com.fanniemae.consolidator.adapter.ejb.
configuration.ApplicationInitBeanHomeImpl_ServiceStub previously not found]
at weblogic.jndi.toolkit.BasicWLContext_WLStub.lookup(BasicWLContext_WLS
tub.java:256)
at weblogic.jndi.toolkit.WLContextStub.lookup(WLContextStub.java:545)
at javax.naming.InitialContext.lookup(InitialContext.java:350)
at com.fanniemae.consolidator.adapter.outbound.ConsolidatorConfiguration
EJBClient.lookupHome(ConsolidatorConfigurationEJBClient.java:116)
at com.fanniemae.consolidator.adapter.outbound.ConsolidatorConfiguration
EJBClient.<init>(ConsolidatorConfigurationEJBClient.java:60)
at com.fanniemae.consolidator.adapter.outbound.ConsolidatorConnection.in
it(ConsolidatorConnection.java:87)
at com.fanniemae.consolidator.adapter.outbound.ConsolidatorConnection.<i
nit>(ConsolidatorConnection.java:65)
at com.fanniemae.consolidator.adapter.ejb.test.TestBean.testCon(TestBean
java:66)
at com.fanniemae.consolidator.adapter.ejb.test.TestBeanEOImpl.testCon(Te
stBeanEOImpl.java:56)
at com.fanniemae.consolidator.adapter.ejb.test.TestBeanEOImpl_WLSkel.inv
oke(TestBeanEOImpl_WLSkel.java:173)
at weblogic.rmi.extensions.BasicServerObjectAdapter.invoke(BasicServerOb
jectAdapter.java:347)
at weblogic.rmi.extensions.BasicRequestHandler.handleRequest(BasicReques
tHandler.java:69)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest
java:15)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
ConsolidatorRemoteException: null
weblogic.system.enableUnsafeClassloading=true
(it was added in some 5.1 service pack - if you run the latest, it should
work).
DK <Deepa_K...@fanniemae.com> wrote:
> thanks...
--
Dimitri
A jar file containing the home and remote
interfaces of ApplicationInitBean is already in
the weblogic classpath of the client WLS which contains
Test Bean. What else do I need ?
Thanks again for your help.
1.) Open the EJB jar file and copy all of the Stub classes over to the
client's weblogic classpath.
or:
2.) In addition to making sure that you restarted the client server with
weblogic.system.enableUnsafeClassloading=true in the weblogic.properties
file, you need to make sure that the ClasspathServlet is properly
configured in the server where the bean is deployed.
Hope this helps,
Robert