5 Replies Latest reply on Oct 12, 2007 1:26 PM by adrian.brock

    JBossEjbParsingDeployer

    wolfc

      For the moment I've reinstated the hack to get to the deprecated EJB 3 deployers.

      I've added EjbJarMetaData as an optional input, because we use it to specify overridden meta data.

      I don't like the exception coming from the parse method, they're non-descriptive.

      Shouldn't we parse standardjboss.xml on each run of the mill? If not, then we should have a line in there that says 'only parsed once, restart server if changed'.
      I think the latter is better, because it won't leave deployments in a state that's no longer attainable.

        • 1. Re: JBossEjbParsingDeployer
          wolfc

           

          "wolfc" wrote:
          I don't like the exception coming from the parse method, they're non-descriptive.


          I should have said: I don't like the exception coming from the deployer.
          org.jboss.deployers.spi.DeploymentException: The xml META-INF/jboss.xml is not well formed!

          It's actually: Can't find any root element matching the given namespace.
          Some reference to some doc might be nice, because the code nowhere points out to SchemaResolverConfig which is setup in metadata-beans.xml.

          Next one:
          http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbossas/projects/metadata/trunk/src/test/resources/org/jboss/test/metadata/ejb/JBoss50_testSimple.xml?revision=66083&view=markup
          Works okay in jboss-metadata, but not in trunk.
          org.jboss.xb.binding.JBossXBRuntimeException: -1:-1 154:3 The markup in the document preceding the root element must be well-formed.



          • 2. Re: JBossEjbParsingDeployer
            wolfc

            Found the culprit:

            2007-10-12 14:03:31,455 DEBUG [org.jboss.deployment.JBossEjbParsingDeployer] Parsing file: FileHandler@1892971028[path=standardjboss.xml context=file:/home/carlo/work/jboss-head/build/output/jboss-5.0.0.Beta3/server/all/conf/ real=file:/home/carlo/work/jboss-head/build/output/jboss-5.0.0.Beta3/server/all/conf/standardjboss.xml] for deploymentType: class org.jboss.metadata.ejb.jboss.JBossMetaData

            This exception must be improved. It needs to show more context in which the error occurs.

            • 3. Re: JBossEjbParsingDeployer
              starksm64

              I have seen that error when there is an attempt to parse an xsd file, that is not a schema. The error is coming from the xerces layer so the question is one of getting hold of enough info to improve this error. What was the cause here?

              I'll see if the binding layer can do a better job of building the exception.

              • 4. Re: JBossEjbParsingDeployer
                wolfc

                It's trying to parse the dtd specified in standardjboss.xml.

                • 5. Re: JBossEjbParsingDeployer

                  I think you'll find the problem comes from the namespace.

                  JBossXB returns null when it doesn't recognise the root element.

                  It is expecting a root element of:

                  {jboss-namespace}:jboss

                  but since it is using the dtd, it is actually getting

                  {}:jboss

                  i.e. no namspace.

                  JBossXB should be fixed generically to throw a message like
                  :jboss is not a root element {jboss-namespace}:jboss
                  but equally, JBossXB should be able to "fixup" the namespace
                  for the case when one isn't provided if you know upfront what the namespace should be.