This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 19023 - Tomcat does not start sometimes due to an extra " in the classpath.
Summary: Tomcat does not start sometimes due to an extra " in the classpath.
Status: VERIFIED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Tomcat (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P3 blocker (vote)
Assignee: Milan Kuchtiak
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-01-04 04:08 UTC by ngilmore
Modified: 2002-03-16 01:23 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ngilmore 2002-01-04 04:08:06 UTC
This may be similiar or the same as 17719.

The Tomcat output windows shows the line used to start Tomcat. When Tomcat 
startup hangs, it is caused by an extra quote in the classpath. I've been 
getting this intermittently, and now it looks like constantly.

This is a cut and paste from the output window. Note the extra quote in the -cp 
which is never closed (and shouldn't be there?). The subsequent directory name 
has spaces, which may be causing the quote to be inserted.

C:\JDK13~1.1_0\jre\bin\java  -cp "C:\netbeans\modules\jsp-
tomcat.jar;C:\netbeans\modules\jsp.jar;C:\netbeans\modules\ext\jasper.jar;C:\net
beans\modules\ext\webserver.jar;;C:\netbeans\lib\ext\xerces.jar;;"C:\Documents 
and Settings\ng\My Documents\TeamForecast\Source Code\Server 
Source\TeamForecast\WEB-INF\classes;C:\Documents and Settings\ng\My 
Documents\TeamForecast\Source Code\Server Source\TeamForecast;C:\Documents and 
Settings\ng\My Documents\TeamForecast\Source Code\Server 
Source\TeamForecast\WEB-INF\classes;C:\Documents and Settings\ng\My 
Documents\TeamForecast\Source Code\Server 
Source\system;C:\netbeans\beans\TimerBean.jar;C:\netbeans\modules\ext\AbsoluteLa
yout.jar;C:\netbeans\modules\ext\servlet-2.2.jar;C:\netbeans\system" 
org.netbeans.modules.web.tomcat.WebAppMain "C:\Documents and Settings\ng\My 
Documents\TeamForecast\Source Code\Server 
Source\system\tomcat\server.xml" "C:\Documents and Settings\ng\My 
Documents\TeamForecast\Source Code\Server Source\system\tomcat"

I suspect the problem lies in TomcatServerExecution.getSortedFileSystemNames,

which I have excerpted below:

      StringBuffer sb = new StringBuffer();
        sb.append(getTomcatClasspath(pathSeparator));
        Enumeration e = FileSystemCapability.EXECUTE.fileSystems();
        if (e.hasMoreElements()) {
            sb.append("\"");

I suspect (but have not proven) that sb.append("\"") may be the offender.

I also note from TomcatServerExecution.getTomcatClasspath that "parser.jar" 
and "servletjar" have not been added to my classpath, which seems like it might 
be bad. You will note the ;; in the classpath above where they are missing. The 
following excerpt from TomcatServerExecution.getTomcatClasspath shows where 
that portion of the classpath is built.       

            buf.append(jsp_tomcat).append(ps);
            if (dd2beans.length ()>0) 
                buf.append(dd2beans).append(ps);
            buf.append(jsp).append(ps);
            buf.append(jasper).append(ps);
            buf.append(webserver).append(ps);
            buf.append(parser).append(ps);
            buf.append(xerces).append(ps).
                append(servletjar).append(ps);

Unlike dd2beans, the others are not checked for non-existence before appending.
---end---
Comment 1 Milan Kuchtiak 2002-01-09 10:28:36 UTC
Thank You for detailed description.

Problem with quotes fixed by fixing bug 18382.

Double semicolon doesn't cause the problems.
But this will be alse solved for future versions (netbeans 3.4)
Comment 2 Mikhail Romanov 2002-03-16 01:23:31 UTC
Verified in Build 020315.