- This topic has 5 replies, 3 voices, and was last updated 20 years, 1 month ago by Riyad Kalla.
-
AuthorPosts
-
wseubertMemberI have been using MyEclipse successfully to learn enough about J2EE stuff to feel comfortable starting my project. I have always launched Tomcat via MyEclipse so I decided to actually try starting the service and testing my web app that way.
My test app does a little of a lot of different stuff. One of the things it does is utilize the realms which are setup in an Access dBase. When I try to run my web app by starting the Tomcat service directly and logging into a protected area I get:
(localhost_log.2004-11-03.txt)
ApplicationDispatcher[/HelloWorldJSP] Servlet.service() for servlet jsp threw exception
Unable to find a javac compiler;
com.sun.tools.javac.Main is not on the classpath.
Perhaps JAVA_HOME does not point to the JDK-and-
(Stdout.log)
Nov 3, 2004 3:37:05 PM org.apache.catalina.authenticator.FormAuthenticator authenticate
WARNING: Unexpected error forwarding to error page
org.apache.jasper.JasperException: Unable to compile class for JSPI have JAVA_HOME pointing to my C:\j2sdk1.4.2_05 which is the default location.
Does anyone have a clue what I might me doing wrong?
Why is it different when I start Tomcat via MyEclipse?Thanks in advance…
Scott AndersonParticipantThe problem is that the version of Java being found in the Tomcat script is not the version that JAVA_HOME points to. Basically, a different JRE (not a JDK) is being found on your path when the service tries to run Java.
wseubertMemberOK, two things…
1. You are right, there is more than one version of Java in my path. I can’t change that because one of my apps (PVCS) needs it that way so I’m going to look for a way to tell Tomcat which version to use. If you can push me in the right direction that would be helpful.
2. Is this the type of thing you pick up through experience or was there a hint in the error logs?
Thanks again…
Riyad KallaMember1. Off the top of my head I can’t think of one since you are using the service and not the bat file, otherwise I’d say just hard code it.
2. You see it enough times to recognize that when Tomcat complains about the javac problem, a JRE is likely being used to run Tomcat and not a JDK, that means tools.jar and javac will not be accessible to Tomcat, which means it can’t compile its JSP pages. Tomcat 5.5 works around this by integrating the Eclipse JDT compiler, so it has its own compiler now.
wseubertMemberThanks for the tip on using the startup.bat file. For some reason using the bat file works but starting the service doesn’t. Oh well, I’ve got it working so I’ll just forget about the service…
Thanks again for helping me with something that’s outside the scope of your product.
Wally
Riyad KallaMemberNo problem Wally, we do what we can.
-
AuthorPosts