Debugging a tomcat project in Eclipse 3.4.2

I downloaded eclipse 3.4.2 and tried to install the tomcat plugin (version 3.2.1) for eclipse from sysdeo ( http://www.eclipsetotale.com/tomcatPlugin.html )

I followed the installation instructions, but when tomcat was launched from the eclipse toolbar, I got the following error:

java.lang.NoClassDefFoundError: org / apache / tomcat / util / log / SystemLogHandler in java.lang.Class.getDeclaredConstructors0 (native method) in java.lang.Class.privateGetDeclaredConstructors (Class.java:2357) in java.langClass .getConstructor0 (Class.java:2671) in java.lang.Class.newInstance0 (Class.java:321) in java.lang.Class.newInstance (Class.java:303) at org.apache.catalina.startup.Bootstrap. init (Bootstrap.java:205) at org.apache.catalina.startup.Bootstrap.main (Bootstrap.javahaps90)

I followed the troubleshooting instructions but did not succeed.

I tried to place the plugin in the dropin directory, but still got the same error.

This worked fine in eclipse 3.2 and 3.3

Then I tried using the standard built-in WTP to configure my tomcat server. I'm not sure how he will select my server.xml in the tomcat conf directory, it seems he is not collecting now. How to link an eclipse project with this setting. I can start the server, but when I look at the tomcat start page, it shows nothing.

I would appreciate if someone could provide some ways to fix this.

Thanks in advance.

-Dipesh

+6
debugging eclipse plugins tomcat eclipse-wtp
source share
4 answers

After testing a few things, I managed to debug the tomcat project in eclipse 3.4.2. To debug the tomcat application / project using eclipse 3.4.2, use the WTP plugins that are installed with it.

Go to window → Show view → Others → Server

In this view, create a new server, select the tomcat installation directory and version information.

Then double-click on the Tomcat VX.X server on the local host, the configuration settings page opens

In the "Server location" section, select "Use Tomcat Installation (takes control of Tomcat installation) and enter the deployment path.

In the publication section, select "Do not publish" and uncheck "Update context path."

Voila !! Everything is configured to debug a tomcat project in eclipse 3.4.2

No need to download and copy any additional plugin.

Thanks Yuri. Hope this helps.

+14
source share

I am using Tomcat with the Eclipse Java EE version with WTP and it works great. I have Ant scripts that deploy my web application in the tomcat webapp folder. To debug, you need to open the Server view in Eclipse, add a new server and select the correct version of Tomcat. After that, open the Tomcat configuration inside eclipse by double-clicking on the server entries in the newly created Eclipse server view. On the left side of the merge page, you will see something like “let Eclipse control Tomcat’s own installation”, I don’t remember the exact text now. You must choose this. You can then set a breakpoint in the source code, and then run Tomcat in debug mode from the point of view of the Eclipse server. Hope this helped.

+4
source share

If you use the Sysdeo plugin, you also do not want to use standard Eclipse WTP servers. To use the Sysdeo plugin, you already need to download and extract the standard folder from zipped tomcat. Be sure to define CATALINA_HOME in your path. Then, assuming you installed the sysdeo plugin correctly, go to Eclipse-> Windows-> Prefs-> Tomcat (these are the Sysdeo Tomcat settings, not the WTP settings). You need to tell the plugin where you extracted your Tomcat directory and configure it to use context files.

Now create a new dynamic web project. Right-click and go to its properties -> Tomcat. Check it out as the “Tomcat Project”. Give it the name of the context, and also tell it the directory that will become the basis of your war (by default, Eclipse called this WebContent, I think). Apply it and close the window. Right-click your project and go to the Tomcat section. Add "Tomcat Libraries to Build Path" so you can use the Servlet / JSP classes. Finally, click Refresh Context. If you enter your Tomcat directory in the Conf section, you will see that the plugin has created a context for you that points to the Eclipse workspace. No need to deploy the application in the Tomcat directory. Now you can click the "Start" button of Sysdeo Tomcat, and your application should be able to connect to your application on localhost: 8080 / context_name.

NTN, Bill

+2
source share

Using the excellent Findjar webpage for:

org / Apache / Tomcat / Util / Log / SystemLogHandler

gives the following:

Information about the org.apache.tomcat.util.log.SystemLogHandler class:

Containing JAR files:
jbossweb.jar
Gwt-dev-windows.jar
Cat-Util-3.3.2.jar
Cat-Util-4.0.6.jar
Cat-Util-4.1.31.jar
Cat-Util-4.1.34.jar
Cat-Util-4.1.36.jar
Cat-Util-5.0.16.jar
Cat-Util-5.0.18.jar
Cat-Util-5.0.28.jar
Cat-Util-5.5.12.jar
Cat-Util-5.5.15.jar
Cat-Util-5.5.23.jar
Cat-Util-5.5.4.jar
Cat-Util-5.5.7.jar
Cat-Util-5.5.9.jar
Cat-Util-5.5.7-alpha.jar
Cat-Util-5.5.8-alpha.jar
tomcat-util-5.5.9-alpha.jar

Make sure the corresponding jar file is in your CLASSPATH.

+1
source share

All Articles