jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Humer G√ľnther <Guenther.Hu...@ams-engineering.com>
Subject WG: EJB-Access to Repository
Date Wed, 11 Jan 2006 15:08:20 GMT
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. 

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 [org.jboss.mx.loading.UnifiedClassLoader3@12edf9a{
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 [org.jboss.system.server.NoAnnotationURLClassLoader@4e79f1].
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


View raw message