Bugs item #489465, was opened at 2001-12-05 10:15 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=376685&aid=489465&group_id=22866
Category: JBossServer Group: v3.0 Rabbit Hole Status: Open Resolution: None Priority: 5 Submitted By: Emmanuel Sciara (sciara) Assigned to: Nobody/Anonymous (nobody) Summary: cannot turn jboss.xml dtd validation off Initial Comment: I am using xdoclet to generate my entity beans, which adds automatically the dtd declaration http://www.jboss.org/j2ee/dtd/jboss_3_0.dtd to jboss.xml . When i try to deploy my beans, the following deployment exception is throw: [12:30:54,351,ContainerFactory] Deploying:file:/C:/Data/Download/Extracted/jboss- 3.0.0alpha/deploy/Default/newmove-deploy.jar/ [12:30:54,731,Default] External entity not found: "http://www.jboss.org/j2ee/dtd/jboss_3_0.dtd".:- 1:2 [12:30:54,731,Default] java.io.FileNotFoundException: http://www.jboss.org/j2ee/dtd/jboss_3_0.dtd [12:30:54,731,Default] at org.apache.crimson.parser.Parser2.fatal (Parser2.java:3108) [12:30:54,731,Default] at org.apache.crimson.parser.Parser2.externalParameterEnti ty(Parser2.java:2796) [12:30:54,731,Default] at org.apache.crimson.parser.Parser2.maybeDoctypeDecl (Parser2.java:1155) [12:30:54,731,Default] at org.apache.crimson.parser.Parser2.parseInternal (Parser2.java:489) [12:30:54,731,Default] at org.apache.crimson.parser.Parser2.parse (Parser2.java:305) [12:30:54,731,Default] at org.apache.crimson.parser.XMLReaderImpl.parse (XMLReaderImpl.java:433) [12:30:54,731,Default] at org.apache.crimson.jaxp.DocumentBuilderImpl.parse (DocumentBuilderImpl.java:185) [12:30:54,731,Default] at javax.xml.parsers.DocumentBuilder.parse (DocumentBuilder.java:86) [12:30:54,731,Default] at org.jboss.metadata.XmlFileLoader.getDocument (XmlFileLoader.java:247) [12:30:54,731,Default] at org.jboss.metadata.XmlFileLoader.getDocumentFromURL (XmlFileLoader.java:219) [12:30:54,731,Default] at org.jboss.metadata.XmlFileLoader.load (XmlFileLoader.java:176) [12:30:54,731,Default] at org.jboss.ejb.ContainerFactory.deploy (ContainerFactory.java:436) [12:30:54,731,Default] at org.jboss.ejb.ContainerFactory.deploy (ContainerFactory.java:377) [12:30:54,731,Default] at org.jboss.ejb.ContainerFactory.deploy (ContainerFactory.java:308) [12:30:54,731,Default] at java.lang.reflect.Method.invoke(Native Method) [12:30:54,741,Default] at com.sun.management.jmx.MBeanServerImpl.invoke (MBeanServerImpl.java:1628) [12:30:54,741,Default] at com.sun.management.jmx.MBeanServerImpl.invoke (MBeanServerImpl.java:1523) [12:30:54,741,Default] at org.jboss.deployment.J2eeDeployer.startModules (J2eeDeployer.java:467) [12:30:54,741,Default] at org.jboss.deployment.J2eeDeployer.startApplication (J2eeDeployer.java:444) [12:30:54,741,Default] at org.jboss.deployment.J2eeDeployer.deploy (J2eeDeployer.java:215) [12:30:54,741,Default] at java.lang.reflect.Method.invoke(Native Method) [12:30:54,741,Default] at com.sun.management.jmx.MBeanServerImpl.invoke (MBeanServerImpl.java:1628) [12:30:54,741,Default] at com.sun.management.jmx.MBeanServerImpl.invoke (MBeanServerImpl.java:1523) [12:30:54,741,Default] at org.jboss.deployment.AutoDeployer.deploy (AutoDeployer.java:654) [12:30:54,741,Default] at org.jboss.deployment.AutoDeployer.run (AutoDeployer.java:327) [12:30:54,741,Default] at java.lang.Thread.run (Thread.java:484) The dtd file does not exist at the location indicated And it is difficult to get rid of it(need to recompile and repackage the whole of xdoclet). I checked the the JarDeployer MBean in the J2ee deployer service and the ValidateDTDs attribute is set to false but, if I interpret the error message correctly, the deployer still tries to validate it. Could you confirm this is a bug? Is there a way around itf on the JBoss side? ---------------------------------------------------------------------- >Comment By: Emmanuel Sciara (sciara) Date: 2001-12-11 02:03 Message: Logged In: YES user_id=91163 Ok, I looked into it. The error message suggests one of the three following: 1) The validateDTD flag is not properly passed on to the xml parser in the JBoss code. I checked it and this is not the case (look at XmlFileLoader.getDocument method) 2) The validateDTD flag is properly passed on to the xml parser but the implementation of the xml parse is faulty and does not take the flag into account. This means there is a bug to be reported to the Crimson folk at Apache. 3) The validateDTD flag is properly passed on and the parser does not validate the XML but still needs to be able to access the DTD. In this case again the question needs to be passed on to the Crimson. Maybe it is a good practice (?). Does that make sens? Also when is the jboss_3_0.dtd going to be available? ---------------------------------------------------------------------- Comment By: Guillaume Coté (gcote) Date: 2001-12-10 01:49 Message: Logged In: YES user_id=15328 For the record, I agree that it is NOT a normal behavior that the deployer to validate something with the attribute for validating it is false. I just try to suggest possible workaround the bug. Even if my workaround works, there is still a bug that have to be solved. ---------------------------------------------------------------------- Comment By: Emmanuel Sciara (sciara) Date: 2001-12-07 09:35 Message: Logged In: YES user_id=91163 BTW, is it a normmal behaviour that the deployer will try to validate the xml file even if the ValidateDTDs attribute is false? ---------------------------------------------------------------------- Comment By: Emmanuel Sciara (sciara) Date: 2001-12-07 09:29 Message: Logged In: YES user_id=91163 I looked there and in the whole JBoss source. There is no trace of any jboss_3_0.dtd! So does that mean that this dtd actually does not exist? Does that mean that the dtd has not changed between 2.4 and 3.0? ---------------------------------------------------------------------- Comment By: Guillaume Coté (gcote) Date: 2001-12-06 10:03 Message: Logged In: YES user_id=15328 First, the page http://www.jboss.org/j2ee/dtd/jboss_3_0.dtd is a 404, which shouldn't be the case. Second, the dtd are distributed with the source, in the directory jboss\src\resources\org\jboss\metadata\. You could find it there and replace the url with a URL on local file or local webserver pointing on the corresponding file. Third, there are a class call org.jboss.metadata.XmlFileLoader.LocalResolver that I think should allow you to check the dtd without needing a extenal web access. There are the javadoc comments of the class : Local entity resolver to handle J2EE DTDs. With this a http connection to sun is not needed during deployment. Function boolean hadDTD() is here to avoid validation errors in descriptors that do not have a DOCTYPE declaration. @author <a href="mailto:[EMAIL PROTECTED]">Wolfgang Werner</a> @author <a href="mailto:[EMAIL PROTECTED]">Darius Davidavicius</a> You should check in the 3.0 source if the DTD you need is listed there and if not, try to add it. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=376685&aid=489465&group_id=22866 _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development