2 Replies Latest reply on Sep 19, 2006 11:01 AM by kabirkhan

    Deploying MC 2.0 snapshot in JBoss  4.0x

    kabirkhan

      I am trying to get things ready for an AOP 2.0 alpha release, and since AOP now depends a lot more on the microcontainer I need to get the jboss-beans.deployer from head deployed in Branch_4_0. (This is just trying it out, I will package a real release later on).

      Classes that definitely are missing in JBoss 4.0 are:
      org.jboss.deployment.SchemaResolverSimpleSubDeployerSupport
      org.jboss.util.collection.WeakClassCache (moved from org.jboss.util.connection since jboss 4.0.x)
      org.jboss.util.collection.CollectionsFactory (moved from org.jboss.util.connection since jboss 4.0.x)

      After adding these missing classes I am able to get the JBossBeanDeployer started, but when starting web services I get the following error

      2006-09-19 14:00:45,468 ERROR [org.jboss.deployment.MainDeployer] Could not initialise deployment: file:/C:/cygwin/home/Kabir/sourcecontrol/Branch_4_0/build/output/jboss-4.0.5.GA-ejb3/server/aop2/deploy/jbossws.sar/
      org.jboss.deployment.DeploymentException: Error parsing meta data jar:file:/C:/cygwin/home/Kabir/sourcecontrol/Branch_4_0/build/output/jboss-4.0.5.GA-ejb3/server/aop2/tmp/deploy/tmp49993jbossws.beans!/META-INF/jboss-beans.xml; - nested throwable: (org.jboss.xb.binding.JBossXBException: Failed to parse source: jar:file:/C:/cygwin/home/Kabir/sourcecontrol/Branch_4_0/build/output/jboss-4.0.5.GA-ejb3/server/aop2/tmp/deploy/tmp49993jbossws.beans!/META-INF/jboss-beans.xml@5,35)
       at org.jboss.deployment.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:53)
       at org.jboss.deployment.SchemaResolverSimpleSubDeployerSupport.parseMetaData(SchemaResolverSimpleSubDeployerSupport.java:57)
       at org.jboss.kernel.deployment.jboss.JBossBeanDeployer.parseMetaData(JBossBeanDeployer.java:87)
       at org.jboss.deployment.SimpleSubDeployerSupport.init(SimpleSubDeployerSupport.java:88)
       at org.jboss.deployment.MainDeployer.init(MainDeployer.java:872)
       at org.jboss.deployment.MainDeployer.init(MainDeployer.java:895)
      --- SNIP ----
      Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: jar:file:/C:/cygwin/home/Kabir/sourcecontrol/Branch_4_0/build/output/jboss-4.0.5.GA-ejb3/server/aop2/tmp/deploy/tmp49993jbossws.beans!/META-INF/jboss-beans.xml@5,35
       at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBParser.java:142)
       at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:133)
       at org.jboss.deployment.SchemaResolverSimpleSubDeployerSupport.parseMetaData(SchemaResolverSimpleSubDeployerSupport.java:51)
       ... 71 more
      Caused by: java.lang.NullPointerException
       at org.jboss.kernel.plugins.deployment.xml.BeanSchemaBinding.configureValueBindings(BeanSchemaBinding.java:1207)
       at org.jboss.kernel.plugins.deployment.xml.BeanSchemaBinding.init(BeanSchemaBinding.java:410)
       at org.jboss.kernel.plugins.deployment.xml.BeanSchemaInitializer.init(BeanSchemaInitializer.java:37)
       at org.jboss.xb.binding.sunday.unmarshalling.DefaultSchemaResolver.resolve(DefaultSchemaResolver.java:257)
       at org.jboss.xb.binding.sunday.unmarshalling.SundayContentHandler.startElement(SundayContentHandler.java:162)
       at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$DelegatingContentHandler.startElement(SaxJBossXBParser.java:301)
       at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
       at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
       at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(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:138)
       ... 73 more
      


       private static void configureValueBindings(TypeBinding typeBinding)
       {
       // type has values
       typeBinding.pushInterceptor(valueQName, VALUES); <- failure
      
       ...
       }
      


      The typeBinding passed in to BeanSchemaBinding.configureValueBindings() is null. I'm not that familiar with JBoss XB, is there a simple explanation? Is there anything else I need to configure?

      BTW the null type binding seems to be obtained via
       // classloader binding
       TypeBinding classloaderType = schemaBinding.getType(classloaderTypeQName);
       configureValueBindings(classloaderType);
       classloaderType.setHandler(new DefaultElementHandler()
      


        • 1. Re: Deploying MC 2.0 snapshot in JBoss  4.0x

          You can't put MC 2.0 in JBoss-4.0.x
          there hasn't even been a beta release of it yet.

          We should certainly break out the container module into a seperate
          project, like I suggested before with a 1.x branch that contains
          stable stuff and and 2.x branch that is under development.

          Besides, the api isn't stable yet. e.g.
          The MetaData repository stuff that is in the aop integration is still WIP
          and won't be what is currently used when it is finished.

          • 2. Re: Deploying MC 2.0 snapshot in JBoss  4.0x
            kabirkhan

            My problem is that a paying customer has been waiting for an AOP 2.0 alpha for ages and the new tight integration with the container project is holding things up. I will look at making including the container specific stuff in AOP a configuration option so that the alpha release can work in JBoss 4.0 as-is (with no need to update the jboss-beans.deployer) and also work in JBoss 5 with the MC.