RE: Failed to look up connection factory

"Tim Anderson" <[email protected]>
Newsgroups gmane.comp.java.openjms.user
Message-ID <[email protected]>
You need to specify the server host address in 
$OPENJMS_HOME/config/openjms.xml.

E.g:
  <ServerConfiguration host="192.168.30.108"/>

See http://openjms.sourceforge.net/config/reference.html#ServerConfiguration
for more details.
  
-Tim

> -----Original Message-----
> From: openjms-user-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org 
> [mailto:openjms-user-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org] On Behalf 
> Of Tim Squires
> Sent: Tuesday, 12 July 2005 8:55 PM
> To: [email protected]
> Subject: [openjms-user] Failed to look up connection factory
> 
> Hi,  My InitialContext connects OK when running on the same 
> computer as the OpenJMS server but run it on others, it 
> ignores the jndi.properties file.
> 
> I know it reads the jndi.properties file on the working 
> instance because it logs the details.  I've tried it on jdk 
> 1.4/1.5, windows, linux and BSD.  All fail part from the one 
> with the OpenJMS server.
> 
> output from working instance, i.e. same computer as OpenJMS server
> 
> ...........
> [INFO,Processor] Setting-up initial context...
> Provider URL = tcp://192.168.30.108:3035 Initial Context 
> Factory = org.exolab.jms.jndi.InitialContextFactory
> ...........
> 
> 
> The error shows
> 
> ........
> Failed to look up connection factory:
> javax.naming.ServiceUnavailableException: Failed to connect 
> to URI=tcp://127.0.0.1:3035/ [Root exception is
> org.exolab.jms.net.connector.ConnectException: Failed to 
> connect to URI=tcp://127.0.0.1:3035/] ........
> 
> 
> The jndi.properties file
> 
> ...........
> java.naming.provider.url=tcp://192.168.30.108:3035
> java.naming.factory.initial=org.exolab.jms.jndi.InitialContextFactory
> java.naming.security.principal=admin
> java.naming.security.credentials=openjms
> ...........
> 
> The code
> 
> ...........
> logger.info( "Setting-up initial context..." );
> 
> context = new InitialContext();
> 
> if ( logger.isInfoEnabled() )
> {
>     logger.info( "Provider URL = "
>         + context.getEnvironment().get( Context.PROVIDER_URL ) );
>     logger.info( "Initial Context Factory = "
>         + context.getEnvironment().get(
>     Context.INITIAL_CONTEXT_FACTORY ) ); }
> 
> // Look up the ConnectionFactory
> factory = (ConnectionFactory) context.lookup( FACTORYNAME ); 
> ...........
> 
> 
> Even if I try hard coding the jndi properties, the same thing happens:
> 
> ..........
> Hashtable properties = new Hashtable();
> properties.put( Context.PROVIDER_URL, 
> "tcp://192.168.30.108:3035/" ); properties.put( 
> Context.INITIAL_CONTEXT_FACTORY, 
> "org.exolab.jms.jndi.InitialContextFactory" ); context = new 
> InitialContext( properties ); ..........
> 
> Please help, it's getting a bit frustrating.
> 
> Thanks,
> Tim
> 
> 
> 
> --
> This message has been scanned for viruses and dangerous 
> content by OpenProtect(http://www.openprotect.com), and is 
> believed to be clean.
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by the 'Do More With Dual!' 
> webinar happening
> July 14 at 8am PDT/11am EDT. We invite you to explore the 
> latest in dual
> core and dual graphics technology at this free one hour event 
> hosted by HP, 
> AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
> _______________________________________________
> openjms-user mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/openjms-user
> 



-------------------------------------------------------
This SF.Net email is sponsored by the 'Do More With Dual!' webinar happening
July 14 at 8am PDT/11am EDT. We invite you to explore the latest in dual
core and dual graphics technology at this free one hour event hosted by HP, 
AMD, and NVIDIA.  To register visit http://www.hp.com/go/dualwebinar
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.