facebook

Error starting Tomcat 5 w/ JDK 1.4.2_08

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse Archived
  2.  > 
  3. Application Servers and Deployment
Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #229159 Reply

    Clarke
    Member

    I have Tomcat 5.0.30 configured and it works fine from the services menu in windows. It is configured to use the FULL SDK, not just the JRE of Java 1.4.2_08

    But when I try and use it inside MyEclipseIDE (after setting up my project to deploy).. I get the following errors.

    First small window popups up saying.
    “Could not find main class, program will exit”.

    After a couple of second another error pops up saying.
    “A configuration error occured during startup. Please verify the preference field with the prompt: java.lang.NoSuchClassDefFoundError: ?

    Exception in thread main

    I”ve tried re-installing Tomcat fresh to no avail. This was deploying apps fine before I’m not sure what has changed on my system.

    This happens in all of my applications.

    Thanks.

    Some Info:
    MyEclipseIDE Ver: 3.8.3.
    Eclipse Version: 3.0.1
    Eclipse Build id: 200409161125
    OS: Windows XP pro
    Java: 1.4.2_08

    #229166

    Riyad Kalla
    Member

    The problem is that Tomcat is installs to a directory with a space in the path name, you need to reinstall Tomcat to a path like C:\Java\Tomcat5, and it will work.

    While this clearly seems like a bug in our connector it is infact an elusive Java issue that we have been unable to track down. On some Windows machines it works without problems, on others it breaks right away. We have been unable to track down exactly what the problem is. We thought it was related to locale, but that turned out to be a red herring. We will continue to investigate the issue, in the mean time the workaround is to install Tomcat to a shorter path that has no spaces in it.

    #229179

    Clarke
    Member

    Hi

    funny thing is I HAD a tomcat path with spaces and removed / reinstalled it to be in a directory with NO spaces.. and yet the problem persists.

    Tomcat Home: C:\Tomkat5.0.30\

    #229182

    Riyad Kalla
    Member

    Ok very strange, it sounds like you have all the settings correct. Please tell me ALL of the settings you have for the Tomcat 5 connector, and also copy-paste the entire startup log of Tomcat here for me to look at as well. Additionally any exceptions logged in <workspace dir>\.metadata\.log would be helpful.

    #229188

    Clarke
    Member

    Tomcat Server: Enabled

    Tomcat Home : C:\Tomcat5.0.30
    Tomcat Base : C:\Tomcat5.0.30
    Tomcat temp : C:\Tomcat5.0.30\temp

    Tomcat – Add JVM settings…
    JRE Type: Standard JVM
    JRE Name: Java2
    JRE Home: C:\j2sdk1.4.2_08 (This is a FULL Java SDK install NOT just the JRE)
    Javadoc URL : http://java.sun.com/j2se/1.4.2/docs/api

    Launch: Debug

    Paths: All are left blank.

    Default VM Arguments: none (left empty)

    I cleared the <workspace>/.metadata/.log file out and re-started eclipse and tried to start Tomcat (simply because my log file was HUGE). I’ve saved the original .log and can paste it here but it’s 250k.

    So here’s the ‘fresh’ one.

    !SESSION May 06, 2005 13:43:33.940 ———————————————
    eclipse.buildId=M200409161125
    java.version=1.4.2_08
    java.vendor=Sun Microsystems Inc.
    BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US

    !ENTRY com.genuitec.eclipse.easie.tomcat5 1 1 May 06, 2005 13:43:33.940
    !MESSAGE Error starting Tomcat: java.lang.NoClassDefFoundError: ?
    Exception in thread “main”

    Hope this helps.

    #229192

    Riyad Kalla
    Member

    Ok your setup looks perfect, what is the name of the Tomcat file you are using to install Tomcat, I’m going to try and reproduce this here.

    #229194

    Clarke
    Member

    jakarta-tomcat-5.0.30.exe

    As a reminder, I installed it into the DEFAULT directory that the installer provides FIRST and this happens to be in something like C:\Program Files\Apache Software Group\Tomcat 5.0.30

    I removed it completely, rebooted (to ensure it was completely gone) and reinstalled into the above mentioned path.

    Thanks.

    #229211

    Riyad Kalla
    Member

    Here’s what I did:
    1) Went to Jakarta’s site and downloaded jakarta-tomcat-5.0.30.exe (~10mb)
    2) Ran the installer and installed it to: C:\Tomcat5.0.30 using the “Normal” install.
    3) Used default port 8080 and admin/admin as login/pass
    4) Configured it to use my 1.4.2 JDK at: C:\Java\jdk1.4.2_07 and hit install
    5) Went into MyEclipse and changed my Tomcat home dir to: C:\Java\jdk1.4.2_07, selected my 1.4.2_07 JDK to run it and left everything else default.
    6) Clicked on the MyEclipse launch app server button went down to Tomcat and clicked start, and go this correct startup log:

    May 6, 2005 2:36:54 PM org.apache.coyote.http11.Http11Protocol init
    INFO: Initializing Coyote HTTP/1.1 on http-8080
    May 6, 2005 2:36:54 PM org.apache.catalina.startup.Catalina load
    INFO: Initialization processed in 1125 ms
    May 6, 2005 2:36:54 PM org.apache.catalina.core.StandardService start
    INFO: Starting service Catalina
    May 6, 2005 2:36:54 PM org.apache.catalina.core.StandardEngine start
    INFO: Starting Servlet Engine: Apache Tomcat/5.0.30
    May 6, 2005 2:36:54 PM org.apache.catalina.core.StandardHost start
    INFO: XML validation disabled
    May 6, 2005 2:36:54 PM org.apache.catalina.core.StandardHost getDeployer
    INFO: Create Host deployer for direct deployment ( non-jmx )
    May 6, 2005 2:36:54 PM org.apache.catalina.core.StandardHostDeployer install
    INFO: Processing Context configuration file URL file:C:\Tomcat5.0.30\conf\Catalina\localhost\admin.xml
    May 6, 2005 2:36:58 PM org.apache.catalina.core.StandardHostDeployer install
    INFO: Processing Context configuration file URL file:C:\Tomcat5.0.30\conf\Catalina\localhost\balancer.xml
    May 6, 2005 2:36:58 PM org.apache.catalina.core.StandardHostDeployer install
    INFO: Processing Context configuration file URL file:C:\Tomcat5.0.30\conf\Catalina\localhost\manager.xml
    May 6, 2005 2:36:58 PM org.apache.catalina.core.StandardHostDeployer install
    INFO: Installing web application at context path /jsp-examples from URL file:C:\Tomcat5.0.30\webapps\jsp-examples
    May 6, 2005 2:36:59 PM org.apache.catalina.core.StandardHostDeployer install
    INFO: Installing web application at context path from URL file:C:\Tomcat5.0.30\webapps\ROOT
    May 6, 2005 2:36:59 PM org.apache.catalina.core.StandardHostDeployer install
    INFO: Installing web application at context path /servlets-examples from URL file:C:\Tomcat5.0.30\webapps\servlets-examples
    May 6, 2005 2:36:59 PM org.apache.catalina.core.StandardHostDeployer install
    INFO: Installing web application at context path /tomcat-docs from URL file:C:\Tomcat5.0.30\webapps\tomcat-docs
    May 6, 2005 2:36:59 PM org.apache.catalina.core.StandardHostDeployer install
    INFO: Installing web application at context path /webdav from URL file:C:\Tomcat5.0.30\webapps\webdav
    May 6, 2005 2:36:59 PM org.apache.coyote.http11.Http11Protocol start
    INFO: Starting Coyote HTTP/1.1 on http-8080
    May 6, 2005 2:37:00 PM org.apache.jk.common.ChannelSocket init
    INFO: JK2: ajp13 listening on /0.0.0.0:8009
    May 6, 2005 2:37:00 PM org.apache.jk.server.JkMain start
    INFO: Jk running ID=0 time=0/47 config=C:\Tomcat5.0.30\conf\jk2.properties
    May 6, 2005 2:37:00 PM org.apache.catalina.startup.Catalina start
    INFO: Server startup in 5765 ms

    Do you see anything different from my actions than what you did? You don’t have the Sysdeo plugin installed as well and are accidentally using it instead of the MyEclipse toolbar button are you?

    #229250

    Clarke
    Member

    Nothing at all.

    These are the exact steps I take.

    However (sorry to beat the dead horse) I did ORIGINALLY install Tomcat into a directory with spaces. Maybe this state was being saved somewhere and ever though there was a problem BEFORE and I”ve fixed it, it still assumes that the application is in a bad state.

    No expert on the MyExclipse IDE but maybe some caching mechansim that isn’t recognising I’ve re-installed Tomcat.

    The only thing I haven’t re-installed is Eclipse itself and I am about to do that today.

    #229257

    Riyad Kalla
    Member

    The Tomcat install dir *shouldn’t* matter, but then again, you *shouldn’t* be having this problem, so maybe it does?

    Before you reinstall try this first: File > Switch Workspace > C:\tempworkspace, hit OK to restart. Now re-setup Tomcat to the C:\tomcat5.0.30 dir and try and start it, did it work?

    If so then try cleaning your existing workspace dir by using this tip: http://www.myeclipseide.com/FAQ+index-myfaq-yes-id_cat-30.html#343

    #229268

    Clarke
    Member

    Okay there is DEFINATELY something in the Worksppace that saves settings for the webserver installagion, even when it’s updated / changed.

    I reinstalled Eclipse AND MyEclipseIDE (MEI) and I forgot about the Eclipse settings being preserved in my workspace directory (c:/ecslipseWS) . Wjhen I tried to run my app, same problem occured.

    So I uninstalled, deleted the workspace and reinstalled.

    Works fine now.

    I’m going to grep through the files in the WS directory and see if I can locate the offending entry.

    #229272

    Clarke
    Member

    I think we submitted at the same time as I didn’t see your notice before I reinstalled.

    #229323

    Clarke
    Member

    New problem (Related to this though)

    Evertime I close the app (eclipse / MyEclipseIDE) and restart.. if I try and Start Tomcat it tells me configuration problem “Error on startup. Please verify the preference field with the prompt: Tomcat JDK name

    #229340

    Riyad Kalla
    Member

    Did you try doing the -clean? I am starting to think there is something funked up with your workspace that needs to be cleaned out.

    #230672

    I have the same problem; I have reinstalled everything and I couldn’t start Tomcat;
    I gave tomcat Home and Base dirs are the following
    C:\Program Files\Apache Software Foundation\Tomcat 5.5

    JRE env. is jre1.5.0_03

Viewing 15 posts - 1 through 15 (of 16 total)
Reply To: Error starting Tomcat 5 w/ JDK 1.4.2_08

You must be logged in to post in the forum log in