Re: NullPointerException in ERXLogger.getERXLogger
Re: NullPointerException in ERXLogger.getERXLogger
- Subject: Re: NullPointerException in ERXLogger.getERXLogger
- From: Anjo Krank <email@hidden>
- Date: Wed, 27 Feb 2008 13:51:34 +0100
ERXLogger has long since been gone.
The frameworks are by no means a drag and drop replace and I can't
figure why you would even want to do it?
You need to actually build and deploy a new version of your apps.
Cheers, Anjo
Am 27.02.2008 um 13:11 schrieb Yung-Luen Lan:
Hi all,
I'm a newbie of both WebObjects and server programming who is
responsible to maintain a WO project left by other guy several years
ago. I've added some features and tested in Eclipse. However, during
these year, I always encountered a problem when I want to update the
ERExtensions.framework in /Library/Frameworks.
When I replace the original ERExtensions.framework (whose version is
believed ≤ Project WONDER 3) with new one, I got the exception:
Exception in thread "main" java.lang.ExceptionInInitializerError
Caused by: java.lang.NullPointerException
at org.apache.log4j.Hierarchy.getLogger(Hierarchy.java:271)
at org.apache.log4j.LogManager.getLogger(LogManager.java:220)
at org.apache.log4j.Logger.getLogger(Logger.java:156)
at er.extensions.ERXLogger.getLogger(ERXLogger.java:111)
at er.extensions.ERXLogger.getERXLogger(ERXLogger.java:91)
at er.extensions.ERXLogger.getERXLogger(ERXLogger.java:121)
at woserver.Application.<clinit>(Application.java:25)
And that's the very first line of my project.
public class Application extends ERXApplication {
public static final ERXLogger log =
ERXLogger.getERXLogger(Application.class);
I've my Properties file configured like this:
==== BEGIN OF PART OF MY PROPERTIES FILE ====
er.extensions.ERXLocalizer.frameworkSearchPath = (app,ERExtensions)
er.extensions.ERXLocalizer.defaultLanguage = English
er.extensions.ERXLocalizer.availableLanguages = (English, Chinese)
### Enterprise Objects ###
er.extensions.ERXRaiseOnMissingEditingContextDelegate = false
### Application Name ###
er.extensions.ERXApplicationHostURL = localhost
#########################################################################
# Log4j Configuration
#########################################################################
log4j.rootLogger = INFO, A1, A2
log4j.loggerFactory=er.extensions.ERXLogger$Factory
# Appenders
log4j.appender.A1 = org.apache.log4j.ConsoleAppender
log4j.appender.A2 = org.apache.log4j.DailyRollingFileAppender
log4j.appender.A2.datePattern='.'yyyy-MM-dd
log4j.appender.A2.append = true
log4j.appender.A2.File = /var/log/woproject/woproject.log
# A1, A2 uses PatternLayout.
log4j.appender.A1.layout = er.extensions.ERXPatternLayout
log4j.appender.A2.layout = er.extensions.ERXPatternLayout
# This pattern will produce logs that look like:
# 2002-06-18 17:46:18,292 MyAppName[4002:9133 0] MyCategory
(MyClass.java:40) - Some log
log4j.appender.A1.layout.ConversionPattern = %d{ISO8601} %-5p
%W{n[i:p s]} %c{1} (%F:%L) %x - %m%n
log4j.appender.A2.layout.ConversionPattern = %d{ISO8601} %-5p
%W{n[i:p s]} %c{1} (%F:%L) %x - %m%n
# Note that %F and %L is fairly slow and shouldn't be used in
performance intensive logging
########################################################################
# Custom Categories - These are the main categories and sub categories
# that are used in frameworks.
########################################################################
# Base Category
log4j.logger.er = INFO
log4j.logger.er.extensions.ERXNSLogLog4jBridge = INFO
log4j.additivity.er.extensions.ERXNSLogLog4jBridge = false
log4j.logger.er.changenotification = INFO
==== END OF PART OF MY PROPERTIES FILE ====
Hence, I must copy the old ERExtensions to a new environment every
time. Did I miss something?
An extra question: when you add some features to your wo project,
how do you stop the current running wo server and start the new one?
I don't know how to do this so I run my server inside eclipse. I
know it's stupid, but I couldn't find the answer. Maybe it's too
basic to document?
Regards,
yllan _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden