Hi, I found the answer to the "Resin 4 - Error using log4j - ClassNotFoundException for RollingFileApender " problem I posted yesterday. I had to include apache-log4j-extras.jar in the ${resin.home}/lib directory. My question now is - is it ok to include this and log4j.jar in the lib directory or should I put it in a different lib called ext-lib or in webapp-jars?
Thanks very much for your help! Sadhana On Thu, Apr 17, 2014 at 10:00 AM, <resin-interest-requ...@caucho.com> wrote: > Send resin-interest mailing list submissions to > resin-interest@caucho.com > > To subscribe or unsubscribe via the World Wide Web, visit > http://maillist.caucho.com/mailman/listinfo/resin-interest > or, via email, send a message with subject or body 'help' to > resin-interest-requ...@caucho.com > > You can reach the person managing the list at > resin-interest-ow...@caucho.com > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of resin-interest digest..." > > > Today's Topics: > > 1. Resin 4 - Error using log4j - ClassNotFoundException for > RollingFileApender (Sadhana Jain) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Wed, 16 Apr 2014 16:40:07 -0700 > From: Sadhana Jain <sadhana.j...@veeva.com> > Subject: [Resin-interest] Resin 4 - Error using log4j - > ClassNotFoundException for RollingFileApender > To: "resin-interest@caucho.com" <resin-interest@caucho.com> > Message-ID: > <CAA+27E= > 2ot++-6ej5pkf_frntg-wcsjn2ojuz+qlqnpud2c...@mail.gmail.com> > Content-Type: text/plain; charset="iso-8859-1" > > Hi, > > We use log4j.xml with reain 3.1 but when trying to use the same > configuration with resin 4 I am running into the following error. > In 3.1, we have log4j.jar in a ext-lib directory and in the config file we > are loading the jars in the ext-lib like this: > <class-loader> > <tree-loader path="${resin.home}/ext-lib"/> > </class-loader> > > In resin.xml for resin 4 I have it like this: > <class-loader> > <tree-loader path="${__DIR__}/ext-lib"/> > </class-loader> > > And I have log4j.jar in the created ext-lib dir. I still see this error in > the log file. Can you please help to figure this out? > Do I need to add the log4j.jar or does it come with resin 4? And if so, it > didn't work when I didn't add it. If I need to add it, > is this the right way or it has changed for resin 4? > > > [2014-04-16 16:23:39.952] resin-44 log4j:WARN The content of element type > "log4j:configuration" must match > > "(renderer*,throwableRenderer?,appender*,plugin*,(category|logger)*,root?,(categoryFactory|loggerFactory)?)". > [2014-04-16 16:23:39.996] resin-44 log4j:ERROR Could not create an > Appender. Reported error follows. > [2014-04-16 16:23:39.996] resin-44 java.lang.ClassNotFoundException: > org.apache.log4j.rolling.RollingFileAppender (in > > EnvironmentClassLoader[web-app:production/webapp/default/multichannel,STARTING]) > [2014-04-16 16:23:39.997] resin-44 at > > com.caucho.loader.DynamicClassLoader.loadClass(DynamicClassLoader.java:1532) > [2014-04-16 16:23:39.997] resin-44 at > > com.caucho.loader.DynamicClassLoader.loadClass(DynamicClassLoader.java:1502) > [2014-04-16 16:23:39.997] resin-44 at java.lang.Class.forName0(Native > Method) > [2014-04-16 16:23:39.997] resin-44 at > java.lang.Class.forName(Class.java:190) > [2014-04-16 16:23:39.997] resin-44 at > org.apache.log4j.helpers.Loader.loadClass(Loader.java:198) > [2014-04-16 16:23:39.997] resin-44 at > > org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:247) > [2014-04-16 16:23:39.998] resin-44 at > > org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.java:176) > [2014-04-16 16:23:39.998] resin-44 at > > org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigurator.java:191) > [2014-04-16 16:23:39.998] resin-44 at > > org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMConfigurator.java:523) > [2014-04-16 16:23:39.998] resin-44 at > > org.apache.log4j.xml.DOMConfigurator.parseCategory(DOMConfigurator.java:436) > [2014-04-16 16:23:39.998] resin-44 at > org.apache.log4j.xml.DOMConfigurator.parse(DOMConfigurator.java:1004) > [2014-04-16 16:23:39.999] resin-44 at > org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:872) > [2014-04-16 16:23:39.999] resin-44 at > org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:778) > [2014-04-16 16:23:39.999] resin-44 at > > org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:526) > [2014-04-16 16:23:39.999] resin-44 at > org.apache.log4j.LogManager.<clinit>(LogManager.java:127) > [2014-04-16 16:23:39.999] resin-44 at > org.apache.log4j.Logger.getLogger(Logger.java:104) > [2014-04-16 16:23:40.000] resin-44 at > org.apache.commons.logging.impl.Log4JLogger.getLogger(Log4JLogger.java:289) > [2014-04-16 16:23:40.000] resin-44 at > org.apache.commons.logging.impl.Log4JLogger.<init>(Log4JLogger.java:109) > [2014-04-16 16:23:40.000] resin-44 at > sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) > [2014-04-16 16:23:40.000] resin-44 at > > sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) > [2014-04-16 16:23:40.000] resin-44 at > > sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) > [2014-04-16 16:23:40.001] resin-44 at > java.lang.reflect.Constructor.newInstance(Constructor.java:526) > [2014-04-16 16:23:40.001] resin-44 at > > org.apache.commons.logging.impl.LogFactoryImpl.createLogFromClass(LogFactoryImpl.java:1116) > [2014-04-16 16:23:40.001] resin-44 at > > org.apache.commons.logging.impl.LogFactoryImpl.discoverLogImplementation(LogFactoryImpl.java:914) > [2014-04-16 16:23:40.002] resin-44 at > > org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:604) > [2014-04-16 16:23:40.002] resin-44 at > > org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:336) > [2014-04-16 16:23:40.002] resin-44 at > > org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:310) > [2014-04-16 16:23:40.002] resin-44 at > org.apache.commons.logging.LogFactory.getLog(LogFactory.java:685) > [2014-04-16 16:23:40.002] resin-44 at > org.hibernate.ejb.Ejb3Configuration.<clinit>(Ejb3Configuration.java:105) > [2014-04-16 16:23:40.003] resin-44 at > > org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:130) > [2014-04-16 16:23:40.003] resin-44 at > > com.caucho.env.jpa.PersistenceUnitManager.createDelegate(PersistenceUnitManager.java:425) > [2014-04-16 16:23:40.003] resin-44 at > > com.caucho.env.jpa.PersistenceUnitManager.start(PersistenceUnitManager.java:386) > [2014-04-16 16:23:40.004] resin-44 at > > com.caucho.env.jpa.PersistenceManager.startPersistenceUnits(PersistenceManager.java:367) > > Thanks a lot for your help! > Sadhana > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: > http://maillist.caucho.com/pipermail/resin-interest/attachments/20140416/e7cf81b1/attachment-0001.html > > ------------------------------ > > _______________________________________________ > resin-interest mailing list > resin-interest@caucho.com > http://maillist.caucho.com/mailman/listinfo/resin-interest > > > End of resin-interest Digest, Vol 94, Issue 7 > ********************************************* >
_______________________________________________ resin-interest mailing list resin-interest@caucho.com http://maillist.caucho.com/mailman/listinfo/resin-interest