You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by pradeep <pr...@gmail.com> on 2006/08/30 09:32:47 UTC

jboss problem - namenotfound

I have integrated activemq with Jboss app server. 

>From the client I am trying to do ConnectionFactory lookup.
cf = (ConnectionFactory)ic.lookup("activemq/QueueConnectionFactory");



javax.naming.NameNotFoundException: QueueConnectionFactory not bound
    at org.jnp.server.NamingServer.getBinding(NamingServer.java:514)
    at org.jnp.server.NamingServer.getBinding(NamingServer.java:522)
    at org.jnp.server.NamingServer.getObject(NamingServer.java:528)
    at org.jnp.server.NamingServer.lookup(NamingServer.java:281)
    at org.jnp.server.NamingServer.lookup(NamingServer.java:255)
    at sun.reflect.GeneratedMethodAccessor70.invoke(Unknown Source)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(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.doPrivileged(Native Method)
    at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
    at
sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
    at
sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
    at java.lang.Thread.run(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:126)
    at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)

-- 
View this message in context: http://www.nabble.com/jboss-problem---namenotfound-tf2188216.html#a6053819
Sent from the ActiveMQ - User forum at Nabble.com.


Re: jboss problem - namenotfound

Posted by Adrian Co <ac...@exist.com>.
My bad.

If you're gonna run an AMQ client outside JBoss, I don't think you can 
use the same JNDI resources that are declared in JBoss. Either 
programmatically create a connection factory in your client:
ActiveMQConnectionFactory f = new 
ActiveMQConnectionFactory("tcp://localhost:61616");

or use a jndi.properties file. More info here: 
http://www.activemq.org/site/jndi-support.html

pradeep wrote:
> My client was running outside of Jboss and I think that the connection
> objects are not accessible outside of jboss. :(
>
>
> Adrian Co wrote:
>   
>> Hi,
>>
>> Here's some example of some mdb in jboss:
>> http://svn.apache.org/viewvc/incubator/activemq/trunk/systest/jboss-test/src/main/jboss-datasource/panacya-jms-ds.xml?view=co
>> http://svn.apache.org/viewvc/incubator/activemq/trunk/systest/jboss-test/src/main/java/com/panacya/platform/service/bus/sender/SenderBean.java?view=co
>>
>> Try using "java:comp/env/jms/MyQueueConnectionFactory" if it works for 
>> you. :)
>>
>>
>> pradeep wrote:
>>     
>>> I have integrated activemq with Jboss app server. 
>>>
>>> >From the client I am trying to do ConnectionFactory lookup.
>>> cf = (ConnectionFactory)ic.lookup("activemq/QueueConnectionFactory");
>>>
>>>
>>>
>>> javax.naming.NameNotFoundException: QueueConnectionFactory not bound
>>>     at org.jnp.server.NamingServer.getBinding(NamingServer.java:514)
>>>     at org.jnp.server.NamingServer.getBinding(NamingServer.java:522)
>>>     at org.jnp.server.NamingServer.getObject(NamingServer.java:528)
>>>     at org.jnp.server.NamingServer.lookup(NamingServer.java:281)
>>>     at org.jnp.server.NamingServer.lookup(NamingServer.java:255)
>>>     at sun.reflect.GeneratedMethodAccessor70.invoke(Unknown Source)
>>>     at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>>     at java.lang.reflect.Method.invoke(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.doPrivileged(Native Method)
>>>     at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
>>>     at
>>> sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
>>>     at
>>> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
>>>     at java.lang.Thread.run(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:126)
>>>     at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
>>>
>>>   
>>>       
>>
>>     
>
>   


Re: jboss problem - namenotfound

Posted by pradeep <pr...@gmail.com>.
My client was running outside of Jboss and I think that the connection
objects are not accessible outside of jboss. :(


Adrian Co wrote:
> 
> Hi,
> 
> Here's some example of some mdb in jboss:
> http://svn.apache.org/viewvc/incubator/activemq/trunk/systest/jboss-test/src/main/jboss-datasource/panacya-jms-ds.xml?view=co
> http://svn.apache.org/viewvc/incubator/activemq/trunk/systest/jboss-test/src/main/java/com/panacya/platform/service/bus/sender/SenderBean.java?view=co
> 
> Try using "java:comp/env/jms/MyQueueConnectionFactory" if it works for 
> you. :)
> 
> 
> pradeep wrote:
>> I have integrated activemq with Jboss app server. 
>>
>> >From the client I am trying to do ConnectionFactory lookup.
>> cf = (ConnectionFactory)ic.lookup("activemq/QueueConnectionFactory");
>>
>>
>>
>> javax.naming.NameNotFoundException: QueueConnectionFactory not bound
>>     at org.jnp.server.NamingServer.getBinding(NamingServer.java:514)
>>     at org.jnp.server.NamingServer.getBinding(NamingServer.java:522)
>>     at org.jnp.server.NamingServer.getObject(NamingServer.java:528)
>>     at org.jnp.server.NamingServer.lookup(NamingServer.java:281)
>>     at org.jnp.server.NamingServer.lookup(NamingServer.java:255)
>>     at sun.reflect.GeneratedMethodAccessor70.invoke(Unknown Source)
>>     at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>     at java.lang.reflect.Method.invoke(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.doPrivileged(Native Method)
>>     at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
>>     at
>> sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
>>     at
>> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
>>     at java.lang.Thread.run(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:126)
>>     at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
>>
>>   
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/jboss-problem---namenotfound-tf2188216.html#a6056093
Sent from the ActiveMQ - User forum at Nabble.com.


Re: jboss problem - namenotfound

Posted by Adrian Co <ac...@exist.com>.
Hi,

Here's some example of some mdb in jboss:
http://svn.apache.org/viewvc/incubator/activemq/trunk/systest/jboss-test/src/main/jboss-datasource/panacya-jms-ds.xml?view=co
http://svn.apache.org/viewvc/incubator/activemq/trunk/systest/jboss-test/src/main/java/com/panacya/platform/service/bus/sender/SenderBean.java?view=co

Try using "java:comp/env/jms/MyQueueConnectionFactory" if it works for 
you. :)


pradeep wrote:
> I have integrated activemq with Jboss app server. 
>
> >From the client I am trying to do ConnectionFactory lookup.
> cf = (ConnectionFactory)ic.lookup("activemq/QueueConnectionFactory");
>
>
>
> javax.naming.NameNotFoundException: QueueConnectionFactory not bound
>     at org.jnp.server.NamingServer.getBinding(NamingServer.java:514)
>     at org.jnp.server.NamingServer.getBinding(NamingServer.java:522)
>     at org.jnp.server.NamingServer.getObject(NamingServer.java:528)
>     at org.jnp.server.NamingServer.lookup(NamingServer.java:281)
>     at org.jnp.server.NamingServer.lookup(NamingServer.java:255)
>     at sun.reflect.GeneratedMethodAccessor70.invoke(Unknown Source)
>     at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>     at java.lang.reflect.Method.invoke(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.doPrivileged(Native Method)
>     at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
>     at
> sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
>     at
> sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
>     at java.lang.Thread.run(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:126)
>     at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
>
>