8 Replies Latest reply on Dec 18, 2008 10:37 AM by clebert.suconic

    JBoss 5.0.0.GA on MySQL, migration problem

    raczer

      I tried to migrate my app from 4.2.3 (with new messaging), to 5.0.0GA, both on mysql. The app havily relies on queues, and JMS also uses mysql for persistence.

      Now, raw JBoss has messaging on Hypersonic, and this starts ok. But when configured with the "mysql-persistence-service.xml", which I took from examples, I get this error:

      ERROR [ProfileServiceBootstrap] start: Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

      *** CONTEXTS MISSING DEPENDENCIES: Name -> Dependency{Required State:Actual State}

      jboss.messaging.connectionfactory:service=ClusterPullConnectionFactory
      -> jboss.messaging:service=PostOffice{Create:Configured}

      jboss.messaging.connectionfactory:service=ClusteredConnectionFactory
      -> jboss.messaging:service=PostOffice{Create:Configured}

      jboss.messaging.connectionfactory:service=ConnectionFactory
      -> jboss.messaging:service=PostOffice{Create:Configured}

      jboss.messaging.destination:name=DLQ,service=Queue
      -> jboss.messaging:service=PostOffice{Create:Configured}

      jboss.messaging.destination:name=ExpiryQueue,service=Queue
      -> jboss.messaging:service=PostOffice{Create:Configured}

      other queues follow...



      Seems like the PostOffice has a problem to start, don't know why, as there are no errors before that. I also removed any deployed ear's of my app, to see the source of the problem.
      At this point I have no clue. Please help.

        • 1. Re: JBoss 5.0.0.GA on MySQL, migration problem
          peterj

          Configuring messaging to use MySQL instead of Hypersonic is a multi-step process. I imagine you missed a step or two. Here are the steps (hope it didn't forget any):

          1) Place the JDBC JAR file into the server/xx/lib directory
          2) Remove server/xxx/deploy/messaging/hsqldb-persistence-service.xml file
          3) Copy mysql-persistence-service.xml to server/xxx/deploy/messaging/
          4) If you don't need clustering, in mysql-persistence-service.xml set "Clustered" to false and comment out the "ChannelFactoryName" attribute.

          Are you still using DefaultDS as the data source for messaging? If not, also add these steps:

          4) Create a *-ds.xml file for your data source
          5) Change DefaultDS to your data source name in mysql-persistence-service.xml (there are 6 locations)


          Also, did you see this:

          SEE PREVIOUS ERRORS FOR DETAILS


          What you posted is the deployment report which rarely contains any information on why things went wrong. Earlier in the console log there should be exception stack traces, with the first one being the most important. If the above instructions do not solve the problem, find and post that first exception (you might ave to increase the buffer size on your terminal window to prevent the exception from scrolling off the buffer).

          • 2. Re: JBoss 5.0.0.GA on MySQL, migration problem
            raczer

            Thanks PeterJ, I've done all these steps before with JBoss 4.2.2 and 4.2.3 (most of them is done by the build process). The only difference is that I have 2 data sources, so that JBM has DefaultDS, and the app has another. That always worked fine.
            The only exceptions I can see in logs are reported as DEBUG. I see lots of these:

            13:36:46,437 DEBUG [BeanMetaDataICF] Failed to get property value for bean: org.jboss.beans.metadata.plugins.AbstractBeanMetaData, property: properties
            java.lang.IllegalArgumentException: Property is not readable: propertyReplace for org.jboss.beans.metadata.plugins.AbstractPropertyMetaData
             at org.jboss.beans.info.plugins.DefaultPropertyInfo.get(DefaultPropertyInfo.java:131)
             at org.jboss.beans.info.plugins.BeanInfoUtil.getNestedTarget(BeanInfoUtil.java:78)
             at org.jboss.beans.info.plugins.BeanInfoUtil.get(BeanInfoUtil.java:142)
             at org.jboss.beans.info.plugins.AbstractBeanInfo.getProperty(AbstractBeanInfo.java:284)
             at org.jboss.metatype.plugins.values.DefaultMetaValueFactory.createCompositeValue(DefaultMetaValueFactory.java:471)
             at org.jboss.metatype.plugins.values.DefaultMetaValueFactory.internalCreate(DefaultMetaValueFactory.java:1023)
             at org.jboss.metatype.plugins.values.DefaultMetaValueFactory.createCollectionValue(DefaultMetaValueFactory.java:247)
             at org.jboss.metatype.plugins.values.DefaultMetaValueFactory.internalCreate(DefaultMetaValueFactory.java:1029)
             at org.jboss.metatype.plugins.values.DefaultMetaValueFactory.create(DefaultMetaValueFactory.java:542)
             at org.jboss.deployers.plugins.managed.BeanMetaDataICF.getValue(BeanMetaDataICF.java:165)
             at org.jboss.deployers.plugins.managed.BeanMetaDataICF.getValue(BeanMetaDataICF.java:48)
             at org.jboss.managed.plugins.factory.AbstractManagedObjectPopulator.populateValues(AbstractManagedObjectPopulator.java:201)
             at org.jboss.managed.plugins.factory.AbstractManagedObjectPopulator.populateManagedObject(AbstractManagedObjectPopulator.java:130)
             at org.jboss.managed.plugins.factory.AbstractManagedObjectFactory.initManagedObject(AbstractManagedObjectFactory.java:364)
             at org.jboss.managed.api.factory.ManagedObjectFactory.initManagedObject(ManagedObjectFactory.java:77)
             at org.jboss.system.server.profileservice.ProfileServiceBootstrap.initBootstrapMDs(ProfileServiceBootstrap.java:466)
             at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:199)
             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:595)
            


            and then goes this one, near the end:

            13:36:46,453 DEBUG [ProfileServiceBootstrap] Failed to build ManagedDeployment for: AbstractKernelDeployment@da8742{name=file:/C:/myApp/jboss-5.0.0.GA/server/default/conf/bootstrap/vfs.xml installed=true beanFactories=[AbstractBeanMetaData@1b64b70{name=VFSCache bean=null properties= constructor=AbstractConstructorMetaData@e1dac2{parameters=[null] factoryClass=org.jboss.virtual.spi.cache.VFSCacheFactory factoryMethod=getInstance} autowireCandidate=true start=AbstractLifecycleMetaData@1e12f6d{method=start whenRequired=ControllerState@112bc7b{Start} parameters= }}, AbstractBeanMetaData@11456c5{name=VfsNamesExceptionHandler bean=org.jboss.virtual.plugins.context.helpers.NamesExceptionHandler properties= constructor=AbstractConstructorMetaData@4ca42b{parameters=[java.lang.String]} autowireCandidate=true}, AbstractBeanMetaData@1ae0e7d{name=JBossVFSInitializer bean=org.jboss.virtual.plugins.cache.PreInitializeVFSContexts properties=[holdReference, initializedVFSContexts] constructor=null autowireCandidate=true}]}
            org.jboss.deployers.spi.DeploymentException: Error deploying: file:/C:/myApp/jboss-5.0.0.GA/server/default/conf/bootstrap/vfs.xml
             at org.jboss.deployers.spi.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:49)
             at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataFactoryVisitor.deploy(BeanMetaDataFactoryVisitor.java:136)
             at org.jboss.system.server.profileservice.ProfileServiceBootstrap.initBootstrapMDs(ProfileServiceBootstrap.java:453)
             at org.jboss.system.server.profileservice.ProfileServiceBootstrap.start(ProfileServiceBootstrap.java:199)
             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:595)
            Caused by: java.lang.IllegalStateException: ClassLoader has not been set
             at org.jboss.deployers.structure.spi.helpers.AbstractDeploymentUnit.getClassLoader(AbstractDeploymentUnit.java:152)
             at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataFactoryVisitor.addBeanComponent(BeanMetaDataFactoryVisitor.java:60)
             at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataFactoryVisitor.deploy(BeanMetaDataFactoryVisitor.java:126)
             ... 6 more
            


            • 3. Re: JBoss 5.0.0.GA on MySQL, migration problem
              raczer

               

              "PeterJ" wrote:
              4) If you don't need clustering, in mysql-persistence-service.xml set "Clustered" to false and comment out the "ChannelFactoryName" attribute.

              Ok, so I lied about the last one. After commenting it out PostOffice starts and there are no problems with JBM. Thanks PeterJ!
              "mysql-persistence-service.xml" placed in examples is very misleading, as it has "clustered" attribute set to false by defaulf, while "ChannelFactoryName" is not commented, and doesn't even appear in logs as a source of a problem.

              • 4. Re: JBoss 5.0.0.GA on MySQL, migration problem
                peterj

                 

                "mysql-persistence-service.xml" placed in examples is very misleading, as it has "clustered" attribute set to false by defaulf, while "ChannelFactoryName" is not commented,


                I heartily agree and pointed this out once before in this forum as being a possible issue when GA came out. It is a "gotcha" that can be easily overlooked.

                Glad you are up and running.

                • 5. Re: JBoss 5.0.0.GA on MySQL, migration problem
                  clebert.suconic

                   

                  mysql-persistence-service.xml" placed in examples is very misleading, as it has "clustered" attribute set to false by defaulf,


                  We had users complaining the opposite on having clustered=true by default.
                  You would see an exception on a ClassNotFound error for JGroups on that case.




                  • 6. Re: JBoss 5.0.0.GA on MySQL, migration problem
                    peterj

                    Sorry, I was not paying attention. Clustered is indeed set to false in GA, but you also need to comment out the dependency on ChannelFactoryName to get it to work.

                    • 7. Re: JBoss 5.0.0.GA on MySQL, migration problem
                      timfox

                      If clustered is set to false, then none of the cluster related attributes should be parsed - that is the way it used to work.

                      I believe Clebert added ChannelFactory at a later date. If ChannelFactory is being parsed when clustered = false then that's a bug.

                      Can someone add a JIRA? It should be a simple fix.

                      • 8. Re: JBoss 5.0.0.GA on MySQL, migration problem
                        clebert.suconic