1 Reply Latest reply on Jun 18, 2010 6:49 AM by Simon Cigoj

    seam JMS jboss problem

    Simon Cigoj Newbie

      I'm new to Jboss messaging and i'm tring to establish a queue on jboss server on Mysql db


      My environment :
      jboss 5.1 AS
      jboss messaging (default shiped with jboss AS)
      Seam 2.2.0
      DB MySQL 5.1.36


      when I run the server the queue is created and looks ok, also the tables created in db are looking ok, but when I try to deploy a simple ear application I got the erorr (the full error is att the bottom of the post), I have only one xxx-persistence-service.xml actualy mysql-persistence-service.xml file on server with the correct DS, the porblem




      Caused by: java.lang.IllegalStateException: jboss.messaging.destination:name=videoQueue,service Queue is already installed






      my componentx.xml has this



      <jms:queue-connection queue-connection-factory-jndi-name="java:/JmsXA" />
      <jms:managed-queue-sender name="myQueueSender" queue-jndi-name="queue/videoQueue" />
      




      the data sorce looks like this :



         <local-tx-datasource>
            <jndi-name>SeamMDBDatasource</jndi-name>
            <use-java-context>true</use-java-context>
            <connection-url>jdbc:mysql://toliman.arctur.si:3306/seamMDB</connection-url>
            <driver-class>com.mysql.jdbc.Driver</driver-class>
            <user-name>root</user-name>
            <password>disnt12u</password>
         </local-tx-datasource>
      
      



      in the log it starst with the warning first an then folows the error :




      4:14:59,987 WARN  [AbstractDeploymentContext] Unable to register deployment mbean jboss.messaging.destination:name=videoQueue,service=Queue
      javax.management.InstanceAlreadyExistsException: jboss.deployment:id="jboss.messaging.destination:name=videoQueue,service=Queue",type=Component already registered.
           at org.jboss.mx.server.registry.BasicMBeanRegistry.add(BasicMBeanRegistry.java:756)
           at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:233)
           at sun.reflect.GeneratedMethodAccessor75.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
           at java.lang.reflect.Method.invoke(Unknown Source)
           at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:157)
           at org.jboss.mx.server.Invocation.dispatch(Invocation.java:96)
           at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:138)
           at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
           at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:140)
           at org.jboss.mx.server.Invocation.invoke(Invocation.java:90)
           at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
           at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:668)
           at org.jboss.mx.server.MBeanServerImpl$3.run(MBeanServerImpl.java:1431)
           at java.security.AccessController.doPrivileged(Native Method)
           at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:1426)
           at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:376)
      
      




      14:15:00,205 ERROR [AbstractKernelController] Error installing to Real: name=vfsfile:/C:/java/runtimes/jboss-5.1.0.GA/server/default/deploy/SeamMDB-ear.ear/ state=PreReal mode=Manual requiredState=Real
      org.jboss.deployers.spi.DeploymentException: Error deploying: jboss.messaging.destination:service=Queue,name=videoQueue
           at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
           at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:118)
           at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:46)
           at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62)
           at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:50)
           at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:171)
           at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1439)
           at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1157)
           at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1178)
           at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)
           at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1210)
           at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1098)
           at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
           at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
           at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
           at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
           at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
           at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
           at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
           at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:781)
           at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:702)
           at org.jboss.system.server.profileservice.repository.MainDeployerAdapter.process(MainDeployerAdapter.java:117)
           at org.jboss.system.server.profileservice.repository.ProfileDeployAction.install(ProfileDeployAction.java:70)
           at org.jboss.system.server.profileservice.repository.AbstractProfileAction.install(AbstractProfileAction.java:53)
           at org.jboss.system.server.profileservice.repository.AbstractProfileService.install(AbstractProfileService.java:361)
           at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:348)
           at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:1631)
           at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:934)
           at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1082)
           at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:984)
           at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:822)
           at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:553)
           at org.jboss.system.server.profileservice.repository.AbstractProfileService.activateProfile(AbstractProfileService.java:306)
           at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:271)
           at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:461)
           at org.jboss.Main.boot(Main.java:221)
           at org.jboss.Main$1.run(Main.java:556)
           at java.lang.Thread.run(Unknown Source)
      Caused by: java.lang.IllegalStateException: jboss.messaging.destination:name=videoQueue,service=Queue is already installed.
           at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:716)
           at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:540)
           at org.jboss.system.ServiceController.doInstall(ServiceController.java:670)
           at org.jboss.system.ServiceController.install(ServiceController.java:273)
           at org.jboss.system.deployers.ServiceDeployer.deploy(ServiceDeployer.java:90)
           ... 36 more     
      
      



        • 1. Re: seam JMS jboss problem
          Simon Cigoj Newbie

          Find the solution...I was trying with the wrong name pattrn with @Depends


          Add this annotation:




          @Depends( {"jboss.web.deployment:war=/myappname"} )





          Where myappname is the name of your app's warfile.  This will delay the initialization of the MDB until after Seam has finished initializing during the war deployment.


          Hope this helps someone