RE: Re: JNDI Problem
"Tim Anderson" <[email protected]> Thu, 4 May 2006 18:08:35 +1000
| Newsgroups | gmane.comp.java.openjms.user |
|---|---|
| Message-ID | <[email protected]> |
The root exception is missing from the stack trace.
Can the remote server be pinged from the client?
You can get more information by configuring log4j in the client app
(http://openjms.sourceforge.net/faq.html#logging-log4j-client)
for the SocketManagedConnection logger. E.g
# log4j.properties
#
# For the general syntax of property based configuration files see
# the documenation of org.apache.log4j.PropertyConfigurator.
# STDOUT is set to be a ConsoleAppender which outputs to System.out.
log4j.appender.STDOUT=org.apache.log4j.ConsoleAppender
# STDOUT uses PatternLayout.
log4j.appender.STDOUT.layout=org.apache.log4j.PatternLayout
log4j.appender.STDOUT.layout.ConversionPattern=%d{HH:mm:ss.SSS} %-5p [%t] -
%m%n
# Set the priority of the category named
"org.exolab.jms.net.socket.SocketManagedConnection " to
# Priority.DEBUG, attach appender
STDOUT.log4j.category.org.exolab.jms.net.socket.SocketManagedConnection=DEBU
G, STDOUT
# Set the priority of the category named "org.exolab.jms" to
# Priority.WARN, attach appender STDOUT.
log4j.category.org.exolab.jms=WARN, STDOUT
-Tim
> -----Original Message-----
> From: openjms-user-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> [mailto:openjms-user-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org] On Behalf
> Of jay shankar
> Sent: Wednesday, 3 May 2006 7:15 PM
> To: [email protected]
> Subject: [openjms-user] Re: JNDI Problem
>
> Dave Pederson <dave.pederson@...> writes:
>
> >
> > Hello-I am having problem sending messages to a Queue from a Client
> > that
> exists on a separate computer that the OpenJMS Server. The
> issue shown in the stack trace seems to indicate there is a
> JNDI problem. Here is my OpenJMS information.
> > --------I am using OpenJMS version
> 0.7.7-alpha-3--------Here is my
> > error
> message: javax.naming.CommunicationException: Failed to get
> registry service for URL: tcp://turing:3035/ [Root exception is
> > java.rmi.ConnectIOException: Failed to create connection; nested
> > exception
> is: org.exolab.jms.net.connector.ResourceException:
> Failed to connect to turing:3035] at
> org.exolab.jms.jndi.InitialContextFactory.getInitialContext
> > (InitialContextFactory.java:146) at
> javax.naming.spi.NamingManager.getInitialContext
> (NamingManager.java:667) at
> javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
> at javax.naming.InitialContext.init
> > (InitialContext.java:223) at
> javax.naming.InitialContext.<init>
> (InitialContext.java:197) at
> net.nighthawk.jms.queue.send.SimpleQueueSender.main(SimpleQueu
> eSender.java:42)
> Caused by: java.rmi.ConnectIOException
> > : Failed to create connection; nested exception is:
> org.exolab.jms.net.connector.ResourceException: Failed to connect to
> turing:3035 at org.exolab.jms.net.orb.Locator.getProxy
> (Locator.java:137) at
> >
> org.exolab.jms.net.orb.Locator.getRegistry(Locator.java:103) at
> org.exolab.jms.net.orb.DefaultORB.getRegistry(DefaultORB.java:
> 267) at
> org.exolab.jms.client.net.SharedORB.getRegistry(SharedORB.java:121)
> > at
> org.exolab.jms.jndi.InitialContextFactory.getInitialContext
> (InitialContextFactory.java:144) ... 5 moreCaused by:
> org.exolab.jms.net.connector.ResourceException: Failed to connect to
> turing:3035
> > at
> org.exolab.jms.net.socket.SocketManagedConnection.createSocket
> Protected
> (SocketManagedConnection.java:268) at
> org.exolab.jms.net.socket.SocketManagedConnection.createSocket
> (SocketManagedConnection.java
> > :182) at
> > org.exolab.jms.net.socket.SocketManagedConnection.<init>
> (SocketManagedConnection.java:114) at
> org.exolab.jms.net.tcp.TCPManagedConnection.<init>
> (TCPManagedConnection.java:75)
> > at
> org.exolab.jms.net.tcp.TCPManagedConnectionFactory.createManag
> edConnection
> (TCPManagedConnectionFactory.java:98) at
> org.exolab.jms.net.connector.DefaultConnectionPool.createManag
> edConnection
> (DefaultConnectionPool.java
> > :221) at
> org.exolab.jms.net.connector.AbstractConnectionManager.allocat
> eConnection
> (AbstractConnectionManager.java:140) at
> org.exolab.jms.net.connector.AbstractConnectionFactory.getConnection
> (AbstractConnectionFactory.java
> > :167) at
> org.exolab.jms.net.connector.AbstractConnectionManager.getConnection
> (AbstractConnectionManager.java:208) at
> org.exolab.jms.net.orb.Locator.getProxy(Locator.java:131)
> ... 9 more
> > --------I am using the tcp connector as follows:
> Hashtable<String, String> env = new Hashtable<String,
> String>(); env.put(Context.SECURITY_CREDENTIALS, "rhapsody");
> > env.put(Context.SECURITY_PRINCIPAL, "rhapsody");
> env.put
> (Context.INITIAL_CONTEXT_FACTORY,
> "org.exolab.jms.jndi.InitialContextFactory");
> env.put(Context.PROVIDER_URL
> > , "tcp://turing:3035/"); Context jndiContext = new
> > InitialContext
> (env); // Here is where the exception gets thrown...
> > --------Here are the contents of my configuration file on
> the turing
> > OpenJMS
> server:<?xml version="1.0"?><Configuration>
> <ServerConfiguration host="turing" embeddedJNDI="true" />
> > <Connectors> <Connector scheme="tcp">
> <ConnectionFactories>
> <ConnectionFactory name="ConnectionFactory" />
> </ConnectionFactories>
> > </Connector> <Connector scheme="rmi">
> <ConnectionFactories> <QueueConnectionFactory
> name="JmsQueueConnectionFactory" />
> <TopicConnectionFactory name="JmsTopicConnectionFactory" />
> > </ConnectionFactories> </Connector> </Connectors>
> <DatabaseConfiguration> <RdbmsDatabaseConfiguration
> driver="org.apache.derby.jdbc.EmbeddedDriver
> > " url="jdbc:derby:openjmsdb;create=true" user="openjms"
> password="openjms"/> </DatabaseConfiguration>
> <AdminConfiguration script="${
> > openjms.home}\bin\startup.bat" /> <SecurityConfiguration
> securityEnabled="true"> <Users> <User name="rhapsody"
> password="rhapsody" /> </Users>
> > </Configuration>Does my problem have to do with the fact that I am
> > using
> embedded jndi on the OpenJMS server? If so, do you reccomend
> any external JNDIproviders that I could use? I have also
> tried the external setting examples given in the OpenJMS
> administration guide, but they did not work.
> > Thanks for your time.-Dave
>
>
>
>
>
>
> -------------------------------------------------------
> Using Tomcat but need to do more? Need to support web
> services, security?
> Get stuff done quickly with pre-integrated technology to make
> your job easier Download IBM WebSphere Application Server
> v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&
> dat=121642
> _______________________________________________
> openjms-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/openjms-user
>
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0709&bid&3057&dat1642