0 Replies Latest reply on Apr 18, 2005 6:49 PM by Peter Stout

    JBoss 3.2.7 + ValidateDTDs=true => EJB Deployment Failure

    Peter Stout Newbie

      If I set ValidateDTDs to true in server/default/conf/jboss-service.xml and attempt to deploy an EAR that contains an EJB, the deployment fails with the following error messages:

      2005-04-18 14:32:29,127 ERROR [XmlFileLoader] - XmlFileLoader: File file:/C:/home/edge/app/jboss/server/cs/conf/standardjboss.xml process error. Line: 303. Error message: Element type "partitions" must be declared. 2005-04-18 14:32:29,127 ERROR [XmlFileLoader] - XmlFileLoader: File file:/C:/home/edge/app/jboss/server/cs/conf/standardjboss.xml process error. Line: 307. Error message: The content of element type "cache-policy-conf-other" must match "(ANY)". 2005-04-18 14:32:29,175 ERROR [XmlFileLoader] - failed to load standardjboss.xml. There could be a syntax error.
      org.jboss.deployment.DeploymentException: Invalid XML: file=file:/C:/home/edge/app/jboss/server/cs/conf/standardjboss.xml
      at org.jboss.metadata.XmlFileLoader.getDocument(XmlFileLoader.java:296)
      at org.jboss.metadata.XmlFileLoader.getDocument(XmlFileLoader.java:247)
      at org.jboss.metadata.XmlFileLoader.getDocumentFromURL(XmlFileLoader.java:219)
      at org.jboss.metadata.XmlFileLoader.load(XmlFileLoader.java:156)
      at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:462)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:783)
      at org.jboss.deployment.MainDeployer.create(MainDeployer.java:775)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:640)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:604)
      at sun.reflect.GeneratedMethodAccessor38.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:62)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:54)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:82)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:198)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy8.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:304)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:478)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:212)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:191)

      The system starts fine and deploys the EAR without issue if ValidateDTDs is set to false.

      There is a comment at the top of jboss-service_3_2.dtd that states that that DTD cannot be used for validation, because the attribute element allows ANY content. The JBoss 3.2.7 version of jboss_3_2.dtd now contains an element, cache-policy-conf-other, that is defined as having ANY content, which I suspect is the cause of the problem.

      What I don't quite understand is why enabling EJB DTD validation causes the standardjboss.xml to be validated. Is this a known issue? Is there any way that that validation of standardjboss.xml can be disabled without disabling all EJB DTD validation? Does this problem exist in 4.0.x?