Re: WONDER in Eclipse - app not launching
Re: WONDER in Eclipse - app not launching
- Subject: Re: WONDER in Eclipse - app not launching
- From: Chuck Hill <email@hidden>
- Date: Wed, 23 Aug 2006 15:05:58 -0700
On Aug 23, 2006, at 2:55 PM, John Larson wrote:
Thanks Chuck,
I thought I did.
// Configure log4j
PropertyConfigurator.configure("/Library/Preferences/
log4j.properties");
log = Logger.getLogger( Application.class );
log.debug("Log4j has been initialized");
Ah, see! You are trying to mess with Wonder's head. Remember,
Wonder does almost everything. If it can do it, it is done. And
that, above, it can do.
Remove that code and anything else you have added for Log4J. Edit
your Properties file and add this:
//log4j appender and formatting
log4j.rootLogger=INFO, A1
log4j.loggerFactory=er.extensions.ERXLogger$Factory
# A1 is a ConsoleAppender
log4j.appender.A1=org.apache.log4j.ConsoleAppender
log4j.appender.A1.layout=er.extensions.ERXPatternLayout
log4j.appender.A1.layout.ConversionPattern=[%d{yyyy-MM-dd
HH:mm:ss:SSS zzz}] <%t> %m%n
That will get you started, it sounds like you can take it from there.
And there is a properties file there. I get the output from main
that logging has been initialized. Then I get all the output about
registering entities, etc. I DO get a message form Eclipse that it
hasn't been initialized at the very beginning, but I thought that
only had to do with Eclipse messages - not Wonder messages - so I
didn't pay any attention to it.
log4j:WARN No appenders could be found for logger
(org.apache.log4j.Logger).
log4j:WARN Please initialize the log4j system properly.
DEBUG [main] - Log4j has been initialized
DEBUG [main] - ApplicationDidFinishLaunching: <class
com.webobjects.foundation.NSNotification
(name=ApplicationWillFinishLaunchingNotification, etc. . .
I am pretty sure that is log4J whining on Wonder's behalf about there
not being any Log4J config in Properties.
Then I tried to pay attention to it by putting the properties file
in a jar file and adding it as a classpath variable (LOG4J_PROPS)
in Eclipse, then the message went away, but I got an exception from
Wonder:
DEBUG [main] -
java.lang.RuntimeException
at er.extensions.ERXLogger.configureLogging(ERXLogger.java:190)
at er.extensions.ERXLogger.configureLoggingWithSystemProperties
(ERXLogger.java:149)
at er.extensions.ERXExtensions.<clinit>(ERXExtensions.java:147)
If I take out the code in main, then I get the same thing as
above. So it seems that when I add the classpath variable and
point it in the right direction that Eclipse is happy, but Wonder
isn't. if I leave the classpath variable out, then Wonder is
happy, but Eclipse. In either case I am sad. :-(
LOL
Wonder can be a bit Kranky.
Chuck
On Aug 23, 2006, at 12:25 PM, Chuck Hill wrote:
On Aug 23, 2006, at 10:23 AM, John Larson wrote:
I changed an application to use WONDER in Eclipse and now the
application doesn't launch. The last entry in the console is
"WARN NSLog -" and that is it.
Did you configure log4j logging? Wonder patches NSLog into log4j
so if that is not configured, you get nothing.
Chuck
I added ERJars, and the app launched ok. Then when I add
ERExtensions this happens. From the debug pane I got the port
number and tried to get to it manually with Safari, but still
nothing. The debug pane shows everything running, so I assume
that it is running? I've done this in XCode before and never had
a problem, but this is the first time I've done it in Eclipse. I
followed the instructions in the Quick start guide, but is there
something else I need to do for Eclipse?
Thank you,
John
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40global-village.net
This email sent to email@hidden
--
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve
specific problems. http://www.global-village.net/products/
practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40mac.com
This email sent to email@hidden
--
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems. http://www.global-village.net/products/practical_webobjects
_______________________________________________
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