You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Christopher Schultz <ch...@christopherschultz.net> on 2023/11/09 19:07:14 UTC

Unexpected error running unit tests in 8.5.x

All,

I just ran the full unit test suite for 8.5.x on x86 MacOS and I got a 
weird error in this test:

TEST-org.apache.catalina.mapper.TestMapperWebapps.NIO.txt

09-Nov-2023 13:46:19.661 SEVERE [http-nio-127.0.0.1-auto-3-exec-4] 
org.apache.jasper.compiler.JDTCompiler$1.findType Failed to load class 
[java.lang.System]
         org.eclipse.jdt.internal.compiler.classfmt.ClassFormatException
                 at 
org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader.<init>(ClassFileReader.java:406)
                 at 
org.apache.jasper.compiler.JDTCompiler$1.findType(JDTCompiler.java:231)
                 at 
org.apache.jasper.compiler.JDTCompiler$1.findType(JDTCompiler.java:207)

[....]

09-Nov-2023 13:46:19.674 SEVERE [http-nio-127.0.0.1-auto-3-exec-4] 
org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() 
for servlet [jsp] in context with path [/examples] threw exception 
[Unable to compile class for JSP:

An error occurred at line: [17] in the jsp file: [/jsp/include/foo.jsp]
System cannot be resolved
14:   See the License for the specific language governing permissions and
15:   limitations under the License.
16:
17: --%><%= System.currentTimeMillis() %>


Stacktrace:] with root cause
         org.apache.jasper.JasperException: Unable to compile class for 
JSP:

An error occurred at line: [17] in the jsp file: [/jsp/include/foo.jsp]
System cannot be resolved
14:   See the License for the specific language governing permissions and
15:   limitations under the License.
16:
17: --%><%= System.currentTimeMillis() %>

The same error is showing for the NIO2 test, of course.

Here is the environment:

$ java -version
openjdk version "17.0.5" 2022-10-18
OpenJDK Runtime Environment Temurin-17.0.5+8 (build 17.0.5+8)
OpenJDK 64-Bit Server VM Temurin-17.0.5+8 (build 17.0.5+8, mixed mode, 
sharing)

$ uname -a
Darwin Christors27iMac 21.6.0 Darwin Kernel Version 21.6.0: Fri Sep 15 
16:17:23 PDT 2023; root:xnu-8020.240.18.703.5~1/RELEASE_X86_64 x86_64

$ ant -version
Apache Ant(TM) version 1.10.13 compiled on January 4 2023

Any suggestions for what to look at? Is this a "you need a newer JDT 
compiler to use Java 17" problem?

-chris

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Re: Unexpected error running unit tests in 8.5.x

Posted by Mark Thomas <ma...@apache.org>.
On 09/11/2023 19:07, Christopher Schultz wrote:

> Any suggestions for what to look at? Is this a "you need a newer JDT 
> compiler to use Java 17" problem?

I think so. This looks like similar reports we have had before for the 
8.5.x tests.

Mark

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org