| Author |
Another Win98 Tomcat install problem
|
Lucy Smaile
Ranch Hand
Joined: Apr 17, 2002
Posts: 45
|
|
I've been trying to install Tomcat, and first I had this error: Using CATALINA_BASE: C:\Tomcat4.0 Using CATALINA_HOME: C:\Tomcat4.0 Using CATALINA_TMPDIR: C:\Tomcat4.0\temp Using JAVA_HOME: C:\J2SDK1.4.0 Bad command or file name Following the instructions in this thread: http://www.coderanch.com/t/81609/Tomcat/Tomcat-startup-Windows-ME I commented out the start commands from the catalina.bat file. Now Tomcat seems to start - I get: C:\jakarta-tomcat-4.0.4\bin>startup.bat Using CATALINA_BASE: C:\jakarta-tomcat-4.0.4 Using CATALINA_HOME: C:\jakarta-tomcat-4.0.4 Using CATALINA_TMPDIR: C:\jakarta-tomcat-4.0.4\temp Using JAVA_HOME: C:\jdk1.3 Starting service Tomcat-Standalone Apache Tomcat/4.0.4 Starting service Tomcat-Apache Apache Tomcat/4.0.4 The problem is, nothing happens when I try to get http://localhost:8080/ I used to have JSDK on 8080, which I changed to 8081, but it still shows a cached JSDK page. I tried to change the Tomcat port to 8088, in $CATALINA_HOME/conf/server.xml (just changed the only instance of 8080 to 8088), but http://localhost:8088/ just gives HTTP 500 error. Could anyone suggest what I should try next, please? [ June 24, 2002: Message edited by: Lucy Smaile ]
|
 |
gautham kasinath
Ranch Hand
Joined: Dec 01, 2000
Posts: 583
|
|
Hi! Your getting cached pages although you switched servers is coz 1) You probably have yer JSDK still running and Tomcat exiting coz the port is already bound.. 2) or your browser caching up a lotta stuff. Check both and if problem persists.. buzz again/ Regds Lupo
|
"In the country of the blind, the one eyed man is the King"
Gautham Kasinath CV at : http://www.geocities.com/gkasinath
|
 |
Lucy Smaile
Ranch Hand
Joined: Apr 17, 2002
Posts: 45
|
|
I've changed the port to 8088, which I presume has never been used for anything, and I just get an HTTP 500 error. Searching other posts, someone seems to have solved this problem in Win 2000 by installing a loopback adapter. (See this post - although he didn't say if he was getting a 500 error or a different one.) But I didn't find a loopback adapter for Win98 - and other than under 'Add New Hardware', I wouldn't know where to look... Any more ideas, please? [ June 24, 2002: Message edited by: Lucy Smaile ]
|
 |
