title: Problem in creation MDB Queue connection at Jboss StartUp
body: <p>I am not able to create a Queue connection in JBOSS4.2.3GA Version &amp; Java1.5, as I am using MDB as per the below details.</p>
  
  <p>I am putting this MDB in a jar file(named utsJar.jar) and copied it in deploy folder of JBOSS, In the test env. this MDB works well</p>
  
  <p>but in another env. [ env settings and jboss/java ver is same ] it is throwing error at jboss start up [attached below ]. I have searched</p>
  
  <p>for this error but couldn't find any solution till now; was there any issue of port confict or something related with configurations ?</p>
  
  <p>UTSMessageListner.java >></p>
  
  <pre><code>@MessageDriven(activationConfig =
  
  {
  
  @ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue"),
  
  @ActivationConfigProperty(propertyName="destination", propertyValue="queue/UTSQueue")
  
  })
  
  
  @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
  
  public class UTSMessageListner implements MessageListener
  
  {
  
  public void onMessage(Message msg)
  
  {
  
  ObjectMessage objmsg = (ObjectMessage) msg;
  
  try
  
  {
  
  UTSListVO utsMessageListVO = (UTSListVO) objmsg.getObject();
  
  
  if(utsMessageListVO.getUtsMessageList()!=null) {
  
  UtsWebServiceLogger.logMessage("UTSMessageListner:onMessage: SIZE Of UTSMessage List =[" +utsMessageListVO.getUtsMessageList().size() + "]");
  
  UTSDataLayerImpl.getInstance().insertUTSMessage(utsMessageListVO);
  
  }
  
  else {
  
  UtsWebServiceLogger.logMessage("UTSMessageListner:onMessage: Message List is NULL");
  
  }
  
  }
  
  catch (Exception ex)
  
  {
  
  UtsWebServiceLogger.logMessage("UTSMessageListner:onMessage: Error Receiving Message"+ExceptionUtility.getStackTrace(ex));
  
  }
  
  }
  
  }
  </code></pre>
  
  <p>[ I have also attached whole server.log as an attach] ///</p>
  
  <p>///////////////////////////////// Error Trace is Below while starting the server ///////////////////////////</p>
  
  <pre><code>2010-03-12 07:05:40,061 WARN  [org.jboss.ejb3.mdb.MessagingContainer] Could not find the queue destination-jndi-name=queue/UTSQueue
  2010-03-12 07:05:40,061 WARN  [org.jboss.ejb3.mdb.MessagingContainer] destination not found: queue/UTSQueue reason: javax.naming.NameNotFoundException: queue not bound
  2010-03-12 07:05:40,061 WARN  [org.jboss.ejb3.mdb.MessagingContainer] creating a new temporary destination: queue/UTSQueue
  2010-03-12 07:05:40,071 WARN  [org.jboss.system.ServiceController] Problem starting service jboss.j2ee:ear=uts.ear,jar=utsJar.jar,name=UTSMessageListner,service=EJB3
  java.lang.NullPointerException
  at org.jboss.mq.server.jmx.DestinationManager.createDestination(DestinationManager.java:336)
  at org.jboss.mq.server.jmx.DestinationManager.createQueue(DestinationManager.java:293)
  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:585)
  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  at org.jboss.ejb3.JmxClientKernelAbstraction.invoke(JmxClientKernelAbstraction.java:44)
  at org.jboss.ejb3.jms.DestinationManagerJMSDestinationFactory.createDestination(DestinationManagerJMSDestinationFactory.java:75)
  at org.jboss.ejb3.mdb.MessagingContainer.createTemporaryDestination(MessagingContainer.java:573)
  at org.jboss.ejb3.mdb.MessagingContainer.createDestination(MessagingContainer.java:512)
  at org.jboss.ejb3.mdb.MessagingContainer.innerCreateQueue(MessagingContainer.java:438)
  at org.jboss.ejb3.mdb.MessagingContainer.jmsCreate(MessagingContainer.java:400)
  at org.jboss.ejb3.mdb.MessagingContainer.innerStart(MessagingContainer.java:166)
  at org.jboss.ejb3.mdb.MessagingContainer.start(MessagingContainer.java:152)
  at org.jboss.ejb3.mdb.MDB.start(MDB.java:126)
  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:585)
  at org.jboss.ejb3.ServiceDelegateWrapper.startService(ServiceDelegateWrapper.java:103)
  at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
  at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
  at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:585)
  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
  at $Proxy0.start(Unknown Source)
  at org.jboss.system.ServiceController.start(ServiceController.java:417)
  at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:585)
  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
  at $Proxy53.start(Unknown Source)
  at org.jboss.ejb3.JmxKernelAbstraction.install(JmxKernelAbstraction.java:120)
  at org.jboss.ejb3.Ejb3Deployment.registerEJBContainer(Ejb3Deployment.java:301)
  at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:362)
  at org.jboss.ejb3.Ejb3Module.startService(Ejb3Module.java:91)
  at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
  at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
  at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:585)
  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
  at $Proxy0.start(Unknown Source)
  at org.jboss.system.ServiceController.start(ServiceController.java:417)
  at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:585)
  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
  at $Proxy33.start(Unknown Source)
  at org.jboss.ejb3.EJB3Deployer.start(EJB3Deployer.java:512)
  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:585)
  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
  at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
  at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
  at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
  at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:87)
  at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
  at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
  at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
  at $Proxy34.start(Unknown Source)
  at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
  at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
  at sun.reflect.GeneratedMethodAccessor20.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:585)
  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
  at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
  at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
  at $Proxy9.deploy(Unknown Source)
  at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
  at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
  at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
  at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:336)
  at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
  at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
  at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:585)
  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
  at $Proxy0.start(Unknown Source)
  at org.jboss.system.ServiceController.start(ServiceController.java:417)
  at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  at java.lang.reflect.Method.invoke(Method.java:585)
  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
  at $Proxy4.start(Unknown Source)
  at org.jboss.deployment.SARDeployer.start(SARDeployer.java:304)
  at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
  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:585)
  at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
  at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
  at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
  at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
  at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
  at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
  at $Proxy5.deploy(Unknown Source)
  at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
  at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
  at org.jboss.Main.boot(Main.java:200)
  at org.jboss.Main$1.run(Main.java:508)
  at java.lang.Thread.run(Thread.java:595)
  </code></pre>
  
  <hr>
  
  <p>Still I am not able to create Queue, this time error occured "Queue Already Exists", I have made entry in jboss-web.xml and jbossmq-destinations-service.xml. </p>
  
  <p>Strange thing is that in my developemnt enviornment i dont have any entries of Queue name in the files you mentioned instead of i have entry in application.xml file of my ear as follows - ></p>
  
  <p>utsJar.jar // Which contains utsMessageLister.class file</p>
  
  <p>which works fine for me in developemt enviourment and it will create a UtsQueue for me, but in other enviournment i am facing the issue.</p>
  
  <p>Please suggest &amp; thanks for your help.</p>