Re: jndi exceptions

Tim Anderson <[email protected]> Fri, 04 May 2007 23:41:39 +1000
Newsgroups gmane.comp.java.openjms.user
Message-ID <[email protected]>
Found the problem, but need to do some more testing.
You can work around it by establishing the initial connection in a 
single thread.
The issue is being triggered by multiple threads accessing the 
connection as it is being set up.

-Tim


> Michael Masters wrote:
>   
>> I've attached a file with the code I've been running. Sometimes the
>> code will work without any issues, but it seems to randomly have the
>> exception I mentioned earlier. The version I'm using is OpenJMS
>> 0.7.7-alpha-3.
>>
>> Thanks,
>> Mike
>>
>> On 4/9/07, Tim Anderson <[email protected]> wrote:
>>     
>>> It means that the connection to the server has been unexpectedly lost.
>>> Can you send a minimal test case which reproduces the problem,
>>> and indicate which version you are running?
>>>
>>> Thanks,
>>>
>>> -Tim
>>>
>>> Michael Masters wrote:
>>>       
>>>> I have a little test program where I have a sender thread and several
>>>> listener threads. I seem to randomly get the following exception:
>>>>
>>>> javax.naming.ServiceUnavailableException: Connection lost [Root
>>>> exception is org.exolab.jms.net.connector.ResourceException:
>>>> Connection lost]
>>>>       at 
>>>>         
>>> org.exolab.jms.jndi.InitialContextFactory.getInitialContext(InitialContextFactory.java:177) 
>>>
>>>       
>>>>       at 
>>>>         
>>> javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
>>>       
>>>>       at 
>>>>         
>>> javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
>>>       
>>>>       at javax.naming.InitialContext.init(InitialContext.java:219)
>>>>       at javax.naming.InitialContext.<init>(InitialContext.java:175)
>>>>       at com.ibm.ptest.jms.Listener.run(Listener.java:49)
>>>> Caused by: org.exolab.jms.net.connector.ResourceException: 
>>>>         
>>> Connection lost
>>>       
>>>>       at 
>>>>         
>>> org.exolab.jms.net.multiplexer.MultiplexedManagedConnection.invoke(MultiplexedManagedConnection.java:354) 
>>>
>>>       
>>>>       at 
>>>>         
>>> org.exolab.jms.net.multiplexer.MultiplexedConnection.invoke(MultiplexedConnection.java:86) 
>>>
>>>       
>>>>       at 
>>>>         
>>> org.exolab.jms.net.connector.ManagedConnectionHandle$ConnectionHandle.invoke(ManagedConnectionHandle.java:263) 
>>>
>>>       
>>>>       at 
>>>>         
>>> org.exolab.jms.net.orb.UnicastDelegate.invoke(UnicastDelegate.java:153)
>>>       
>>>>       at org.exolab.jms.net.proxy.Proxy.invoke(Proxy.java:102)
>>>>       at 
>>>>         
>>> org.exolab.jms.server.net.RemoteNamingProvider__Proxy.getNameParser(RemoteNamingProvider__Proxy.java:71) 
>>>
>>>       
>>>>       at 
>>>>         
>>> org.exolab.jms.jndi.InitialContextFactory.getInitialContext(InitialContextFactory.java:173) 
>>>
>>>       
>>>>       ... 5 more
>>>>
>>>>
>>>> Could someone explain to me what this means or how I can resolve it? I
>>>> assume one thread is unable to get the initial context while another
>>>> thread has a hold of it. Is this true?
>>>>
>>>> Thanks in advance,
>>>> Michael Masters
>>>>         

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/