[jboss-user] [JNDI and Naming] - datasource not bound?
frh10 ff
do-not-reply at jboss.com
Mon Dec 27 22:42:22 EST 2010
frh10 ff [http://community.jboss.org/people/frh10] created the discussion
"datasource not bound?"
To view the discussion, visit: http://community.jboss.org/message/577688#577688
--------------------------------------------------------------
Hi !
I use jboss5.1.0.GA and set a datasource in it.I can get connections with lookup this datasource(context.lookup("java:/MSSQLDS")) in standalone application(MSSQLDS works well),but when i put the same code to MDB to lookup this datasource and deploy it,jboss throw a error:MSSQLDS not bound.Here is the log.
2010-12-28 09:29:55,339 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) javax.naming.NameNotFoundException: MSSQLDS not bound
2010-12-28 09:29:55,339 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at org.jnp.server.NamingServer.getBinding(NamingServer.java:771)
2010-12-28 09:29:55,339 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at org.jnp.server.NamingServer.getBinding(NamingServer.java:779)
2010-12-28 09:29:55,340 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at org.jnp.server.NamingServer.getObject(NamingServer.java:785)
2010-12-28 09:29:55,340 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at org.jnp.server.NamingServer.lookup(NamingServer.java:443)
2010-12-28 09:29:55,340 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:726)
2010-12-28 09:29:55,340 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686)
2010-12-28 09:29:55,341 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at javax.naming.InitialContext.lookup(InitialContext.java:392)
2010-12-28 09:29:55,341 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at ejb.SelectMDB.onMessage(SelectMDB.java:54)
2010-12-28 09:29:55,341 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2010-12-28 09:29:55,341 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
2010-12-28 09:29:55,341 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2010-12-28 09:29:55,342 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at java.lang.reflect.Method.invoke(Method.java:597)
2010-12-28 09:29:55,342 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at org.jboss.aop.joinpoint.MethodInvocation.invokeTarget(MethodInvocation.java:122)
2010-12-28 09:29:55,342 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111)
2010-12-28 09:29:55,342 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at org.jboss.ejb3.EJBContainerInvocationWrapper.invokeNext(EJBContainerInvocationWrapper.java:69)
2010-12-28 09:29:55,342 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.invoke(InterceptorSequencer.java:73)
2010-12-28 09:29:55,343 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.aroundInvoke(InterceptorSequencer.java:59)
2010-12-28 09:29:55,343 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
2010-12-28 09:29:55,343 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
2010-12-28 09:29:55,343 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
2010-12-28 09:29:55,343 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at java.lang.reflect.Method.invoke(Method.java:597)
2010-12-28 09:29:55,343 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at org.jboss.aop.advice.PerJoinpointAdvice.invoke(PerJoinpointAdvice.java:174)
2010-12-28 09:29:55,343 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
2010-12-28 09:29:55,344 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.fillMethod(InvocationContextInterceptor.java:72)
2010-12-28 09:29:55,344 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_fillMethod_22116759.invoke(InvocationContextInterceptor_z_fillMethod_22116759.java)
2010-12-28 09:29:55,344 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
2010-12-28 09:29:55,344 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.setup(InvocationContextInterceptor.java:88)
2010-12-28 09:29:55,344 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_setup_22116759.invoke(InvocationContextInterceptor_z_setup_22116759.java)
2010-12-28 09:29:55,345 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
2010-12-28 09:29:55,345 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at org.jboss.ejb3.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:62)
2010-12-28 09:29:55,345 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
2010-12-28 09:29:55,345 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:56)
2010-12-28 09:29:55,346 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
2010-12-28 09:29:55,346 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
2010-12-28 09:29:55,346 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
2010-12-28 09:29:55,346 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
2010-12-28 09:29:55,347 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
2010-12-28 09:29:55,347 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:68)
2010-12-28 09:29:55,347 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
2010-12-28 09:29:55,347 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
2010-12-28 09:29:55,347 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:194)
2010-12-28 09:29:55,348 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
2010-12-28 09:29:55,348 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
2010-12-28 09:29:55,348 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
2010-12-28 09:29:55,348 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.java:80)
2010-12-28 09:29:55,348 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
2010-12-28 09:29:55,349 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:67)
2010-12-28 09:29:55,349 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
2010-12-28 09:29:55,349 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)
2010-12-28 09:29:55,349 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
2010-12-28 09:29:55,349 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at org.jboss.ejb3.mdb.MessagingContainer.localInvoke(MessagingContainer.java:282)
2010-12-28 09:29:55,350 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.delivery(MessageInflowLocalProxy.java:270)
2010-12-28 09:29:55,350 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.invoke(MessageInflowLocalProxy.java:140)
2010-12-28 09:29:55,350 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at $Proxy302.onMessage(Unknown Source)
2010-12-28 09:29:55,350 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at org.hornetq.ra.inflow.HornetQMessageHandler.onMessage(HornetQMessageHandler.java:256)
2010-12-28 09:29:55,351 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at org.hornetq.core.client.impl.ClientConsumerImpl.callOnMessage(ClientConsumerImpl.java:822)
2010-12-28 09:29:55,351 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at org.hornetq.core.client.impl.ClientConsumerImpl.access$100(ClientConsumerImpl.java:46)
2010-12-28 09:29:55,351 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at org.hornetq.core.client.impl.ClientConsumerImpl$Runner.run(ClientConsumerImpl.java:940)
2010-12-28 09:29:55,351 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at org.hornetq.utils.OrderedExecutorFactory$OrderedExecutor$1.run(OrderedExecutorFactory.java:100)
2010-12-28 09:29:55,351 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
2010-12-28 09:29:55,352 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
2010-12-28 09:29:55,352 ERROR [STDERR] (Thread-3 (group:HornetQ-client-global-threads-10422804)) at java.lang.Thread.run(Thread.java:619)
2010-12-28 09:29:55,400 ERROR [org.jboss.aspects.tx.TxPolicy] (Thread-3 (group:HornetQ-client-global-threads-10422804)) javax.ejb.EJBTransactionRolledbackException
2010-12-28 09:29:55,401 ERROR [org.hornetq.ra.inflow.HornetQMessageHandler] (Thread-3 (group:HornetQ-client-global-threads-10422804)) Failed to deliver message
javax.ejb.EJBTransactionRolledbackException
at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:115)
at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:130)
at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:194)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.java:80)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:67)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.mdb.MessagingContainer.localInvoke(MessagingContainer.java:282)
at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.delivery(MessageInflowLocalProxy.java:270)
at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.invoke(MessageInflowLocalProxy.java:140)
at $Proxy302.onMessage(Unknown Source)
at org.hornetq.ra.inflow.HornetQMessageHandler.onMessage(HornetQMessageHandler.java:256)
at org.hornetq.core.client.impl.ClientConsumerImpl.callOnMessage(ClientConsumerImpl.java:822)
at org.hornetq.core.client.impl.ClientConsumerImpl.access$100(ClientConsumerImpl.java:46)
at org.hornetq.core.client.impl.ClientConsumerImpl$Runner.run(ClientConsumerImpl.java:940)
at org.hornetq.utils.OrderedExecutorFactory$OrderedExecutor$1.run(OrderedExecutorFactory.java:100)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NullPointerException
at ejb.SelectMDB.onMessage(SelectMDB.java:70)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.aop.joinpoint.MethodInvocation.invokeTarget(MethodInvocation.java:122)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111)
at org.jboss.ejb3.EJBContainerInvocationWrapper.invokeNext(EJBContainerInvocationWrapper.java:69)
at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.invoke(InterceptorSequencer.java:73)
at org.jboss.ejb3.interceptors.aop.InterceptorSequencer.aroundInvoke(InterceptorSequencer.java:59)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.aop.advice.PerJoinpointAdvice.invoke(PerJoinpointAdvice.java:174)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.fillMethod(InvocationContextInterceptor.java:72)
at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_fillMethod_22116759.invoke(InvocationContextInterceptor_z_fillMethod_22116759.java)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.setup(InvocationContextInterceptor.java:88)
at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_setup_22116759.invoke(InvocationContextInterceptor_z_setup_22116759.java)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:62)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:56)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:68)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
... 22 more
How can i solve this error?Thands!
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/577688#577688]
Start a new discussion in JNDI and Naming at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2083]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20101227/00cfb01f/attachment-0001.html
More information about the jboss-user
mailing list