commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "paul.hopper" <paul.hop...@mci.com>
Subject Re: [configuration] VerifyError
Date Wed, 06 Apr 2005 11:20:09 GMT
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
>>>> <?xml version="1.0" encoding="ISO-8859-1" ?>
>>>>
>>>> <configuration>
>>>>     <properties fileName="usergui.properties"/>
>>>>     <xml fileName="gui.xml"/>
>>>> </configuration>
>>>>
>>>> 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]]
>>>>
>>>> <?xml version="1.0" encoding="ISO-8859-1" ?>
>>>> <gui-definition>
>>>>   <colors>
>>>>     <background>#808080</background>
>>>>     <text>#000000</text>
>>>>     <header>#008000</header>
>>>>     <link normal="#000080" visited="#800080"/>
>>>>   </colors>
>>>>   <rowsPerPage>15</rowsPerPage>
>>>> </gui-definition>
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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


Mime
View raw message