make sure, the log4j.jar is not present in the WEB-INF/lib of your
webapp. i assume there is a clash in the classloader hierarchy.
On 1/11/06, Humer Günther <[EMAIL PROTECTED]> wrote:
> I developed a Session-Bean which creates a Repository with
> RepositoryConfig.create.
>
>
> public void startRepository() throws Exception {
> Repository rep;
> String repHome = "jackrep";
> String repConfig = "repository.xml";
>
> InputStream stream = getStream(repConfig);
> RepositoryConfig config = RepositoryConfig.create(stream, repHome);
>
> rep = RepositoryImpl.create(config);
> }
>
>
> The EAR contains the Bean and Jackrabbit-lib and the dependencies.
> I am using JBoss 4.0.3SP1 as the ApplicationServer
>
> When I call the Method I get a ClassCastException [1], which seems to come
> from log4j.
> I inspected the log4j of JBoss and Jackrabbit, they're both 1.2.8...
> Any suggestions??
>
> If I execute the Method locally (without running the Bean on Jboss, it
> succeeds.
>
>
> [1]
> 15:11:40,838 INFO [STDOUT] log4j:ERROR A
> "org.jboss.logging.util.OnlyOnceErrorHandler" object is not assignable to a
> "org.apache.log4j.spi.ErrorHandler" variable.
> 15:11:40,838 INFO [STDOUT] log4j:ERROR The class
> "org.apache.log4j.spi.ErrorHandler" was loaded by
> 15:11:40,838 INFO [STDOUT] log4j:ERROR [EMAIL PROTECTED]
> url=file:/D:/Program
> Files/jboss/jboss-4.0.3SP1/server/default/tmp/deploy/tmp10849dms.ear
> ,addedOrder=58}] whereas object of type
> 15:11:40,838 INFO [STDOUT] log4j:ERROR
> "org.jboss.logging.util.OnlyOnceErrorHandler" was loaded by [EMAIL PROTECTED]
> 15:11:40,978 INFO [STDOUT] log4j:ERROR Could not create an Appender.
> Reported error follows.
> 15:11:40,978 INFO [STDOUT] java.lang.ClassCastException:
> org.jboss.logging.appender.DailyRollingFileAppender
> 15:11:40,978 INFO [STDOUT] at
> org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:165)
> 15:11:40,978 INFO [STDOUT] at
> org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:140)
> 15:11:40,978 INFO [STDOUT] at
> org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurator.java:153)
> 15:11:40,978 INFO [STDOUT] at
> org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMConfigurator.java:415)
> 15:11:40,978 INFO [STDOUT] at
> org.apache.log4j.xml.DOMConfigurator.parseRoot(DOMConfigurator.java:384)
> 15:11:40,978 INFO [STDOUT] at
> org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:783)
> 15:11:40,978 INFO [STDOUT] at
> org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:666)
> 15:11:40,978 INFO
>
> ...
>
--
-----------------------------------------< [EMAIL PROTECTED] >---
Tobias Bocanegra, Day Management AG, Barfuesserplatz 6, CH - 4001 Basel
T +41 61 226 98 98, F +41 61 226 98 97
-----------------------------------------------< http://www.day.com >---