10 Replies Latest reply on Oct 17, 2007 6:10 AM by alesj

    lifecycle-configure not found as a child of {urn:jboss:bean-

    ataylor

      i'm using JBossMC 2.0.0.Beta4 with JBossaop 2.0.0.beta1.

      With the following configuration:

      <?xml version="1.0" encoding="UTF-8"?>
      
      <deployment xmlns="urn:jboss:bean-deployer:2.0">
      
       <bean name="MBeanServer" class="java.lang.Object">
       <constructor factoryClass="org.jboss.jms.server.microcontainer.factory.mBeanServerCreator"
       factoryMethod="createMBeanServer"/>
       </bean>
      
       <aop:lifecycle-configure xmlns:aop="urn:jboss:aop-beans:1.0"
       name="DependencyAdvice"
       class="org.jboss.aop.microcontainer.aspects.jmx.JMXLifecycleCallback"
       classes="@org.jboss.aop.microcontainer.aspects.jmx.JMX">
       <property name="mbeanServer">
       <inject bean="MBeanServer"/>
       </property>
       </aop:lifecycle-configure>
      
       <bean class="com.arjuna.ats.jbossatx.jta.TransactionManagerService"
       name="TransactionManager">
       <property name="transactionTimeout">300</property>
       <property name="objectStoreDir">tx-object-store</property>
       <annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss:service=TransactionManager",
       exposedInterface=com.arjuna.ats.jbossatx.jta.TransactionManagerServiceMBean.class
       </annotation>
       </bean>
      
      </deployment>
      


      i get the following error:

      Exception in thread "main" java.lang.RuntimeException: Exception during Bootstrap
       at org.jboss.kernel.plugins.bootstrap.AbstractBootstrap.run(AbstractBootstrap.java:99)
       at org.jboss.jms.server.microcontainer.JBMBootstrapServer.main(JBMBootstrapServer.java:67)
       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 com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
      Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: file:/home/andy/projects/Branch_Andy_MC_Integration/src/etc/META-INF/mbeansupport.xml@13,86
       at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:164)
       at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:133)
       at org.jboss.kernel.plugins.deployment.xml.BeanXMLDeployer.deploy(BeanXMLDeployer.java:86)
       at org.jboss.jms.server.microcontainer.JBMBootstrapServer.deploy(JBMBootstrapServer.java:130)
       at org.jboss.jms.server.microcontainer.JBMBootstrapServer.bootstrap(JBMBootstrapServer.java:105)
       at org.jboss.kernel.plugins.bootstrap.AbstractBootstrap.run(AbstractBootstrap.java:89)
       ... 6 more
      Caused by: org.jboss.xb.binding.JBossXBRuntimeException: {urn:jboss:aop-beans:1.0}lifecycle-configure not found as a child of {urn:jboss:bean-deployer:2.0}deployment
       at org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.startElement(SundayContentHandler.java:280)
       at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$DelegatingContentHandler.startElement(SaxJBossXBParser.java:323)
       at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
       at org.apache.xerces.xinclude.XIncludeHandler.startElement(Unknown Source)
       at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
       at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
       at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
       at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
       at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
       at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
       at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
       at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
       at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:160)
       ... 11 more
      


      Anyone have any ideas?

        • 1. Re: lifecycle-configure not found as a child of {urn:jboss:b
          alesj

          You do have aop-mc-int artifacts?

          • 2. Re: lifecycle-configure not found as a child of {urn:jboss:b
            ataylor

            yeah, jboss-aop-mc-int.jar is in my classpath so i'm definately picking up the aop-beans_1_0.xsd schema.

            • 3. Re: lifecycle-configure not found as a child of {urn:jboss:b
              alesj

              How many of xercesImpl jars is there in classpath?
              Since I remember having some weird (perhaps even the same) problems when doing similar mc+aop in our mc+drools example due to multiple diff xercesImpl versions.

              Had to exclude them:

               <dependency>
               <groupId>org.drools</groupId>
               <artifactId>drools-compiler</artifactId>
               <version>${version.jboss.drools}</version>
               <exclusions>
               <exclusion>
               <groupId>xml-apis</groupId>
               <artifactId>xml-apis</artifactId>
               </exclusion>
               <exclusion>
               <groupId>xerces</groupId>
               <artifactId>xercesImpl</artifactId>
               </exclusion>
               </exclusions>
               </dependency>
              


              • 4. Re: lifecycle-configure not found as a child of {urn:jboss:b
                ataylor

                only one, version 2.7.1-brew

                • 5. Re: lifecycle-configure not found as a child of {urn:jboss:b
                  alesj

                  Could it be very old version of SingletonSchemaResolverFactory in jbossxb?
                  Meaning that SingletonSchemaResolverFactory does not have this first schema addition:

                   private SingletonSchemaResolverFactory()
                   {
                   addSchema("urn:jboss:aop-beans:1.0", "org.jboss.aop.microcontainer.beans.xml.AOPBeansSchemaInitializer", Boolean.FALSE);
                   addSchema("urn:jboss:bean-deployer", "org.jboss.kernel.plugins.deployment.xml.BeanSchemaInitializer", Boolean.FALSE);
                   addSchema("urn:jboss:bean-deployer:2.0", "org.jboss.kernel.plugins.deployment.xml.BeanSchemaInitializer20", Boolean.FALSE);
                   addSchema("urn:jboss:javabean:1.0", "org.jboss.javabean.plugins.xml.JavaBeanSchemaInitializer", Boolean.FALSE);
                   addSchema("urn:jboss:javabean:2.0", "org.jboss.javabean.plugins.xml.JavaBeanSchemaInitializer20", Boolean.FALSE);
                   addSchema("urn:jboss:spring-beans:2.0", "org.jboss.spring.deployment.xml.SpringSchemaInitializer", Boolean.FALSE);
                   addSchema("urn:jboss:policy:1.0", "org.jboss.kernel.plugins.deployment.xml.PolicySchemaInitializer", Boolean.FALSE);
                   addSchema("urn:jboss:osgi-beans:1.0", "org.jboss.osgi.deployment.xml.OSGiSchemaInitializer", Boolean.FALSE);
                   addSchema("urn:jboss:seam-components:1.0", "org.jboss.seam.ioc.microcontainer.xml.SeamSchemaInitializer", Boolean.FALSE);
                   }
                  


                  • 6. Re: lifecycle-configure not found as a child of {urn:jboss:b
                    ataylor

                    I'm picking up the version from jbossas/core-libs version 4.2.1.GA

                    private SingletonSchemaResolverFactory() {
                     addSchema("urn:jboss:aop-beans:1.0", "org.jboss.aop.microcontainer.beans.xml.AOPBeansSchemaInitializer", Boolean.FALSE);
                     addSchema("urn:jboss:bean-deployer", "org.jboss.kernel.plugins.deployment.xml.BeanSchemaInitializer", Boolean.FALSE);
                     addSchema("urn:jboss:bean-deployer:2.0", "org.jboss.kernel.plugins.deployment.xml.BeanSchemaInitializer20", Boolean.FALSE);
                     addSchema("urn:jboss:javabean:1.0", "org.jboss.kernel.plugins.config.xml.JavaBeanSchemaInitializer", Boolean.FALSE);
                     }
                    


                    • 7. Re: lifecycle-configure not found as a child of {urn:jboss:b
                      alesj

                      Uf, I'm out of ideas.
                      Alex or Adrian?

                      • 8. Re: lifecycle-configure not found as a child of {urn:jboss:b
                        aloubyansky

                        Try enabling TRACE for org.jboss.xb.binding.sunday.unmarshalling.XsdBinder. It will show whether the aop xsd is parsed and {urn:jboss:aop-beans:1.0}lifecycle-configure is actually there.

                        • 9. Re: lifecycle-configure not found as a child of {urn:jboss:b
                          ataylor

                          With Trace on I do get the following

                          @main 09:50:57,224 DEBUG [JBossEntityResolver] Cannot resolve [publicID=urn:jboss:aop-beans:1.0,systemID=null]
                          @main 09:50:57,234 DEBUG [JBossEntityResolver] Cannot resolve [publicID=null,systemID=urn:jboss:aop-beans:1.0]
                          @main 09:50:57,234 DEBUG [JBossEntityResolver] Cannot resolve [publicID=urn:jboss:aop-beans:1.0,systemID=null]
                          @main 09:50:57,267 DEBUG [JBossEntityResolver] Cannot resolve [publicID=null,systemID=urn:jboss:aop-beans:1.0]
                          @main 09:50:57,270 TRACE [JBMBootstrapServer] Exception during JBoss Kernel Bootstrap.
                          


                          however i have the jboss-aop-mc-int.jar in my classpath, which is where the schema definition is!!!

                          • 10. Re: lifecycle-configure not found as a child of {urn:jboss:b
                            alesj

                            Can you check if you have this in your JBossEntityResolver:

                             registerEntity("urn:jboss:aop-beans:1.0", "aop-beans_1_0.xsd");