Error running Tomcat Server. Exception occured: java.lang.NullPointerException


I searched the forum but could not find anything related. I did find out what was wrong so I thought I'd post here and see if this is a bug or maybe I'm just stupid.

I have project with a web module which is set to deploy using tomcat. In the project I have a tomcat-conf/ directory which contains a conf/ directory for tomcat 5.0.18.

I've configured the Tomcat application server to have a home of /usr/local/apache/tomcat and a base of $myproject$/tomcat-conf/

In this tomcat-conf directory is a server.xml (and catalina.properties, .policy and web.xml) that contains some 'personal' settings.

When I try to run this web module, I get a dialog box:

-- Run Error --
Error running $myproject$: Error running Tomcat Server
Exception occured: java.lang.NullPointerException
Exception message: null

That's all, no log, no Run panel with output, just the dialog.

If I create the "Catalina/localhost/" sub-directory under tomcat-conf/conf/ and put a ROOT.xml context file inthere everything works fine.

In other words I've solved the problem but it would be nice if IntelliJ gave a slightly more intelligable error some time in the future for when I forget to do this.

Cheers,

-J

4 comments

Oh yeah, I'm running IntelliJ IDEA 4.5.1 build #2239 on Fedora Core 2, (2.6.8 kernel), J2SDK 1.4.2_03, tomcat 5.0.18.

0


It seems it also needs the 'webapps' directory under the catalina base set in the Application Server configuration. If this directory is not there nothing gets deployed (even though IntelliJ does write a proper context file in $base$/Catalina/localhost).

These issues are probably more related to tomcat 5.0.18 then to IntelliJ itself, maybe IntelliJ should ensure the directories required for tomcat to run exist under the configured catalina base before proceeding.

0


It seems it also needs the 'webapps' directory under
the catalina base set in the Application Server
configuration. If this directory is not there nothing
gets deployed (even though IntelliJ does write a
proper context file in $base$/Catalina/localhost).


I tried this, but don't know what you mean by the catalina base set. Where do I need to put the 'webapps' directory?

Thanks.

0

I tried this, but don't know what you mean by the
catalina base set. Where do I need to put the
'webapps' directory?

Thanks.


Actually, it turns out that my problem was that I didn't have the right permissions. I had to give my user rights to the $tomcatHome$/conf directory and then a bunch of files inside of conf, and then everything was happy. :) But, your posts actually helped me to get me pointed in the right direction of where to look. Thanks.

0

Please sign in to leave a comment.