4 Replies Latest reply on Jul 7, 2005 8:19 AM by Darran Lofthouse

    Problem with JBossIDE Tutorial

    ?ukasz Kaleta Newbie

      J'am beginner in JBOSS and EJB. When I follow with tutorial and try to deplay Fibo application J receive the folowing error:
      Please help me :(

      22:53:25,203 INFO [EARDeployer] Init J2EE application: file:/C:/Apps/jboss-4.0.1sp1/server/default/deploy/FiboApp.ear
      22:53:25,265 INFO [EARDeployment] Registration is not done -> stop
      22:53:25,281 ERROR [MainDeployer] Could not initialise deployment: file:/C:/Apps/jboss-4.0.1sp1/server/default/deploy/FiboApp.ear
      org.jboss.deployment.DeploymentException: Error in accessing application metadata: ; - nested throwable: (javax.management.InstanceAlreadyExistsException: jboss.j2ee:service=EARDeployment,url='FiboApp.ear' already registered.)
      at org.jboss.deployment.EARDeployer.init(EARDeployer.java:270)
      at org.jboss.deployment.MainDeployer.init(MainDeployer.java:828)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:765)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:738)
      at sun.reflect.GeneratedMethodAccessor48.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:144)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:122)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
      at $Proxy8.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:305)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:481)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:204)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:215)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:194)
      Caused by: javax.management.InstanceAlreadyExistsException: jboss.j2ee:service=EARDeployment,url='FiboApp.ear' already registered.
      at org.jboss.mx.server.registry.BasicMBeanRegistry.add(BasicMBeanRegistry.java:755)
      at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:211)
      at sun.reflect.GeneratedMethodAccessor1.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:144)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:122)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:249)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
      at org.jboss.mx.server.MBeanServerImpl$3.run(MBeanServerImpl.java:1397)
      at java.security.AccessController.doPrivileged(Native Method)
      at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:1392)
      at org.jboss.mx.server.MBeanServerImpl.registerMBean(MBeanServerImpl.java:359)
      at org.jboss.deployment.EARDeployer.init(EARDeployer.java:262)
      ... 21 more

        • 1. Re: Problem with JBossIDE Tutorial
          Darran Lofthouse Master

          This is a bug with JBoss that should hopefully have been fixed for the next release.

          When you deploy an ear it is registered as part of the deployment process. When you undeploy it the ear should be unregistered.

          If you deploy the ear and verification fails the ear is not unregistered when you undeploy it, this means that for all subequent deployments even if they are valid you will get the error you are getting now.

          For the moment the simplest workaround is to restart JBoss or alternatively try deploying the ear with a different name.

          • 2. Re: Problem with JBossIDE Tutorial
            ?ukasz Kaleta Newbie

            But I don't now how to deploy any application, this is my first time in this subject :(

            • 3. Re: Problem with JBossIDE Tutorial
              karthik karthik Newbie

              Hi
              Interesting ,I too got the same Error for the first deployment (of course on win 2000) with JBOSS4.02 and Eclipse IDE 3.01.

              My Hacking way was to Search the '/JBOSS4/server/default/deploy'

              for all 'Fibo.ear' and delete the same, Restart the Jboss4 for cleanup Startup.


              Hope this works with u guys.


              karthik

              • 4. Re: Problem with JBossIDE Tutorial
                Darran Lofthouse Master

                Deployment with JBoss is simply the process of copying the FibboApp.ear to the server/default/deploy folder, JBoss will recognise the archive and deploy its contents.

                When following the JBoss-IDE tutorial (Chapter 11) this is what it does for you when you.

                As karthik says, remove all instances of FibboApp.ear from the deploy folder and restart JBoss. Then when you try and deploy see if there are any different deployment errors.