This week's book giveaway is in the Java in General forum.
We're giving away four copies of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 and have ishori Sharan & Adam L Davis on-line!
See this thread for details.
Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!

Aldor Bregosson

+ Follow
since Jan 04, 2008
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Aldor Bregosson

Thanks Lasanka, that was a great little hint.

I had continued to use the Sysdeo plugin, but today I tried your solution, and it works fine.

Thanks again,

I don't know if I should post this in a Tomcat forum, or in an Eclipse forum, so I'll try it here:

I'm using Eclipse 3.4 and Tomcat 6.0.18 for web app development and local tests. In the olden days, I always used the Sysdeo Tomcat plugin to start, stop and restart Tomcat from inside Eclipse, that was very convenient and worked fine.

Now I've been told that I won't need the Sysdeo plugin any more, Tomcat can be added as a server in Eclipse and started from there - just as BEA WebLogic or Glassfish can be started by adding them as a "target server".

But, trying this, I failed: Eclipse's console says that everything has started all right and the server is started, but the server can't be reached over

nor any other port that may be mentioned.

So I reverted to using the Sysdeo Tomcat plugin and I could start Tomcat from there, and showed me the well known Tomcat entry page.

So what did I miss out on adding Tomcat as a "Target server" to Eclipse ? Comparing the console output of the two variants showed, that the "Eclipse only" variant failed to start the ContextListener as well as the SessionListener:

This was the version that worked (using the Sysdeo plugin):

And that's the version that did not work (starting the server instance from Eclipse itself):

The two bold lines are the ones where the two variants differ. So, what am I missing in the "Eclipse-only" solution ?

A helpful hint is highly appreciated
As far as I can see, the application you deployed tries to log something through Log4J. Tomcat tries to register a Logger and an "Appender" but can't find one. Hence the NullPointerException.

To have Tomcat use Log4J universally, place both libraries log4j.jar and the Jakarta commons-logging.jar into the $TOMCAT_HOME/common/lib directory. Create your log4j properties file as $TOMCAT_HOME/common/classes/ and configure the root logger. Here is the basic I used for this myself:

log4j.rootLogger=info, R
log4j.appender.R.layout.ConversionPattern=%-5p %-30.30c{1} %x - %m%n

Instead of "info" you can rise the "granularity" of the output by mentioning "warn" or even "debug" in the first line. But be warned: the latter will often produce HUGE amounts of logging output. All "Console" output (also the System.out.println you may have in your application) goes to $TOMCAT_HOME/logs/catalina.out.

Don't forget to restart Tomcat after making these changes.

Let me know if that helps
13 years ago