Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 37346 invoked from network); 21 Dec 2005 14:33:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 21 Dec 2005 14:33:38 -0000 Received: (qmail 8602 invoked by uid 500); 21 Dec 2005 14:33:32 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 8550 invoked by uid 500); 21 Dec 2005 14:33:31 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 8535 invoked by uid 99); 21 Dec 2005 14:33:31 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Dec 2005 06:33:31 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [64.95.232.36] (HELO mail02.roncap.com) (64.95.232.36) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Dec 2005 06:33:30 -0800 Received: (qmail 10608 invoked by uid 46); 21 Dec 2005 14:33:09 -0000 Received: from william.evans@ronin-capital.com by mail02.roncap.com by uid 502 with qmail-scanner-1.21st (spamassassin: 2.63. Clear:RC:1(10.97.1.103):. Processed in 0.037534 secs); 21 Dec 2005 14:33:09 -0000 Received: from sron-chi-exc03.ronin.roncap.com (10.97.1.103) by sron-chi-mail02.ronin.roncap.com with SMTP; 21 Dec 2005 14:33:09 -0000 X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: XMLConfiguration load problem - External Entity not found Date: Wed, 21 Dec 2005 08:33:09 -0600 Message-ID: <768C2A98E8A50F48BD8EE964A8014AD80322DA@sron-chi-exc03.ronin.roncap.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: XMLConfiguration load problem - External Entity not found Thread-Index: AcYGMWXlSLojf7UDT++0KVqolromkgACVtrQ From: "William Evans" To: "Jakarta Commons Users List" X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Oliver, I have removed all refs to 1.0-rc2 and still I am getting the problem. My manifest looks good: Manifest-Version: 1.0 Ant-Version: Apache Ant 1.5.3=20 Created-By: Apache Maven Built-By: oheger Package: org.apache.commons.configuration Build-Jdk: 1.3.1_16 Extension-Name: commons-configuration Specification-Title: Common Configuration Specification-Vendor: The Apache Software Foundation Implementation-Title: org.apache.commons.configuration Implementation-Vendor: The Apache Software Foundation Implementation-Version: 1.2 I added following to my code (a class not in 1.0-rc2): XMLPropertiesConfiguration pc =3D new XMLPropertiesConfiguration(); Rather than getting class not found, I got: java.lang.NoSuchMethodError: org.apache.commons.configuration.AbstractFileConfiguration.setEncoding(L java/lang/String;)V at org.apache.commons.configuration.XMLPropertiesConfiguration.(XMLPr opertiesConfiguration.java:73) =09 Which implies to me that there is something not quite right about this 1.2 jar...=20 I tried re-downloading but can't find it on Commons any more.... Regards Bill -----Original Message----- From: Oliver Heger [mailto:oliver.heger@t-online.de]=20 Sent: Wednesday, December 21, 2005 5:21 AM To: Jakarta Commons Users List Subject: Re: XMLConfiguration load problem - External Entity not found Bill, I checked out the sources for 1.0-rc2 and here the line numbers exactly conform to your stack trace. So you definitely work with old classes. This also explains why you cannot access structered XML properties by their index because in 1.0 XMLConfiguration did not support this extended syntax. Not sure about your setup (usually I trust Eclipse). Is it possible that you have an old jar somewhere in the lib\ext directory of your JDK/JRE installation? Or is your commons-configuration-1.2.jar really the correct one (it should be from December 17th and have 163,822 bytes; you can also check the version number in the manifest)? HTH Oliver William Evans wrote: >Oliver, >I double checked my classpath and am definitely only referencing >commons-configuration-1.2.jar - unless Eclipse is messing with me... > >One thing I didn't do when I moved from 1.0-rc2 was to change any of the >other Jakarta jars. Here is a list of all the ones I am referencing: > >commons-collections-3.1.jar >commons-configuration-1.2.jar >commons-digester.jar >commons-lang-2.0.jar >commons-logging-api.jar >log4j-1.2.8.jar > >Hope this helps... By the way, I find the Configuration project saves me >a lot of time, so I really hope you can figure out what I am doing >wrong! > >Regards >Bill > >-----Original Message----- >From: Oliver Heger [mailto:oliver.heger@t-online.de]=20 >Sent: Tuesday, December 20, 2005 8:26 AM >To: Jakarta Commons Users List >Subject: Re: XMLConfiguration load problem - External Entity not found > >Hm, strange. I cannot match the line numbers shown in the stack trace >with the source code (some point to comment lines!?). > >Could it be that you have an old version of the >commons-configuration.jar somewhere on your classpath? > >But I will have a closer look at this issue tomorow (including your >other problem). > >Oliver > >William Evans wrote: > > =20 > >>Whoops, forgot stack trace: >> >>org.apache.commons.configuration.ConfigurationException: Relative URI >>"../../../yyyy.dtd"; can not be resolved without a base URI. >> at >>org.apache.commons.configuration.AbstractFileConfiguration.load(Abstra c >> =20 >> >t > =20 > >>FileConfiguration.java:128) >> at >>org.apache.commons.configuration.AbstractFileConfiguration.load(Abstra c >> =20 >> >t > =20 > >>FileConfiguration.java:63) >> at >>oakland.btrade.tactic.config.test.ReadingTest.testOneAssistant(Reading T >> =20 >> >e > =20 > >>st.java:42) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at >>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j a >> =20 >> >v > =20 > >>a:39) >> at >>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess o >> =20 >> >r > =20 > >>Impl.java:25) >> at java.lang.reflect.Method.invoke(Method.java:585) >> at junit.framework.TestCase.runTest(TestCase.java:154) >> at junit.framework.TestCase.runBare(TestCase.java:127) >> at junit.framework.TestResult$1.protect(TestResult.java:106) >> at junit.framework.TestResult.runProtected(TestResult.java:124) >> at junit.framework.TestResult.run(TestResult.java:109) >> at junit.framework.TestCase.run(TestCase.java:118) >> at junit.framework.TestSuite.runTest(TestSuite.java:208) >> at junit.framework.TestSuite.run(TestSuite.java:203) >> at >>org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(Remote T >> =20 >> >e > =20 > >>stRunner.java:478) >> at >>org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestR u >> =20 >> >n > =20 > >>ner.java:344) >> at >>org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTest R >> =20 >> >u > =20 > >>nner.java:196) >>Caused by: org.apache.commons.configuration.ConfigurationException: >>Relative URI "../../../BTradeDirectorAll.dtd"; can not be resolved >>without a base URI. >> at >>org.apache.commons.configuration.XMLConfiguration.load(XMLConfiguratio n >> =20 >> >. > =20 > >>java:161) >> at >>org.apache.commons.configuration.AbstractFileConfiguration.load(Abstra c >> =20 >> >t > =20 > >>FileConfiguration.java:190) >> at >>org.apache.commons.configuration.AbstractFileConfiguration.load(Abstra c >> =20 >> >t > =20 > >>FileConfiguration.java:157) >> at >>org.apache.commons.configuration.AbstractFileConfiguration.load(Abstra c >> =20 >> >t > =20 > >>FileConfiguration.java:124) >> ... 17 more >>Caused by: org.xml.sax.SAXParseException: Relative URI >>"../../../yyyy.dtd"; can not be resolved without a base URI. >> at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3182) >> at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3176) >> at >>org.apache.crimson.parser.Parser2.resolveURI(Parser2.java:2758) >> at >>org.apache.crimson.parser.Parser2.maybeExternalID(Parser2.java:2730) >> at >>org.apache.crimson.parser.Parser2.maybeDoctypeDecl(Parser2.java:1129) >> at >>org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:489) >> at org.apache.crimson.parser.Parser2.parse(Parser2.java:305) >> at >>org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442) >> at >>org.apache.crimson.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl. j >> =20 >> >a > =20 > >>va:185) >> at >>org.apache.commons.configuration.XMLConfiguration.load(XMLConfiguratio n >> =20 >> >. > =20 > >>java:157) >> ... 20 more >> >>Cause: >>org.apache.commons.configuration.ConfigurationException: Relative URI >>"../../../yyyy.dtd"; can not be resolved without a base URI. >> at >>org.apache.commons.configuration.XMLConfiguration.load(XMLConfiguratio n >> =20 >> >. > =20 > >>java:161) >> at >>org.apache.commons.configuration.AbstractFileConfiguration.load(Abstra c >> =20 >> >t > =20 > >>FileConfiguration.java:190) >> at >>org.apache.commons.configuration.AbstractFileConfiguration.load(Abstra c >> =20 >> >t > =20 > >>FileConfiguration.java:157) >> at >>org.apache.commons.configuration.AbstractFileConfiguration.load(Abstra c >> =20 >> >t > =20 > >>FileConfiguration.java:124) >> at >>org.apache.commons.configuration.AbstractFileConfiguration.load(Abstra c >> =20 >> >t > =20 > >>FileConfiguration.java:63) >> at >>oakland.btrade.tactic.config.test.ReadingTest.testOneAssistant(Reading T >> =20 >> >e > =20 > >>st.java:42) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at >>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j a >> =20 >> >v > =20 > >>a:39) >> at >>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess o >> =20 >> >r > =20 > >>Impl.java:25) >> at java.lang.reflect.Method.invoke(Method.java:585) >> at junit.framework.TestCase.runTest(TestCase.java:154) >> at junit.framework.TestCase.runBare(TestCase.java:127) >> at junit.framework.TestResult$1.protect(TestResult.java:106) >> at junit.framework.TestResult.runProtected(TestResult.java:124) >> at junit.framework.TestResult.run(TestResult.java:109) >> at junit.framework.TestCase.run(TestCase.java:118) >> at junit.framework.TestSuite.runTest(TestSuite.java:208) >> at junit.framework.TestSuite.run(TestSuite.java:203) >> at >>org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(Remote T >> =20 >> >e > =20 > >>stRunner.java:478) >> at >>org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestR u >> =20 >> >n > =20 > >>ner.java:344) >> at >>org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTest R >> =20 >> >u > =20 > >>nner.java:196) >>Caused by: org.xml.sax.SAXParseException: Relative URI >>"../../../yyyy.dtd"; can not be resolved without a base URI. >> at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3182) >> at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3176) >> at >>org.apache.crimson.parser.Parser2.resolveURI(Parser2.java:2758) >> at >>org.apache.crimson.parser.Parser2.maybeExternalID(Parser2.java:2730) >> at >>org.apache.crimson.parser.Parser2.maybeDoctypeDecl(Parser2.java:1129) >> at >>org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:489) >> at org.apache.crimson.parser.Parser2.parse(Parser2.java:305) >> at >>org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442) >> at >>org.apache.crimson.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl. j >> =20 >> >a > =20 > >>va:185) >> at >>org.apache.commons.configuration.XMLConfiguration.load(XMLConfiguratio n >> =20 >> >. > =20 > >>java:157) >> ... 20 more >> >>Cause: >>org.xml.sax.SAXParseException: Relative URI "../../../yyyy.dtd"; can >> =20 >> >not > =20 > >>be resolved without a base URI. >> at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3182) >> at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3176) >> at >>org.apache.crimson.parser.Parser2.resolveURI(Parser2.java:2758) >> at >>org.apache.crimson.parser.Parser2.maybeExternalID(Parser2.java:2730) >> at >>org.apache.crimson.parser.Parser2.maybeDoctypeDecl(Parser2.java:1129) >> at >>org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:489) >> at org.apache.crimson.parser.Parser2.parse(Parser2.java:305) >> at >>org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442) >> at >>org.apache.crimson.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl. j >> =20 >> >a > =20 > >>va:185) >> at >>org.apache.commons.configuration.XMLConfiguration.load(XMLConfiguratio n >> =20 >> >. > =20 > >>java:157) >> at >>org.apache.commons.configuration.AbstractFileConfiguration.load(Abstra c >> =20 >> >t > =20 > >>FileConfiguration.java:190) >> at >>org.apache.commons.configuration.AbstractFileConfiguration.load(Abstra c >> =20 >> >t > =20 > >>FileConfiguration.java:157) >> at >>org.apache.commons.configuration.AbstractFileConfiguration.load(Abstra c >> =20 >> >t > =20 > >>FileConfiguration.java:124) >> at >>org.apache.commons.configuration.AbstractFileConfiguration.load(Abstra c >> =20 >> >t > =20 > >>FileConfiguration.java:63) >> at >>oakland.btrade.tactic.config.test.ReadingTest.testOneAssistant(Reading T >> =20 >> >e > =20 > >>st.java:42) >> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >> at >>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j a >> =20 >> >v > =20 > >>a:39) >> at >>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccess o >> =20 >> >r > =20 > >>Impl.java:25) >> at java.lang.reflect.Method.invoke(Method.java:585) >> at junit.framework.TestCase.runTest(TestCase.java:154) >> at junit.framework.TestCase.runBare(TestCase.java:127) >> at junit.framework.TestResult$1.protect(TestResult.java:106) >> at junit.framework.TestResult.runProtected(TestResult.java:124) >> at junit.framework.TestResult.run(TestResult.java:109) >> at junit.framework.TestCase.run(TestCase.java:118) >> at junit.framework.TestSuite.runTest(TestSuite.java:208) >> at junit.framework.TestSuite.run(TestSuite.java:203) >> at >>org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(Remote T >> =20 >> >e > =20 > >>stRunner.java:478) >> at >>org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestR u >> =20 >> >n > =20 > >>ner.java:344) >> at >>org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTest R >> =20 >> >u > =20 > >>nner.java:196) >> >> >> >> >> >>-----Original Message----- >>From: Oliver Heger [mailto:oliver.heger@t-online.de]=20 >>Sent: Tuesday, December 20, 2005 7:44 AM >>To: Jakarta Commons Users List >>Subject: Re: XMLConfiguration load problem - External Entity not found >> >>William Evans wrote: >> >>=20 >> >> =20 >> >>>I am using 'commons-configuration-1.2.jar' to make it easier to read >>> =20 >>> >>> =20 >>> >>XML >>=20 >> >> =20 >> >>>configuration files. >>> >>> >>> >>>The files are not terribly complex but do have associated DTDs. >>> =20 >>> >Ideally > =20 > >>>I would like to specify the DTD location using a local, relative path. >>>The problem is that when I try and load the file, I get: >>> >>> >>> >>>Relative URI "../../../yyyy.dtd"; can not be resolved without a base >>>URI. >>> >>> >>> >>>So, after reading about a similar problem with solution posted by >>>Oliver, I tried specifying the full path. Now I get: >>> >>> >>> >>>External entity not found: >>>"file://C:/eclipse/workspace/xxxx/dtds/yyyyy.dtd".=20 >>> >>> >>> >>>Or... >>> >>> >>> >>>External entity not found: "C:/eclipse/workspace/xxxx/dtds/yyyyy.dtd". >>> >>> >>> >>>What is up here? Is the use of DTDs not really supported? In the >>> =20 >>> >>> =20 >>> >>article >>=20 >> >> =20 >> >>>I found, Oliver said that he had fixed the relative path problem. Is >>>there some other issue going on? >>> >>> >>> >>>Any help much appreciated... >>> >>> >>> >>>Bill >>> >>> >>> >>> =20 >>> >>> =20 >>> >>Could you please provide a code fragment how you setup and load your >>XMLConfiguration instance? And full stack traces of exceptions might be >>useful, too. >> >>The mentioned fix should be in 1.2. There is a unit test that tests >>loading a document that refers to a local DTD. But maybe not all >>posibilities are covered? >> >>Oliver >> >>--------------------------------------------------------------------- >>To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org >>For additional commands, e-mail: commons-user-help@jakarta.apache.org >> >> >>--------------------------------------------------------------------- >>To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org >>For additional commands, e-mail: commons-user-help@jakarta.apache.org >> >> >>=20 >> >> =20 >> > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org >For additional commands, e-mail: commons-user-help@jakarta.apache.org > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org >For additional commands, e-mail: commons-user-help@jakarta.apache.org > > > =20 > --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org