aspose file tools*
The moose likes BEA/Weblogic and the fly likes log4j:ERROR Could not create an Appender on Weblogic91 startup Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "log4j:ERROR Could not create an Appender on Weblogic91 startup" Watch "log4j:ERROR Could not create an Appender on Weblogic91 startup" New topic
Author

log4j:ERROR Could not create an Appender on Weblogic91 startup

Vishnu Murthy
Ranch Hand

Joined: Jan 04, 2001
Posts: 56
HI,
We are working on weblogic 6.1 to Weblogic9.1 upgrade. In our application we are using our appender class DatabaseAppender.class to log the message in the database,it is working in in Windows.

but when I start my weblogic9.1 server in Solaris I am getting the following exception at startup

log4j:ERROR Could not create an Appender. Reported error follows.
java.lang.ClassNotFoundException: com.tuiuk.greenfield.foundation.logging.log4j.DatabaseAppender
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericCla
ssLoader.java:222)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoa
der.java:195)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoa
der.java:130)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:164)
at org.apache.log4j.helpers.Loader.loadClass(Loader.java:160)
at org.apache.log4j.xml.DOMConfigurator.parseAppender(DOMConfigurator.java:
164)
at org.apache.log4j.xml.DOMConfigurator.findAppenderByName(DOMConfigurator.
java:140)
at org.apache.log4j.xml.DOMConfigurator.findAppenderByReference(DOMConfigur
ator.java:153)
at org.apache.log4j.xml.DOMConfigurator.parseChildrenOfLoggerElement(DOMCon
figurator.java:415)

This message is still there, but I am giving only somelines.

Any help appreciated.

Thanks
-Vishnu
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8873
    
    8

Obviously log4j can't find your class, com.tuiuk.greenfield.foundation.logging.log4j.DatabaseAppender. Check the environment between your two systems. It's a good idea to print out the classpath and command line in your server startup scripts immediately before invoking the "java . . . weblogic.Server" command to make sure you are using the settings you think you are.
Are your Windows and Solaris servers both WLS 9.1 or is one 9.1 and one is 6.1?
Are you using an automated build to create and deploy your application? If not, you may be missing classes when you construct your application. If so, your environment may be different between machines.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Vishnu Murthy
Ranch Hand

Joined: Jan 04, 2001
Posts: 56
Hi Joe,
But it is able to identify the other classes in the same package, we have serveral other classes in the same pacakge.

Both my windows and solaris are running on weblogic9.1, I am not getting this exception in Windows, only on solaris it is happening.

And we are using automated build script to create and deploy the application.
Vishnu Murthy
Ranch Hand

Joined: Jan 04, 2001
Posts: 56
Hi Joe,
I have placed the required jar file in the lib directory of my server, then the problem is solved.

Thank you.

-Vishnu
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: log4j:ERROR Could not create an Appender on Weblogic91 startup