Forums Register Login

java.net.ConnectException when connecting when lookup EJB

+Pie Number of slices to send: Send
Hi everyone,

I am getting the above error when am trying to do JNDI lookup EJB from within one JBoss instance to another JBoss instance in windows 7 os.

both jboss is running on same machine, lookup is from one jboss to another jboss, following error occurred ..

at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:634)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
at javax.naming.InitialContext.lookup(InitialContext.java:392)

thanks in advance



+Pie Number of slices to send: Send
Please post the entire exception stacktrace and any relevant code.
+Pie Number of slices to send: Send
following is the code snip
java.util.Properties props = new java.util.Properties();
System.setProperty("java.security.auth.login.config", Constants.AUTH_CONF_FILE_PATH);
props.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY, "org.jboss.naming.NamingContextFactory");
props.setProperty("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces");
props.put(javax.naming.Context.PROVIDER_URL, url);
props.put(javax.naming.Context.SECURITY_PROTOCOL, "client-login");
props.put("java.naming.factory.initial", "org.jboss.security.jndi.LoginInitialContextFactory");
props.put(javax.naming.Context.SECURITY_PRINCIPAL, user);
props.put(javax.naming.Context.SECURITY_CREDENTIALS, password);
ic = new InitialContext(props);

System.out.println("ic.lookup(name)"+ic.lookup("TestBeanBean"));

Note: invocataion from Jboss 4.2.3GA to jboss4.0.3,
I found some links saying RMI invoke is causing this issue, but am not clear on this.

following is the error trace


10:16:55,572 ERROR [STDERR] javax.naming.CommunicationException: Operation failed [Root exception is java.rmi.ConnectExc
eption: Failure during invoke; nested exception is:
java.io.EOFException]
10:16:55,573 ERROR [STDERR] at org.jboss.naming.interceptors.ExceptionInterceptor.invoke(ExceptionInterceptor.java:6
5)
10:16:55,573 ERROR [STDERR] at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:70)
10:16:55,574 ERROR [STDERR] at org.jboss.proxy.ClientMethodInterceptor.invoke(ClientMethodInterceptor.java:74)
10:16:55,575 ERROR [STDERR] at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
10:16:55,575 ERROR [STDERR] at $Proxy101.lookup(Unknown Source)
10:16:55,576 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:667)
10:16:55,577 ERROR [STDERR] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
10:16:55,577 ERROR [STDERR] at javax.naming.InitialContext.lookup(InitialContext.java:351)
10:16:55,578 ERROR [STDERR] at se.cambio.webInf.spider.Spider.getObjectFromSpider(Spider.java:105)
10:16:55,579 ERROR [STDERR] at se.cambio.webInf.spider.Spider.performLogin(Spider.java:68)
10:16:55,579 ERROR [STDERR] at se.cambio.webInf.spider.LoginHandler.login(LoginHandler.java:11)
10:16:55,580 ERROR [STDERR] at se.cambio.webInf.session.CosmicWebInterfaceServlet.login(CosmicWebInterfaceServlet.ja
va:196)
10:16:55,580 ERROR [STDERR] at se.cambio.webInf.session.CosmicWebInterfaceServlet.doPost(CosmicWebInterfaceServlet.j
ava:120)
10:16:55,581 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
10:16:55,582 ERROR [STDERR] at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
10:16:55,583 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterCha
in.java:290)
10:16:55,583 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:
206)
10:16:55,584 ERROR [STDERR] at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
10:16:55,584 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterCha
in.java:235)
10:16:55,585 ERROR [STDERR] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:
206)
10:16:55,586 ERROR [STDERR] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
10:16:55,587 ERROR [STDERR] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
10:16:55,588 ERROR [STDERR] at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValv
e.java:182)
10:16:55,589 ERROR [STDERR] at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
10:16:55,590 ERROR [STDERR] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
10:16:55,591 ERROR [STDERR] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
10:16:55,592 ERROR [STDERR] at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.j
ava:157)
10:16:55,592 ERROR [STDERR] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
10:16:55,594 ERROR [STDERR] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
10:16:55,595 ERROR [STDERR] at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
10:16:55,595 ERROR [STDERR] at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protoco
l.java:583)
10:16:55,596 ERROR [STDERR] at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
10:16:55,597 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)
10:16:55,598 ERROR [STDERR] Caused by: java.rmi.ConnectException: Failure during invoke; nested exception is:
java.io.EOFException
10:16:55,598 ERROR [STDERR] at org.jboss.invocation.pooled.interfaces.PooledInvokerProxy.invoke(PooledInvokerProxy.j
ava:659)
10:16:55,599 ERROR [STDERR] at org.jboss.invocation.InvokerInterceptor.invokeInvoker(InvokerInterceptor.java:365)
10:16:55,599 ERROR [STDERR] at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:197)
10:16:55,600 ERROR [STDERR] at org.jboss.naming.interceptors.ExceptionInterceptor.invoke(ExceptionInterceptor.java:5
7)
10:16:55,601 ERROR [STDERR] ... 32 more
10:16:55,602 ERROR [STDERR] Caused by: java.io.EOFException
Eat that pie! EAT IT! Now read this tiny ad. READ IT!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 1396 times.
Similar Threads
JNDI Connection refused
Problem when accessing JMX (RMI Adaptor) from JNDI namespace
Problem when accessing JMX (RMI Adaptor) from JNDI namespace
Error with EJB Lookup from jsp for jboss/eclipse
Error with EJB Lookup from jsp for jboss/eclipse
More...

All times above are in ranch (not your local) time.
The current ranch time is
Apr 16, 2024 08:34:32.