Tomcat 5 with DBCP does not work on IntelliJ 4

I'm developing Jsp/Servlet applications using DBCP. I have successfully integrated Tomcat 4.xx up to 4.1.27 with DBCP on IntelliJ 3.
Now I'm using new IDEA 4 and new Tomcat 5 and DBCP does not works. Datasources created within the context are not visible by Tomcat when I run Tomcat inside IDEA. The point is that if I run Tomcat standalone, all DBCP mechanism works successfully.
I don't know if I'm missing something , but it seems like context parameters are not loaded within the Tomcat when it is inside IDEA 4

4 comments

Hi Taner, I was about to post this when I saw your message. Are you able to get any tomcat debugging working in 4.0.x?

===>

Is anyone else having an issue debugging a web application using Idea 4.0.x? In 3.0.5 I was able to run a web application, defining a specific location for my server.xml, as well as my project root directory. If I use those same settings in 4.0.x, I cannot get tomcat to start up. Here is what I get:

======================
ERROR reading /usr/local/jakarta-tomcat-4.0.6/conf/server.xml
At Line 84 /Server/Service/Connector/ className=org.apache.ajp.tomcat4.Ajp13Connector port=8009 minProcessors=5 maxProcessors=75 acceptCount=10 debug=0

Catalina.start: java.lang.ClassNotFoundException: org.apache.ajp.tomcat4.Ajp13Connector
java.lang.ClassNotFoundException: org.apache.ajp.tomcat4.Ajp13Connector
at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClas...

......

This strikes me as odd for a few reasons. The port 8009 is not the one I specified on the debug settings. Also, I specified a different location for the configuration file, but it appears to use the default server.xml file anyway. Finally I don't see why it wouldn't be able to find the AJP13Connector if I have correctly defined the Tomcat directory.

I have two other co-workers in my office who are experiencing the same thing. Is anyone successfully debugging applications which do not reside in the default tomcat directories? And if so, can you post a "How-To"?

0

Actually yes, I debugged many web applications using debugging features of IDEA. And I have friends that are able to debug it. But as you asked for webapps which do not reside in default Tomcat directory, I didn't debug such a try. Well, actually don't think that it'd cause your problem, but will try to make such an external configuration.
I'd also ask you whether your Tomcat starts up without errors outside IDEA or not. Also which Tomcat do you use 4.xx, or 5.xx?

0

It seems like you are not able to start Coyote/JK2 AJP 1.3 Connector
correctly, due to your configuration. AJP 1.3 Connector uses default
port 8009 in server.xml and as I remember old IDEA 3.0.x debuggee also
uses 8009 as default port. Probably you have a confliction with ports.
As you stated you changed these ports, your web configuration may not be
seen by IDEA, like my DBCP parameters. It also targets us to a bug/hard
configuration about web contexes.
I'd also recommend you to upgrade your Tomcat to 4.1.30 or 5.0.19 if you
are able to do. I see you are using 4.0.6.

Paolo Resmini wrote:

Hi Taner, I was about to post this when I saw your message. Are you able to get any tomcat debugging working in 4.0.x?

===>

Is anyone else having an issue debugging a web application using Idea 4.0.x? In 3.0.5 I was able to run a web application, defining a specific location for my server.xml, as well as my project root directory. If I use those same settings in 4.0.x, I cannot get tomcat to start up. Here is what I get:

======================
ERROR reading /usr/local/jakarta-tomcat-4.0.6/conf/server.xml
At Line 84 /Server/Service/Connector/ className=org.apache.ajp.tomcat4.Ajp13Connector port=8009 minProcessors=5 maxProcessors=75 acceptCount=10 debug=0

Catalina.start: java.lang.ClassNotFoundException: org.apache.ajp.tomcat4.Ajp13Connector
java.lang.ClassNotFoundException: org.apache.ajp.tomcat4.Ajp13Connector
at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at sun.misc.Launcher$AppClas...

.....

This strikes me as odd for a few reasons. The port 8009 is not the one I specified on the debug settings. Also, I specified a different location for the configuration file, but it appears to use the default server.xml file anyway. Finally I don't see why it wouldn't be able to find the AJP13Connector if I have correctly defined the Tomcat directory.

I have two other co-workers in my office who are experiencing the same thing. Is anyone successfully debugging applications which do not reside in the default tomcat directories? And if so, can you post a "How-To"?

0

Hi Taner,
Thanks for the replies. Yeah....it's odd that it doesn't seem to pick up the configuration file that I specifiy. It worked great in 3.0. I'll try switching to 4.1.30. That what I actually use in production, but in Idea 3.0, 4.1.xx was a pain to get working. I guess worst comes to worst, I could always build a war, and run the application from the default directory. The only problem is I usually have 4 or 5 different applications I'm working on at a time, so it's would be a pain to always have to move apps over to the correct directory.

Anyway, I'll let you know how the 4.1.29 works out.

0

Please sign in to leave a comment.