4 Replies Latest reply on Dec 30, 2008 3:04 AM by Juergen Zimmermann

    How to deploy *-ds.xml?

    Juergen Zimmermann Master

      Using JBoss 4.2.3 I had a SAR archive with a deployment file hska-ds.xml. Everything was working fine.

      Using JBoss 5.0 I created a toplevel JAR archive inside an EAR archive. The JAR archive just contains the former hska-ds.xml. However, I get this stacktrace. Any hint is appreciated!

      WARN [org.jboss.deployers.structure.spi.helpers.AbstractDeploymentContext] (main) Unable to register deployment mbean vfszip:/C:/Software/jboss/server/default/deploy/hska.ear/hskaDeploy.jar/hska-ds.xml
      javax.management.InstanceAlreadyExistsException: jboss.deployment:id="vfszip:/C:/Software/jboss/server/default/deploy/hska.ear/hskaDeploy.jar/hska-ds.xml",type=SubDeployment already registered.
       at org.jboss.mx.server.registry.BasicMBeanRegistry.add(BasicMBeanRegistry.java:767)
       at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:236)
       at sun.reflect.GeneratedMethodAccessor89.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       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)
       at org.jboss.deployers.structure.spi.helpers.AbstractDeploymentContext.registerMBeans(AbstractDeploymentContext.java:989)
       at org.jboss.deployers.structure.spi.helpers.AbstractDeploymentContext.registerMBeans(AbstractDeploymentContext.java:998)
       at org.jboss.deployers.structure.spi.helpers.AbstractDeploymentContext.registerMBeans(AbstractDeploymentContext.java:998)
       at org.jboss.deployers.structure.spi.helpers.AbstractDeploymentContext.postRegister(AbstractDeploymentContext.java:964)
       at org.jboss.mx.server.AbstractMBeanInvoker.invokePostRegister(AbstractMBeanInvoker.java:974)
       at org.jboss.mx.server.AbstractMBeanInvoker.postRegister(AbstractMBeanInvoker.java:681)
       at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:338)
       at sun.reflect.GeneratedMethodAccessor89.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       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)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.registerMBean(DeployersImpl.java:1602)
       at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:755)
       at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:545)
       at org.jboss.system.server.profileservice.ProfileServiceBootstrap.loadProfile(ProfileServiceBootstrap.java:304)
       at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:205)
       at org.jboss.bootstrap.AbstractServerImpl.start(AbstractServerImpl.java:405)
       at org.jboss.Main.boot(Main.java:209)
       at org.jboss.Main$1.run(Main.java:547)
       at java.lang.Thread.run(Thread.java:619)


        • 1. Re: How to deploy *-ds.xml?
          jaikiran pai Master

           

          javax.management.InstanceAlreadyExistsException: jboss.deployment:id="vfszip:/C:/Software/jboss/server/default/deploy/hska.ear/hskaDeploy.jar/hska-ds.xml",type=SubDeployment already registered.


          Are you sure the -ds.xml is not being deployed from some other place too? Can you post the entire console logs?

          • 2. Re: How to deploy *-ds.xml?
            Juergen Zimmermann Master

            There is no other place.

            Here is the console listing:

            2008-12-30 08:11:32,573 INFO [ServerImpl] Starting JBoss (Microcontainer)...
            2008-12-30 08:11:32,574 INFO [ServerImpl] Release ID: JBoss [Morpheus] 5.0.0.GA (build: SVNTag=JBoss_5_0_0_GA date=200812041714)
            2008-12-30 08:11:32,574 INFO [ServerImpl] Bootstrap URL: null
            2008-12-30 08:11:32,574 INFO [ServerImpl] Home Dir: C:\Software\jboss
            2008-12-30 08:11:32,574 INFO [ServerImpl] Home URL: file:/C:/Software/jboss/
            2008-12-30 08:11:32,575 INFO [ServerImpl] Library URL: file:/C:/Software/jboss/lib/
            2008-12-30 08:11:32,575 INFO [ServerImpl] Patch URL: null
            2008-12-30 08:11:32,575 INFO [ServerImpl] Common Base URL: file:/C:/Software/jboss/common/
            2008-12-30 08:11:32,575 INFO [ServerImpl] Common Library URL: file:/C:/Software/jboss/common/lib/
            2008-12-30 08:11:32,576 INFO [ServerImpl] Server Name: default
            2008-12-30 08:11:32,576 INFO [ServerImpl] Server Base Dir: C:\Software\jboss\server
            2008-12-30 08:11:32,576 INFO [ServerImpl] Server Base URL: file:/C:/Software/jboss/server/
            2008-12-30 08:11:32,576 INFO [ServerImpl] Server Config URL: file:/C:/Software/jboss/server/default/conf/
            2008-12-30 08:11:32,576 INFO [ServerImpl] Server Home Dir: C:\Software\jboss\server\default
            2008-12-30 08:11:32,576 INFO [ServerImpl] Server Home URL: file:/C:/Software/jboss/server/default/
            2008-12-30 08:11:32,576 INFO [ServerImpl] Server Data Dir: C:\Software\jboss\server\default\data
            2008-12-30 08:11:32,577 INFO [ServerImpl] Server Library URL: file:/C:/Software/jboss/server/default/lib/
            2008-12-30 08:11:32,577 INFO [ServerImpl] Server Log Dir: C:\Software\jboss\server\default\log
            2008-12-30 08:11:32,577 INFO [ServerImpl] Server Native Dir: C:\Software\jboss\server\default\tmp\native
            2008-12-30 08:11:32,577 INFO [ServerImpl] Server Temp Dir: C:\Software\jboss\server\default\tmp
            2008-12-30 08:11:32,577 INFO [ServerImpl] Server Temp Deploy Dir: C:\Software\jboss\server\default\tmp\deploy
            2008-12-30 08:11:33,116 INFO [ServerImpl] Starting Microcontainer, bootstrapURL=file:/C:/Software/jboss/server/default/conf/bootstrap.xml
            2008-12-30 08:11:33,569 INFO [VFSCacheFactory] Initializing VFSCache [org.jboss.virtual.plugins.cache.IterableTimedVFSCache]
            2008-12-30 08:11:33,576 INFO [VFSCacheFactory] Using VFSCache [IterableTimedVFSCache{lifetime=1800, resolution=60}]
            2008-12-30 08:11:33,837 INFO [CopyMechanism] VFS temp dir: C:\Software\jboss\server\default\tmp
            2008-12-30 08:11:33,844 INFO [ZipEntryContext] VFS force nested jars copy-mode is enabled.
            2008-12-30 08:11:34,928 INFO [ServerInfo] Java version: 1.6.0_11,Sun Microsystems Inc.
            2008-12-30 08:11:34,928 INFO [ServerInfo] Java VM: Java HotSpot(TM) Server VM 11.0-b16,Sun Microsystems Inc.
            2008-12-30 08:11:34,928 INFO [ServerInfo] OS-System: Windows Vista 6.0,x86
            2008-12-30 08:11:34,957 INFO [JMXKernel] Legacy JMX core initialized
            2008-12-30 08:11:37,116 INFO [ProfileServiceImpl] Loading profile: default from: org.jboss.system.server.profileservice.repository.SerializableDeploymentRepository@1988886(root=C:\Software\jboss\server, key=org.jboss.profileservice.spi.ProfileKey@143b82c3[domain=default,server=default,name=default])
            2008-12-30 08:11:37,117 INFO [ProfileImpl] Using repository:org.jboss.system.server.profileservice.repository.SerializableDeploymentRepository@1988886(root=C:\Software\jboss\server, key=org.jboss.profileservice.spi.ProfileKey@143b82c3[domain=default,server=default,name=default])
            2008-12-30 08:11:37,118 INFO [ProfileServiceImpl] Loaded profile: ProfileImpl@c37f31{key=org.jboss.profileservice.spi.ProfileKey@143b82c3[domain=default,server=default,name=default]}
            2008-12-30 08:11:38,787 INFO [org.jboss.web.WebService] (main) Using RMI server codebase: http://localhost:8083/
            2008-12-30 08:11:43,706 INFO [org.jboss.wsf.stack.jbws.NativeServerConfig] (main) JBoss Web Services - Stack Native Core
            2008-12-30 08:11:43,706 INFO [org.jboss.wsf.stack.jbws.NativeServerConfig] (main) 3.0.5.GA
            2008-12-30 08:11:46,424 WARN [org.jboss.deployers.structure.spi.helpers.AbstractDeploymentContext] (main) Unable to register deployment mbean vfszip:/C:/Software/jboss/server/default/deploy/hska.ear/hskaDeploy.jar/hska-ds.xml
            javax.management.InstanceAlreadyExistsException: jboss.deployment:id="vfszip:/C:/Software/jboss/server/default/deploy/hska.ear/hskaDeploy.jar/hska-ds.xml",type=SubDeployment already registered.
             at org.jboss.mx.server.registry.BasicMBeanRegistry.add(BasicMBeanRegistry.java:767)
             at org.jboss.mx.server.registry.BasicMBeanRegistry.registerMBean(BasicMBeanRegistry.java:236)
             ...


            • 3. Re: How to deploy *-ds.xml?
              jaikiran pai Master

              That looks strange. In the meantime, remove the -ds.xml from the jar and try placing it at the root of the ear and add a jboss-app.xml in the META-INF of the EAR with the following entry:

              <jboss-app>
              
               <module>
              
               <service>hska-ds.xml</service>
              
               </module>
              
              
              </jboss-app>