Mike Curwen
Ranch Hand
Joined: Feb 20, 2001
Posts: 3695
|
|
Hi Lucy, From that other thread: But before all that Windows 2000 pops up a dialog box that says this page cannot be accessed offline, then it gives me the choice to connect or stay offline. When I choose stay offline (because there's no connection) then it gives me your standard page cannot be displayed error. If this is what is happening, then yes, you need to install a loopback adapter. But... on Win9x, there isn't one. Do you have the MS Client for Networks installed? in: Control Panel | Network do you see this listed? If not, add it from the Client list (it's listed under Microsoft) If that doesn't work, install a dial-up adapter (Control Panel | Network | Add | Adpater - Microsoft - Dialup adapter As for your gautham's ideas: 1) jsdk... there is no port conflict with 8080, since it would error out long before you got the message: Starting service Tomcat-Standalone Apache Tomcat/4.0.4 Starting service Tomcat-Apache Apache Tomcat/4.0.4 Go ahead and set it back to port 8080 if you want. 2) This is always a good idea to check. The browser can't tell that http://localhost:8008/foo is now referring to a page served by Tomcat, as opposed to one served by the jsdk. IE has a setting that will allow the browser to *never* check the page again. In IE 5.5 go to: Tools | Internet Options | General Tab | Temporary Internet Files area | Settings button Make sure it says "Every visit to the page"
|
 |
Lucy Smaile
Ranch Hand
Joined: Apr 17, 2002
Posts: 45
|
|
Mike, Thanks very much for your suggestions. I do get the 'connect or stay offline' dialog, like the other guy. (With JSDK, I just clicked 'connect' and it served the pages no problem - without connecting.) I tried installing both MS Client for Networks and a dial-up adapter from the Win98 CD, but neither made any difference. I think there must be something going on, as it's an 'internal server error', not just a normal 'Page not found' sort of error... I wonder what the problem could be? I've seen that other people have got Tomcat to work with Win98, and I don't exactly feel like changing my OS right now... Can you think of anything else? Lucy [ June 25, 2002: Message edited by: Lucy Smaile ]
|
 |
Lucy Smaile
Ranch Hand
Joined: Apr 17, 2002
Posts: 45
|
|
I found this page about istalling Tomcat, and discovered that my JDK may not be installed quite right. Could that make a difference? Once you've installed Java, confirm that everything including your PATH is configured properly by opening a DOS window and typing "java -version" and "javac -help". You should see a real result both times, not an error message about an unknown command. When I type "java -version" it's OK, but "javac -help" doesn't seem so healthy: javac: invalid flag: -help Usage: javac <options> <source files> where possible options include: -g Generate all debugging info -g:none Generate no debugging info -g:{lines,vars,source} Generate only some debugging info -O Optimize; may hinder debugging or enlarge class file -nowarn Generate no warnings -verbose Output messages about what the compiler is doing -deprecation Output source locations where deprecated APIs are us ed -classpath <path> Specify where to find user class files -sourcepath <path> Specify where to find input source files -bootclasspath <path> Override location of bootstrap class files -extdirs <dirs> Override location of installed extensions -d <directory> Specify where to place generated class files -encoding <encoding> Specify character encoding used by source files -target <release> Generate class files for specific VM version Is there any chance that this could make a difference? (Scraping the barrel ) [ June 25, 2002: Message edited by: Lucy Smaile ]
|
 |
Mike Curwen
Ranch Hand
Joined: Feb 20, 2001
Posts: 3695
|
|
I don't have jdk1.1.8 installed on my system, but 1.2.2, 1.3.1 and 1.4.0 all have no problem with -help What does -version give you? One more thing you can set in IE: Tools | Internet Options | Advanced tab Make sure you *deselect* 'Show friendly HTTP error messages' and 'Show friendly URLs' That way you get the 'actual' HTTP error message as returned by the server. What is the exact URL you are trying to access? Is it http://localhost:8080 ?
|
 |
Lucy Smaile
Ranch Hand
Joined: Apr 17, 2002
Posts: 45
|
|
I've taken a drastic option today and tried installing a different jdk (1.3.1) and a different version of Tomcat (3.2.3). This time, startup gives a different error! Unable to set CLASSPATH dynamically. Note: To set the CLASSPATH dynamically on Win9x systems only DOS 8.3 names may be used in TOMCAT_HOME! Setting your CLASSPATH statically. Using CLASSPATH: C:\jakarta-tomcat-3.2.3\classes;C:\jakarta-tomcat-3.2.3\lib\ant .jar;C:\jakarta-tomcat-3.2.3\lib\jasper.jar;C:\jakarta-tomcat-3.2.3\lib\jaxp.jar ;C:\jakarta-tomcat-3.2.3\lib\parser.jar;C:\jakarta-tomcat-3.2.3\lib\servlet.jar; C:\jakarta-tomcat-3.2.3\lib\webserver.jar;C:\jakarta-tomcat-3.2.3\lib\servlet.ja r;.;C:\jdk1.3.1\lib\tools.jar Starting Tomcat in new window Bad command or file name As it's ending with 'Bad command or file name', I should think it would have the same problem with the 'start' commands in the catalina.bat as the first one I tried. I might go back to the first version, which seemed a bit closer... As for the -version and -help messages. Right now, java -version gives me: java version "1.3.1" Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-b24) Java HotSpot(TM) Client VM (build 1.3.1-b24, mixed mode) 'javac -help' gives the same message as before. On the other hand 'java -help' (not javac) is fine. The page definitely says 'javac', but could it have been a typo?? One reason I wanted Tomcat was because I need to use JDBC with MySQL and thought that it's easy to install am mmmsql driver in a tomcat directory. Do you think it would be simpler to try and install a driver to work with JSDK? (which has the infinite advantage of actually working!!) Are there any other development servers that would be any easier to set up? Thanks for your help, anyway!
|
 |
Mike Curwen
Ranch Hand
Joined: Feb 20, 2001
Posts: 3695
|
|
Well, I don't think you should ever use the JSDK. If I have my acronymns correct, Sun referred to their 2.1 implementation as JSDK and their 2.0 implementation as JSWDK. Neither of these is current, and shouldn't be used. The MySQL driver is indeed easy to use with Tomcat, just put it in the lib directory of Tomcat3.x and in the common/lib directory for Tomcat4.x As for something besides Tomcat, people seem to like Resin http://www.theserverside.com/home/thread.jsp?thread_id=13749
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14475
|
|
I don't think that recent Tomcat releases work with JDK 1.1.8, so you fixed that problem properly. The "invalid command" thing sounds like maybe the "java" command isn't in your PATH. You should check the BAT file and either put the explicit path in - like: "C:\JDK1.3\bin\java ...." or correct the path if it's wrong. Or shorten if (if needed) to "java ..." and add the JDK\bin directory to the PATH setup statement in AUTOEXEC.BAT.
|
Customer surveys are for companies who didn't pay proper attention to begin with.
|
 |
Lucy Smaile
Ranch Hand
Joined: Apr 17, 2002
Posts: 45
|
|
IT WORKS!!! Well, sort of. I tried the final combination of Tomcat 3.2.3 and my original JDK1.3. Before, I had been trying to set environment variables in sysedit, but when I just put JAVA_HOME and TOMCAT_HOME at the beginning of Tomcat.bat it did the trick. Sweet Tomcat index page! But then only about half of the jsp and servlet examples work properly - some only give http 500 error and some of them kind of half work. This is the kind of thing that happens (running 'Date') Day of month: is 27 Year: is 2002 Month: is June Time: is 11:11:14 Date: is 6/27/2002 Day: is Thursday Day Of Year: is 178 Week Of Year: is 26 era: is 1 DST Offset: is 1 Zone Offset: is 1 Error: 500 Location: /examples/jsp/dates/date.jsp Internal Servlet Error: javax.servlet.ServletException at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:508) at javax.servlet.http.HttpServlet.service(HttpServlet.java:840) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405) at org.apache.tomcat.core.Handler.service(Handler.java:287) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:812) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501) at java.lang.Thread.run(Thread.java:484) Root cause: java.lang.NoSuchMethodError at org.apache.jasper.runtime.JspWriterImpl.flush(JspWriterImpl.java:209) at jsp.dates._0002fjsp_0002fdates_0002fdate_0002ejspdate_jsp_0._jspService(_0002fjsp_0002fdates_0002fdate_0002ejspdate_jsp_0.java:159) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java:840) at org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.java:130) at javax.servlet.http.HttpServlet.service(HttpServlet.java:840) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:282) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500) at javax.servlet.http.HttpServlet.service(HttpServlet.java:840) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405) at org.apache.tomcat.core.Handler.service(Handler.java:287) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:812) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501) at java.lang.Thread.run(Thread.java:484) I don't think it likes my classpath very much. (I didn't alter it at all this time.) This is what I get when I start Tomcat: C:\jakarta-tomcat-3.2.3\bin>startup Unable to set CLASSPATH dynamically. Note: To set the CLASSPATH dynamically on Win9x systems only DOS 8.3 names may be used in TOMCAT_HOME! Setting your CLASSPATH statically. Using CLASSPATH: C:\jakarta-tomcat-3.2.3\classes;C:\jakarta-tomcat-3.2.3\lib\ant .jar;C:\jakarta-tomcat-3.2.3\lib\jasper.jar;C:\jakarta-tomcat-3.2.3\lib\jaxp.jar ;C:\jakarta-tomcat-3.2.3\lib\parser.jar;C:\jakarta-tomcat-3.2.3\lib\servlet.jar; C:\jakarta-tomcat-3.2.3\lib\webserver.jar;C:\JAVAc:\jdk1.3\lib;c:.;C:\jdk1.3\lib \tools.jar Starting Tomcat in new window C:\jakarta-tomcat-3.2.3\bin> And in the new window: 2002-06-27 11:16:49 - ContextManager: Adding context Ctx( /examples ) Starting tomcat. Check logs/tomcat.log for error messages 2002-06-27 11:16:49 - ContextManager: Adding context Ctx( /admin ) 2002-06-27 11:16:49 - ContextManager: Adding context Ctx( ) 2002-06-27 11:16:49 - ContextManager: Adding context Ctx( /test ) 2002-06-27 11:16:50 - PoolTcpConnector: Starting HttpConnectionHandler on 8080 2002-06-27 11:16:50 - PoolTcpConnector: Starting Ajp12ConnectionHandler on 8007 Anyway, it's a definite step in the right direction!
|
 |
Lucy Smaile
Ranch Hand
Joined: Apr 17, 2002
Posts: 45
|
|
Yes!!! Now it really does work! I solved the http500 error problem as in this thread: http://forum.java.sun.com/thread.jsp?forum=45&thread=76702 Apparently what was confusion the thing was that there were different versions of the servlet.jar file knocking around. When I replaced theservlet.jar in jdk1.3/jre/lib/ext with the one from tomcat-3.2.3 it suddenly stopped complaining. A million thanks for all your help!!! I was starting to think it just wasn't to be...
|
 |
 |
|
|
subject: Another Win98 Tomcat install problem
|
|
|