You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2025/10/03 12:16:51 UTC

[Bug 69837] New: JavaCompiler invalid compile classpath composing

https://bz.apache.org/bugzilla/show_bug.cgi?id=69837

            Bug ID: 69837
           Summary: JavaCompiler invalid compile classpath composing
           Product: Tomcat 10
           Version: 10.1.46
          Hardware: PC
            Status: NEW
          Severity: blocker
          Priority: P2
         Component: Jasper
          Assignee: dev@tomcat.apache.org
          Reporter: netbeans@post.cz
  Target Milestone: ------

Added org.apache.jasper.compiler.JavaCompiler in one of prior versions.

It does not correctly sets compile classpath on windows platform.

So that leads to errors like:

package org.apache.jasper.runtime does not exist
package jakarta.servlet.jsp does not exist

So please make proper composing of compile classpath on windows platform.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 69837] JavaCompiler invalid compile classpath composing

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=69837

netbeans@post.cz changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |---

--- Comment #8 from netbeans@post.cz ---
Firstly thank you for initial-fix as that fix that at least paths that are
pointing to CATALINA_HOME/lib seems correct now.

so it can be created JSP page only application compilable now.

But problem remains for application that contains classes and libs so not only
JSP pages so such paths:

        anyapplication/WEB-INF/classes/
        anyapplication/WEB-INF/lib/


are still similarly corrupted (invalid) at least on Microsoft Windows platform.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 69837] JavaCompiler invalid compile classpath composing

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=69837

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #7 from Mark Thomas <ma...@apache.org> ---
The URL to file path conversion in the Loader component that builds the class
path didn't handle file: URLs on Windows very well.

Fixed in:
- 11.0.x for 11.0.13 onwards
- 10.1.x for 10.1.48 onwards
-  9.0.x for  9.0.111 onwards

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 69837] JavaCompiler invalid compile classpath composing

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=69837

Remy Maucherat <re...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|critical                    |normal

--- Comment #5 from Remy Maucherat <re...@apache.org> ---
(In reply to netbeans from comment #4)
> Regarding to point 4)
> I think that should be enough what was provided if you correct construction
> of compile classpath  
> used in org.apache.jasper.compiler.JavaCompiler in method "generateClass"
> e.g. during debug then compilation is done without no error and any even
> hello-world page is shown.

I don't understand, can you rephrase ? It means the reproduction is: use
Windows, try to compile any JSP, and it will fail ?

Adjusting the severity back, as you do not have to use this new compiler if it
does not work in specific environments.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 69837] JavaCompiler invalid compile classpath composing

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=69837

netbeans@post.cz changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |critical

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 69837] JavaCompiler invalid compile classpath composing

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=69837

Christopher Schultz <ch...@christopherschultz.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO
                 OS|                            |All

--- Comment #1 from Christopher Schultz <ch...@christopherschultz.net> ---
Please provide additional information:

1. What was the source version of the compiler, and where did you get it?

2. What was the target version of ... Tomcat, I guess?

3. How did you "add" the compiler?

4. Please provide a full stack trace for the error.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 69837] JavaCompiler invalid compile classpath composing

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=69837

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |NEW

--- Comment #6 from Mark Thomas <ma...@apache.org> ---
Confirmed that JavaCompiler doesn't work on Windows but does work on Linux with
current 12.0.x.

Investigating...

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 69837] JavaCompiler invalid compile classpath composing

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=69837

Mark Thomas <ma...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|blocker                     |normal

--- Comment #3 from Mark Thomas <ma...@apache.org> ---
No response so clearly not critical.

Given the lack of clear information, this bug report will get closed as invalid
unless a clear description of the issue and how to reproduce it is provided.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 69837] JavaCompiler invalid compile classpath composing

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=69837

--- Comment #4 from netbeans@post.cz ---
Regarding to point 1)
It does not matter what version of source you use in compilerSourceVM e.g. 17

Regarding to point 2)
e.g. 10.1.44, but anything after 10.1.40 where feature is done as I guess there
is no 
change done "org.apache.jasper.compiler.JavaCompiler".

Regarding to point 3)
Setting a compilerClassName to "org.apache.jasper.compiler.JavaCompiler" for
jsp servlet in web.xml 
so you can see:

https://tomcat.apache.org/tomcat-10.1-doc/jasper-howto.html (even it is not
updated properly)
OR
https://tomcat.apache.org/tomcat-10.1-doc/changelog.html#Tomcat_10.1.47_(schultz)

Regarding to point 4)
I think that should be enough what was provided if you correct construction of
compile classpath  
used in org.apache.jasper.compiler.JavaCompiler in method "generateClass" e.g.
during debug then compilation is done without no error and any even hello-world
page is shown.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 69837] JavaCompiler invalid compile classpath composing

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=69837

--- Comment #2 from Remy Maucherat <re...@apache.org> ---
The API used is rather nice, except passing the classpath is the usual from the
command line so not as robust as when using JDT.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


[Bug 69837] JavaCompiler invalid compile classpath composing

Posted by bu...@apache.org.
https://bz.apache.org/bugzilla/show_bug.cgi?id=69837

Remy Maucherat <re...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #9 from Remy Maucherat <re...@apache.org> ---
The classpath was populated too early in the lifecycle.

Fixed in:
- 11.0.x for 11.0.15 onwards
- 10.1.x for 10.1.50 onwards
-  9.0.x for  9.0.113 onwards

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org