From: Larry Mills-G. <lm...@we...> - 2011-07-07 13:23:56
|
I'm having difficulty with a framework that has been working well for a while and now is throwing an error (apparently) because of a null ERXLogger.Factory when the er.jdbcadaptor.ERAdaptorContextDelegate tries to initialize: Caused by: java.lang.NullPointerException at org.apache.log4j.Hierarchy.getLogger(Hierarchy.java:270) at org.apache.log4j.LogManager.getLogger(LogManager.java:209) at org.apache.log4j.Logger.getLogger(Logger.java:155) at er.extensions.logging.ERXLogger.getLogger(ERXLogger.java:128) at er.extensions.logging.ERXLogger.getERXLogger(ERXLogger.java:105) at er.extensions.logging.ERXLogger.getERXLogger(ERXLogger.java:141) at er.jdbcadaptor.ERAdaptorContextDelegate.<clinit>(ERAdaptorContextDelegate.java:21) ... 24 more I inserted a log statement in ERXLogger in the static method (line 125): public static Logger getLogger(String name) and get the following output just before the exception. Jul 07 08:57:31 N/A[N/A] DEBUG org.apache.log4j.Logger - Logger.getLogger(String name) : Logger.getLogger(String: er.jdbcadaptor.ERAdaptorContextDelegate,ERXLogger.factory: null) I've tried removing any extraneous log4j jars and making sure that jars are the same version (1.2.16) anywhere they are found. Does anybody have any idea what I can try next? I would appreciate any help or suggestions. Thanks. Larry Mills-Gahl The entire message reported in the console is: Jul 07 08:57:31 N/A[N/A] DEBUG org.apache.log4j.Logger - ERXLogger.getERXLogger(clazz): er.jdbcadaptor.ERAdaptorContextDelegate Jul 07 08:57:31 N/A[N/A] DEBUG org.apache.log4j.Logger - ERXLogger.getLogger(er.jdbcadaptor.ERAdaptorContextDelegate) static Jul 07 08:57:31 N/A[N/A] DEBUG org.apache.log4j.Logger - Logger.getLogger(String name) : Logger.getLogger(String: er.jdbcadaptor.ERAdaptorContextDelegate,ERXLogger.factory: null) Jul 07 08:57:31 N/A[N/A] WARN NSLog - A fatal exception occurred: null [2011-7-7 8:57:31 EDT] <Thread-8> java.lang.ExceptionInInitializerError at er.jdbcadaptor.PrincipalClass.<clinit>(PrincipalClass.java:21) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:169) at com.webobjects.foundation._NSUtilities._classWithPartialName(_NSUtilities.java:350) at com.webobjects.foundation._NSUtilities.classWithName(_NSUtilities.java:334) at com.webobjects.foundation.NSBundle.initPrincipalClass(NSBundle.java:2410) at com.webobjects.foundation.NSBundle.InitPrincipalClasses(NSBundle.java:719) at com.webobjects.foundation.NSBundle.<clinit>(NSBundle.java:376) at com.webobjects.appserver.WOResourceManager.__getJavaWebObjectsResourceAsStream(WOResourceManager.java:116) at com.webobjects.appserver._private.WOProperties.initUserDefaultsKeys(WOProperties.java:317) at com.webobjects.appserver.WOApplication._initWOApp(WOApplication.java:5743) at com.webobjects.appserver.WOApplication.<init>(WOApplication.java:779) at er.extensions.appserver.ajax.ERXAjaxApplication.<init>(ERXAjaxApplication.java:24) at er.extensions.appserver.ERXApplication.<init>(ERXApplication.java:1036) at com.vascalert.apps.VAReportinator.Application.<init>(Application.java:18) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at java.lang.Class.newInstance0(Class.java:355) at java.lang.Class.newInstance(Class.java:308) at com.webobjects.appserver.WOApplication.main(WOApplication.java:547) at er.extensions.appserver.ERXApplication.main(ERXApplication.java:820) at com.vascalert.apps.VAReportinator.Application.main(Application.java:15) Caused by: java.lang.NullPointerException at org.apache.log4j.Hierarchy.getLogger(Hierarchy.java:270) at org.apache.log4j.LogManager.getLogger(LogManager.java:209) at org.apache.log4j.Logger.getLogger(Logger.java:155) at er.extensions.logging.ERXLogger.getLogger(ERXLogger.java:128) at er.extensions.logging.ERXLogger.getERXLogger(ERXLogger.java:104) at er.extensions.logging.ERXLogger.getERXLogger(ERXLogger.java:141) at er.jdbcadaptor.ERAdaptorContextDelegate.<clinit>(ERAdaptorContextDelegate.java:21) ... 24 more > ------------------------------------------------------------------------ > > William Hatch <mailto:wk...@me...> > July 6, 2011 5:57 PM > > > Hello Larry, apologies for not getting back to you sooner. I don't > remember the particular resolution of this issue, other than messing > around with with moving various jars in and out of the magic places on > the file system that they auto load from. I'll see if I can unarchive > the particular project and have a look at it's Libraries folder, etc. > I seem to recall possibly moving the log4j jar directly into the > project to get it to stop, but that's hazy... ;-) Wish I could be of > more help > > Bill > > > Larry Mills-Gahl <mailto:lm...@we...> > July 5, 2011 1:44 PM > > > William, > > I saw your question on the Wonder list and am having (what appears to > be) the same problem and am wondering how you solved your exception issue. > > After WOWODC, I updated to clean wonder source and then started having > problems with one of my EO Frameworks. (the framework where I keep > models for one of y apps). > I've banned all the old versions of log4j and am at 1.2.16. > > It seems that this conversation on the list between you and Chuck is > truncated before the solution. I wanted to ask how you solved this > before I go back to the list with questions. > > If you have any hints on where to look, I would really appreciate it. > > Thanks. > > Larry Mills-Gahl > > > ------------------------------------------------------------------------ > > Chuck Hill <mailto:ch...@gl...> > August 13, 2010 1:09 PM > > > That is a rather odd error. Are there any other caused by's lower in > the trace? > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by > > Make an app they can't live without > Enter the BlackBerry Developer Challenge > http://p.sf.net/sfu/RIM-dev2dev > _______________________________________________ > Wonder-disc mailing list > Won...@li... > https://lists.sourceforge.net/lists/listinfo/wonder-disc > ------------------------------------------------------------------------ > > William Hatch <mailto:wk...@me...> > August 13, 2010 1:05 PM > > > I've got 1.2.16 in the local Libraries; nothing in the magic > directory. Darn, this is frustrating > > Bill > > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by > > Make an app they can't live without > Enter the BlackBerry Developer Challenge > http://p.sf.net/sfu/RIM-dev2dev > _______________________________________________ > Wonder-disc mailing list > Won...@li... > https://lists.sourceforge.net/lists/listinfo/wonder-disc > > > ------------------------------------------------------------------------ > > Chuck Hill <mailto:ch...@gl...> > August 13, 2010 12:04 PM > > > Older version of log4j in /Library/WebObjects/Extensions? > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by > > Make an app they can't live without > Enter the BlackBerry Developer Challenge > http://p.sf.net/sfu/RIM-dev2dev > _______________________________________________ > Wonder-disc mailing list > Won...@li... > https://lists.sourceforge.net/lists/listinfo/wonder-disc |