You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by jw...@javaclientcookbook.net on 2008/01/28 18:31:10 UTC

[configuration] Config + Digester NoSuchMethodException

This is only happening on one box and I can't figure out why because  
every other box with (seemingly) the same jar files is working just  
fine.

org.apache.commons.configuration.ConfigurationException: SAX Exception caught
	at  
org.apache.commons.configuration.ConfigurationFactory.getConfiguration(ConfigurationFactory.java:169)
    [my own code]
Caused by: java.lang.NoSuchMethodException: No such accessible method:  
addConfiguration() on object:  
org.apache.commons.configuration.ConfigurationFactory$ConfigurationBuilder
	at  
org.apache.commons.digester.Digester.createSAXException(Digester.java:2792)
	at  
org.apache.commons.digester.Digester.createSAXException(Digester.java:2818)
	at org.apache.commons.digester.Digester.endElement(Digester.java:1070)
	at  
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:633)
	at  
com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:221)
	at  
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:872)
	at  
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1693)
	at  
com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368)
	at  
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834)
	at  
com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764)
	at  
com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148)
	at  
com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242)
	at org.apache.commons.digester.Digester.parse(Digester.java:1591)
	at  
org.apache.commons.configuration.ConfigurationFactory.getConfiguration(ConfigurationFactory.java:163)
	... 11 more

Any ideas?  It still happens even if I switch versions of digester and  
config jar files, and when I tried replacing the JVM.

thanks
Joe


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: [configuration] Config + Digester NoSuchMethodException

Posted by jw...@javaclientcookbook.net.
Quoting Oliver Heger <ol...@oliver-heger.de>:

> jws@javaclientcookbook.net schrieb:
>> Quoting Oliver Heger <ol...@oliver-heger.de>:
>>
>>> jws@javaclientcookbook.net schrieb:
>>>> This is only happening on one box and I can't figure out why    
>>>> because every other box with (seemingly) the same jar files is    
>>>> working just fine.
>>>>
>>>> org.apache.commons.configuration.ConfigurationException: SAX    
>>>> Exception caught
>>>>   at    
>>>> org.apache.commons.configuration.ConfigurationFactory.getConfiguration(ConfigurationFactory.java:169)    [my own    
>>>> code]
>>>> Caused by: java.lang.NoSuchMethodException: No such accessible    
>>>> method: addConfiguration() on object:    
>>>> org.apache.commons.configuration.ConfigurationFactory$ConfigurationBuilder   at    
>>>> org.apache.commons.digester.Digester.parse(Digester.java:1591)
>>>>   at  [...]
>>>> org.apache.commons.configuration.ConfigurationFactory.getConfiguration(ConfigurationFactory.java:163)     ... 11    
>>>> more
>>>>
>>>> Any ideas?  It still happens even if I switch versions of   
>>>> digester  and config jar files, and when I tried replacing the JVM.
>>>>
>>>> thanks
>>>> Joe
>>>>
>>> Hm,
>>>
>>> looks like jar hell. Which versions of configuration and digester do
>>> you use? Is it possible that jars with different version numbers are on
>>> your class path? Or that jars are in the lib/ext directory of your JRE?
>>
>> I know it looks like jar hell.  However, I've done this with   
>> multiple versions of the digester and config jars including the   
>> latest and greatest (digest 1.8 and config 1.4).
>>
>> And in a slightly different environment/setup (embedded in a JBoss   
>> server), the jar files that I should be using (config 1.1 and the   
>> digester that's bundled with struts 1.2.9) have no problem at all.   
>>  This only came about when trying to make a standalone version of   
>> the code to debug an SSL connectivity issue.
>>
>> Joe
>>
> So does the application that causes the problem run on a JBoss or as a
> plain Java application?
>
> In the latter case, when you have full control over the class path,
> this should really be unproblematic, shouldn't it?
>
> In case of a server environment: Could it be a class loader issue, e.g.
> a digester version in the server's lib directory could be used, which
> does not see your application classes?

The server environment is the one that works (it just has the SSL  
issues that I'm trying to isolate and debug).

It's making it standalone that doesn't work.

And I've been doing Java and arguing with classpaths since 1996 so I  
think I'm pretty sure I'd already ruled the basics.  It should be  
unproblematic which is why I'm posting it here.

I mean, you really can't get much simpler than

set JAVA_HOME=C:\jdk1.5.0_06

set L=..\lib

set CP=%L%\[my code .jar]
set CP=%CP%;%L%\collections.jar
set CP=%CP%;%L%\commons-logging.jar
set CP=%CP%;.\commons-configuration-1.1.jar
set CP=%CP%;.\commons-lang-2.1.jar
set CP=%CP%;.\commons-digester.jar
set CP=%CP%;.\commons-beanutils.jar
set CP=%CP%;.\junit.jar
set CP=%CP%;..\.

%JAVA_HOME%\bin\java -classpath %CP% junit.awtui.TestRunner my.test.case

Yet i get this failure for every combination of digester +  
configuration that I've tried.

> Sorry, just guessing...

no worries.



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: [configuration] Config + Digester NoSuchMethodException

Posted by Oliver Heger <ol...@oliver-heger.de>.
jws@javaclientcookbook.net schrieb:
> Quoting Oliver Heger <ol...@oliver-heger.de>:
> 
>> jws@javaclientcookbook.net schrieb:
>>> This is only happening on one box and I can't figure out why  because 
>>> every other box with (seemingly) the same jar files is  working just 
>>> fine.
>>>
>>> org.apache.commons.configuration.ConfigurationException: SAX  
>>> Exception caught
>>>    at  
>>> org.apache.commons.configuration.ConfigurationFactory.getConfiguration(ConfigurationFactory.java:169)    
>>> [my own  code]
>>> Caused by: java.lang.NoSuchMethodException: No such accessible  
>>> method: addConfiguration() on object:  
>>> org.apache.commons.configuration.ConfigurationFactory$ConfigurationBuilder 
>>>
>>>    at  org.apache.commons.digester.Digester.parse(Digester.java:1591)
>>>    at  [...]
>>> org.apache.commons.configuration.ConfigurationFactory.getConfiguration(ConfigurationFactory.java:163)     
>>> ... 11  more
>>>
>>> Any ideas?  It still happens even if I switch versions of digester  
>>> and config jar files, and when I tried replacing the JVM.
>>>
>>> thanks
>>> Joe
>>>
>> Hm,
>>
>> looks like jar hell. Which versions of configuration and digester do
>> you use? Is it possible that jars with different version numbers are on
>> your class path? Or that jars are in the lib/ext directory of your JRE?
> 
> I know it looks like jar hell.  However, I've done this with multiple 
> versions of the digester and config jars including the latest and 
> greatest (digest 1.8 and config 1.4).
> 
> And in a slightly different environment/setup (embedded in a JBoss 
> server), the jar files that I should be using (config 1.1 and the 
> digester that's bundled with struts 1.2.9) have no problem at all.  This 
> only came about when trying to make a standalone version of the code to 
> debug an SSL connectivity issue.
> 
> Joe
> 
So does the application that causes the problem run on a JBoss or as a 
plain Java application?

In the latter case, when you have full control over the class path, this 
should really be unproblematic, shouldn't it?

In case of a server environment: Could it be a class loader issue, e.g. 
a digester version in the server's lib directory could be used, which 
does not see your application classes?

Sorry, just guessing...

Oliver

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: [configuration] Config + Digester NoSuchMethodException

Posted by jw...@javaclientcookbook.net.
Quoting Oliver Heger <ol...@oliver-heger.de>:

> jws@javaclientcookbook.net schrieb:
>> This is only happening on one box and I can't figure out why   
>> because every other box with (seemingly) the same jar files is   
>> working just fine.
>>
>> org.apache.commons.configuration.ConfigurationException: SAX   
>> Exception caught
>>    at   
>> org.apache.commons.configuration.ConfigurationFactory.getConfiguration(ConfigurationFactory.java:169)    [my own   
>> code]
>> Caused by: java.lang.NoSuchMethodException: No such accessible   
>> method: addConfiguration() on object:   
>> org.apache.commons.configuration.ConfigurationFactory$ConfigurationBuilder
>>    at  org.apache.commons.digester.Digester.parse(Digester.java:1591)
>>    at  [...]
>> org.apache.commons.configuration.ConfigurationFactory.getConfiguration(ConfigurationFactory.java:163)     ... 11   
>> more
>>
>> Any ideas?  It still happens even if I switch versions of digester   
>> and config jar files, and when I tried replacing the JVM.
>>
>> thanks
>> Joe
>>
> Hm,
>
> looks like jar hell. Which versions of configuration and digester do
> you use? Is it possible that jars with different version numbers are on
> your class path? Or that jars are in the lib/ext directory of your JRE?

I know it looks like jar hell.  However, I've done this with multiple  
versions of the digester and config jars including the latest and  
greatest (digest 1.8 and config 1.4).

And in a slightly different environment/setup (embedded in a JBoss  
server), the jar files that I should be using (config 1.1 and the  
digester that's bundled with struts 1.2.9) have no problem at all.   
This only came about when trying to make a standalone version of the  
code to debug an SSL connectivity issue.

Joe



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Re: [configuration] Config + Digester NoSuchMethodException

Posted by Oliver Heger <ol...@oliver-heger.de>.
jws@javaclientcookbook.net schrieb:
> This is only happening on one box and I can't figure out why because 
> every other box with (seemingly) the same jar files is working just fine.
> 
> org.apache.commons.configuration.ConfigurationException: SAX Exception 
> caught
>     at 
> org.apache.commons.configuration.ConfigurationFactory.getConfiguration(ConfigurationFactory.java:169) 
> 
>    [my own code]
> Caused by: java.lang.NoSuchMethodException: No such accessible method: 
> addConfiguration() on object: 
> org.apache.commons.configuration.ConfigurationFactory$ConfigurationBuilder
>     at 
> org.apache.commons.digester.Digester.createSAXException(Digester.java:2792)
>     at 
> org.apache.commons.digester.Digester.createSAXException(Digester.java:2818)
>     at org.apache.commons.digester.Digester.endElement(Digester.java:1070)
>     at 
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:633) 
> 
>     at 
> com.sun.org.apache.xerces.internal.parsers.AbstractXMLDocumentParser.emptyElement(AbstractXMLDocumentParser.java:221) 
> 
>     at 
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(XMLDocumentFragmentScannerImpl.java:872) 
> 
>     at 
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(XMLDocumentFragmentScannerImpl.java:1693) 
> 
>     at 
> com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:368) 
> 
>     at 
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:834) 
> 
>     at 
> com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:764) 
> 
>     at 
> com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:148) 
> 
>     at 
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1242) 
> 
>     at org.apache.commons.digester.Digester.parse(Digester.java:1591)
>     at 
> org.apache.commons.configuration.ConfigurationFactory.getConfiguration(ConfigurationFactory.java:163) 
> 
>     ... 11 more
> 
> Any ideas?  It still happens even if I switch versions of digester and 
> config jar files, and when I tried replacing the JVM.
> 
> thanks
> Joe
> 
Hm,

looks like jar hell. Which versions of configuration and digester do you 
use? Is it possible that jars with different version numbers are on your 
class path? Or that jars are in the lib/ext directory of your JRE?

Oliver

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org