• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

log4j:ERROR Could not create an Appender on Weblogic91 startup

 
Vishnu Murthy
Ranch Hand
Posts: 56
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9214
9
Linux Mac OS X Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Vishnu Murthy
Ranch Hand
Posts: 56
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 56
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Joe,
I have placed the required jar file in the lib directory of my server, then the problem is solved.

Thank you.

-Vishnu
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic