Re: JNDI Problem
"Zarar Siddiqi" <[email protected]> Tue, 11 Apr 2006 14:49:17 -0400
| Newsgroups | gmane.comp.java.openjms.user |
|---|---|
| Message-ID | <[email protected]> |
Did you try connecting by IP instead of hostname? On 4/11/06, Dave Pederson <[email protected]> wrote: > 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(SimpleQueueSender.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 more > Caused by: org.exolab.jms.net.connector.ResourceException: > Failed to connect to turing:3035 > at > org.exolab.jms.net.socket.SocketManagedConnection.createSocketProtected(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.createManagedConnection(TCPManagedConnectionFactory.java:98) > at > org.exolab.jms.net.connector.DefaultConnectionPool.createManagedConnection(DefaultConnectionPool.java > :221) > at > org.exolab.jms.net.connector.AbstractConnectionManager.allocateConnection(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 > ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642