|Re: How to debug Web app with Tomcat & Eclipse [message #1007413 is a reply to message #1007205]
||Tue, 05 February 2013 18:47
| Larry Isaacs
Registered: July 2009
On 2/5/2013 9:04 AM, siegfried@xxxxxxxx Mising name wrote:|
> I have a web app that runs find with mvn jetty:run and I would like to
> run it with tomcat.
> My value for CATALINA_HOME is
> My value for JAVA_HOME is "c:\Program Files\Java\jdk1.7.0_11". My value
> for ECLIPSE_HOME is
> Have my project set to us Java 1.7.
> To accommodate maven I have inserted these two lines in the top of my
> -vm c:\Program Files\Java\jdk1.7.0_11\bin\javaw.exe
> I see my Tomcat v7.0 Server at localhost-config. When I run my app I get
> a dialog box
> "Launching Tomcat v7.0 Servr at Localhost' has encountered a problem.
> The specified JR installation does not exist'.
> What the heck am I doing wrong?
> Tomcat runs find if I start it directly. I want to start it from
> eclipse, however, so I can single step thru my java source code.
Double-click the "Tomcat v7.0 Server at local" in the Servers view. In
the server editor page that opens, click the link for "Runtime
Environment" in the "General Information" section. In the "Edit Server
Runtime Environment" dialog that pops up, the JRE selection is what the
Tomcat will try to run on. You can click on the "Installed JREs" button
to see where that JRE is installed, if it still is. Otherwise pick a
different JRE in the "Edit Server Runtime Environment" dialog.
When you change a server runtime like this, projects which use this
server runtime may not see your update and still reference the old JRE
in the Java Build Path. If this is the case, open the project's
Properties dialog and go to the "Project Facets" page. Select the
"Runtimes" tab on the right. Uncheck the selected runtime and click
Apply, then re-check the runtime and click OK. This will force the
project to update the JRE that the project's Java Build Path is referencing.
|Re: How to debug Web app with Tomcat &amp; Eclipse [message #1007658 is a reply to message #1007600]
||Wed, 06 February 2013 22:24
| Larry Isaacs
Registered: July 2009
On 2/6/2013 12:05 PM, siegfried@xxxxxxxx Mising name wrote:|
> I inserted these two lines in the top of my eclipse.ini file to
> accommodate some error messages I used to get from maven. Could these be
> causing the problem? Are these lines still necessary to accommodate maven?
> I also defined some environment variables like ECLIPSE_HOME and
> TOMCAT_HOME and CATALINA_HOME. I know the latter needs to be defined.
> I've defined ECLIPSE_HOME to point to the directory that contains my
> current eclipse instance. I don't understand the variables I see when
> mucking around with the java build path -- are these environment
> variables? I created TOMCAT_HOME because a tutorial on Java/Spring MVC
> said to. Are these causing problems?
The thing to be aware of is that each time you launch the Tomcat server
in Eclipse, an associated Eclipse launch configuration (i.e. what you
see under "Apache Tomcat" when you click "Run -> Run Configurations...")
gets generated/updated. This launch configuration defines what will be
used to run Tomcat. It is unaffected by settings you add to
If you double-click the server in the Servers view, you will see the
server editor for this server. For Tomcat, the Server Locations section
establishes where "catalina.base" will point. In the General
Information section, the selected Runtime Enviroment establishes where
catalina.home will point (i.e. it will point to the Tomcat directory you
selected when the runtime was created). The JRE associated with the
selected Runtime Environment will define where the Java that runs Tomcat
will come from. These are all set automatically in the launch
configuration when you start the server.
One thing you can do is to try starting the Tomcat. After it fails,
switch to the Debug perspective. In the Debug view, you should see a
terminated launch for Tomcat. Right click on the first child of the
terminated launch and select "Properties". In the dialog the appears,
the complete command line that Eclipse attempted to execute is
displayed. You can open a DOS window and try to execute this command.
This might make it easier to see what it is about the command line that
is causing a problem. Once you have determined what's wrong, we can try
to see is wrong in your Eclipse workspace that causing that problem in
P.S. For some general info about the WTP Tomcat support see:
Powered by FUDForum
. Page generated in 0.07624 seconds