Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
JSP - A mailing list about Java Server Pages specification and reference
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Oracle Connection Pooling in 3 2 2
Servlet : Session invalidate
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Tomcat and webapplication specific java library path
Running a Simple JMS Example
Mapping in workers2 properties
org apache jasper JasperException
Cannot find message resources under key org apache struts action
   MESSAGE
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
url string for connecting jboss to oracle
Value attribute of <html:checkbox
javax servlet ServletException: BeanUtils populate
HTTP Status 404 The requested resource is not available
5 0 18: Windows XP Pro vs Windows 2000
 
- NameNotFoundException thrown even though JB

- NameNotFoundException thrown even though JB

2007-07-17       - By ekaye

 Back
It's strange. In our development environment, if JBOSS isn't running and we
attempt to run a client, we get the following exception as soon as we try and
Context.lookup(String name) where we are looking up a JMS connection factory:

javax.naming.CommunicationException Source code of javax.naming.CommunicationException: Could not obtain connection to any of
these urls: localhost:1099 and discovery failed with error: javax.naming
.CommunicationException: Receive timed out [Root exception is java.net
.SocketTimeoutException: Receive timed out] [Root exception is javax.naming
.CommunicationException: Failed to connect to server localhost:1099 [Root
exception is javax.naming.ServiceUnavailableException Source code of javax.naming.ServiceUnavailableException: Failed to connect to
server localhost:1099 [Root exception is java.net.ConnectException Source code of java.net.ConnectException: Connection
refused: connect]]]
  at org.jnp.interfaces.NamingContext Source code of org.jnp.interfaces.NamingContext(NamingContext.java:1399)
  at org.jnp.interfaces.NamingContext Source code of org.jnp.interfaces.NamingContext(NamingContext.java:579)
  at org.jnp.interfaces.NamingContext Source code of org.jnp.interfaces.NamingContext(NamingContext.java:572)
  at javax.naming.InitialContext Source code of javax.naming.InitialContext(InitialContext.java:347)
  at test.SimpleJNDIClient.main(SimpleJNDIClient.java:26)
Caused by: javax.naming.CommunicationException Source code of javax.naming.CommunicationException: Failed to connect to server
localhost:1099 [Root exception is javax.naming.ServiceUnavailableException Source code of javax.naming.ServiceUnavailableException:
Failed to connect to server localhost:1099 [Root exception is java.net
.ConnectException: Connection refused: connect]]
  at org.jnp.interfaces.NamingContext Source code of org.jnp.interfaces.NamingContext(NamingContext.java:254)
  at org.jnp.interfaces.NamingContext Source code of org.jnp.interfaces.NamingContext(NamingContext.java:1370)
  ... 4 more
Caused by: javax.naming.ServiceUnavailableException Source code of javax.naming.ServiceUnavailableException: Failed to connect to
server localhost:1099 [Root exception is java.net.ConnectException Source code of java.net.ConnectException: Connection
refused: connect]
  at org.jnp.interfaces.NamingContext Source code of org.jnp.interfaces.NamingContext(NamingContext.java:228)
  ... 5 more
Caused by: java.net.ConnectException Source code of java.net.ConnectException: Connection refused: connect
  at java.net.PlainSocketImpl Source code of java.net.PlainSocketImpl(Native Method)
  at java.net.PlainSocketImpl Source code of java.net.PlainSocketImpl(PlainSocketImpl.java:305)
  at java.net.PlainSocketImpl Source code of java.net.PlainSocketImpl(PlainSocketImpl.java:171)
  at java.net.PlainSocketImpl Source code of java.net.PlainSocketImpl(PlainSocketImpl.java:158)
  at java.net.Socket Source code of java.net.Socket(Socket.java:464)
  at java.net.Socket Source code of java.net.Socket(Socket.java:414)
  at java.net.Socket Source code of java.net.Socket(Socket.java:310)
  at java.net.Socket Source code of java.net.Socket(Socket.java:212)
  at org.jnp.interfaces.TimedSocketFactory Source code of org.jnp.interfaces.TimedSocketFactory(TimedSocketFactory.java
:69)
  at org.jnp.interfaces.TimedSocketFactory Source code of org.jnp.interfaces.TimedSocketFactory(TimedSocketFactory.java
:62)
  at org.jnp.interfaces.NamingContext Source code of org.jnp.interfaces.NamingContext(NamingContext.java:224)
  ... 5 more



However, when we run the same code in our client's environment, even though
JBOSS isn't running it seems to call some ha code that attempts to do the
lookup anyway and fails. The exception, with the exact same code, is now:


javax.naming.NameNotFoundException Source code of javax.naming.NameNotFoundException: ConnectionFactory
  at org.jboss.ha.jndi.TreeHead Source code of org.jboss.ha.jndi.TreeHead(TreeHead.java:223)
  at org.jboss.ha.jndi.HAJNDI Source code of org.jboss.ha.jndi.HAJNDI(HAJNDI.java:134)
  at sun.reflect.GeneratedMethodAccessor78.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method Source code of java.lang.reflect.Method(Method.java:585)
  at org.jboss.ha.framework.server.HARMIServerImpl Source code of org.jboss.ha.framework.server.HARMIServerImpl(HARMIServerImpl.java
:194)
  at sun.reflect.GeneratedMethodAccessor75.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method Source code of java.lang.reflect.Method(Method.java:585)
  at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
  at sun.rmi.transport.Transport$1.run(Transport.java:153)
  at java.security.AccessController Source code of java.security.AccessController(Native Method)
  at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
  at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:466)
  at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java
:707)
  at java.lang.Thread Source code of java.lang.Thread(Thread.java:595)
  at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer
(StreamRemoteCall.java:247)
  at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
  at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
  at org.jboss.ha.framework.server.HARMIServerImpl_Stub.invoke(Unknown Source)
  at org.jboss.ha.framework.interfaces.HARMIClient Source code of org.jboss.ha.framework.interfaces.HARMIClient(HARMIClient.java
:153)
  at org.jboss.ha.framework.interfaces.HARMIClient Source code of org.jboss.ha.framework.interfaces.HARMIClient(HARMIClient.java:238)
  at $Proxy0.lookup(Unknown Source)
  at org.jnp.interfaces.NamingContext Source code of org.jnp.interfaces.NamingContext(NamingContext.java:610)
  at org.jnp.interfaces.NamingContext Source code of org.jnp.interfaces.NamingContext(NamingContext.java:572)
  at javax.naming.InitialContext Source code of javax.naming.InitialContext(InitialContext.java:347)
  at test.SimpleJNDIClient.main(SimpleJNDIClient.java:26)

We are very mystefied at what the difference might be? Can someone please
illuminate us as to what might be going on?

Thanks!

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic
&p=4065112#4065112

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode
=reply&p=4065112
__ ____ ____ ____ ____ ____ ____ ____ ____ ____
jboss-user mailing list
jboss-user@(protected)
https://lists.jboss.org/mailman/listinfo/jboss-user

©2008 junlu.com - Jax Systems, LLC, U.S.A.