From commons-user-return-11475-apmail-jakarta-commons-user-archive=jakarta.apache.org@jakarta.apache.org Wed Apr 06 11:21:02 2005 Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 41488 invoked from network); 6 Apr 2005 11:21:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 6 Apr 2005 11:21:02 -0000 Received: (qmail 6204 invoked by uid 500); 6 Apr 2005 11:20:52 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 6133 invoked by uid 500); 6 Apr 2005 11:20:52 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: 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 6074 invoked by uid 99); 6 Apr 2005 11:20:52 -0000 X-ASF-Spam-Status: No, hits=0.1 required=10.0 tests=FORGED_RCVD_HELO X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from omzesmtp01.mci.com (HELO omzesmtp01.mci.com) (199.249.17.7) by apache.org (qpsmtpd/0.28) with ESMTP; Wed, 06 Apr 2005 04:20:51 -0700 Received: from dgismtp01.wcomnet.com ([166.38.58.141]) by firewall.mci.com (Iplanet MTA 5.2) with ESMTP id <0IEI0085DVHMY8@firewall.mci.com> for commons-user@jakarta.apache.org; Wed, 06 Apr 2005 11:20:10 +0000 (GMT) Received: from dgismtp01.wcomnet.com by dgismtp01.mcilink.com (iPlanet Messaging Server 5.2 HotFix 1.14 (built Mar 18 2003)) with SMTP id <0IEI00D01VHM6B@dgismtp01.mcilink.com> for commons-user@jakarta.apache.org; Wed, 06 Apr 2005 11:20:10 +0000 (GMT) Received: from [131.146.38.230] by dgismtp01.mcilink.com (iPlanet Messaging Server 5.2 HotFix 1.14 (built Mar 18 2003)) with ESMTP id <0IEI00C7XVHLVN@dgismtp01.mcilink.com> for commons-user@jakarta.apache.org; Wed, 06 Apr 2005 11:20:10 +0000 (GMT) Date: Wed, 06 Apr 2005 07:20:09 -0400 From: "paul.hopper" Subject: Re: [configuration] VerifyError In-reply-to: <4253C116.30303@med.uni-marburg.de> To: Jakarta Commons Users List Message-id: <4253C5E9.8090202@mci.com> MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7bit X-Accept-Language: en-us, en User-Agent: Mozilla Thunderbird 0.9 (Windows/20041103) References: <4252CDF1.4040107@mci.com> <42537A44.7010602@med.uni-marburg.de> <4253BF03.6060504@mci.com> <4253C116.30303@med.uni-marburg.de> X-Virus-Checked: Checked X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Oliver, Checked the Run->Classpath tab in Eclipse IDE and sure enough it had every cots library in a specific directory listed. Even those not specified in my project's->Properties->Java Build Path->Libraries 8-( I removed the defaults and added the required cots libs as below and it executed just fine. Many thanks for the pointer... hopp Oliver Heger wrote: > Is it possible that an old version of Xerces lies in your JDK/JRE > lib/ext directory? It appears at least in the stack trace. > > Oliver > > paul.hopper wrote: > >> Oliver, >> >> Current classspath: >> >> j2re-1.4.2_06 >> common-beanutils.jar (1.7.0) >> commons-configuration-1.1.jar >> commons-logging.jar (1.0.4) >> commons-digester.jar (1.6) >> commons-collections-3.1.jar >> commons-lang-2.0.jar >> log4j.jar >> >> hopp >> >> >> Oliver Heger wrote: >> >>> Looks like a problem with the XML parser you use. Which parsers do >>> you have in your classpath? >>> >>> If you use JDK 1.4.x, you don't have to bother about including a >>> specific parser; you can simply use the one shipped with the JDK. For >>> earlier JDKs in our dependencies we have defined Xerces in version >>> 2.2.1. >>> >>> Oliver >>> >>> paul.hopper wrote: >>> >>>> Good day, >>>> >>>> Thought that configuration might be an easy replacement for my >>>> properties configurator since it does both UNIX based key=value >>>> properties but also xml config files. Mine only does the former 8-( >>>> >>>> While setting up my test I came across an error while setting up >>>> this from example: >>>> >>>> #more config.xml >>>> >>>> >>>> >>>> >>>> >>>> >>>> >>>> My src code works fine with just the properties "fileName" but I get a >>>> >>>> 2005-04-05 13:25:52,211 [main] ERROR >>>> org.apache.commons.digester.Digester - Begin event threw error >>>> java.lang.VerifyError: (class: >>>> org/apache/xerces/jaxp/DocumentBuilderImpl, method: parse signature: >>>> (Lorg/xml/sax/InputSource;)Lorg/w3c/dom/Document;) Incompatible >>>> object argument for function call >>>> at >>>> org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(DocumentBuilderFactoryImpl.java:88) >>>> >>>> ...... >>>> ...... >>>> ...... >>>> >>>> with the xml "fileName" when using both loadConfigXML and >>>> loadConfigByFactory method class of my test class. Any suggestions? >>>> >>>> [[my src]] >>>> >>>> import java.io.File; >>>> import java.net.MalformedURLException; >>>> import java.net.URL; >>>> >>>> import org.apache.commons.configuration.Configuration; >>>> import org.apache.commons.configuration.ConfigurationException; >>>> import org.apache.commons.configuration.ConfigurationFactory; >>>> import org.apache.commons.configuration.XMLConfiguration; >>>> import org.apache.log4j.Logger; >>>> import org.apache.log4j.PropertyConfigurator; >>>> >>>> public class TestProperties { >>>> private Logger logger = Logger.getLogger(TestProperties.class); >>>> protected Configuration config = null; >>>> public TestProperties() { >>>> this.loadConfigByFactory(); >>>> //this.loadConfigXML(); >>>> //System.out.println("CONFIG::" + >>>> config.getString("DATABASES.DATABASE.DRIVER")); >>>> logger.info("colors.background = " + >>>> config.getString("colors.background")); >>>> logger.info("application.title = " + >>>> config.getString("application.title")); >>>> logger.info("rowsPerPage = " + config.getInt("rowsPerPage")); >>>> } >>>> public void loadConfigXML() { >>>> //ConfigurationFactory factory = new >>>> ConfigurationFactory("config.conf"); >>>> XMLConfiguration config = new XMLConfiguration(); >>>> config.setFileName("test.xml"); >>>> try { >>>> config.load(); >>>> } catch (ConfigurationException e) { >>>> logger.error(e); >>>> } logger.info("rowsPerPage = " + >>>> config.getInt("rowsPerPage")); >>>> } >>>> public void loadConfigByFactory() { >>>> ConfigurationFactory factory = new ConfigurationFactory(); >>>> URL configURL = null; >>>> try { >>>> configURL = new File("config.xml").toURL(); >>>> } catch (MalformedURLException mue) { >>>> logger.error("error loading config.conf: ", mue); >>>> } >>>> factory.setConfigurationFileName(configURL.toString()); >>>> try { >>>> config = factory.getConfiguration(); >>>> } catch (ConfigurationException ce) { >>>> logger.error("error loading configuration: ", ce); >>>> } >>>> } >>>> >>>> public static void main(String[] args) { >>>> PropertyConfigurator.configure("log4j.cfg"); >>>> new TestProperties(); >>>> } >>>> } >>>> >>>> [[my gui.xml]] >>>> >>>> >>>> >>>> >>>> #808080 >>>> #000000 >>>>
#008000
>>>> >>>>
>>>> 15 >>>>
>>>> >>>> --------------------------------------------------------------------- >>>> 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 >> >> > > --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org