ClassFormatException in Java11 while compiling JSP pages [message #1871373] |
Mon, 23 September 2024 14:13  |
Eclipse User |
|
|
|
Stacktrace:
MESSAGE:Compilation error
org.eclipse.jdt.internal.compiler.classfmt.ClassFormatException
at org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader.<init>(ClassFileReader.java:298)[44:org.apache.jasper:5.5.17.v200706111724]
at org.apache.jasper.compiler.JDTCompiler$1.findType(JDTCompiler.java:197)[44:org.apache.jasper:5.5.17.v200706111724]
at org.apache.jasper.compiler.JDTCompiler$1.findType(JDTCompiler.java:169)[44:org.apache.jasper:5.5.17.v200706111724]
at org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(LookupEnvironment.java:119)[44:org.apache.jasper:5.5.17.v200706111724]
at org.eclipse.jdt.internal.compiler.lookup.PackageBinding.getTypeOrPackage(PackageBinding.java:178)[44:org.apache.jasper:5.5.17.v200706111724]
at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.findImport(CompilationUnitScope.java:415)[44:org.apache.jasper:5.5.17.v200706111724]
at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.findSingleImport(CompilationUnitScope.java:469)[44:org.apache.jasper:5.5.17.v200706111724]
at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.faultInImports(CompilationUnitScope.java:333)[44:org.apache.jasper:5.5.17.v200706111724]
at org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.faultInTypes(CompilationUnitScope.java:402)[44:org.apache.jasper:5.5.17.v200706111724]
Java: Java 11.0.24
Tomcat 9.0.89
We are getting the issue when compiling JSP java files
|
|
|
|
Re: ClassFormatException in Java11 while compiling JSP pages [message #1871394 is a reply to message #1871376] |
Mon, 23 September 2024 16:12   |
Eclipse User |
|
|
|
There is prey weird behaviour that we are observing. When we import a class in JSP that does not have any string + operations, it is working fine. But when the imported class contains these operations, it is failing. For example:
Working class files:
public class App {
public string getName(){
String name = "test**";
return name;
}
}
public class App {
public string getName(){
String name = "test**";
return "test".concat(name);
}
}
Non-working class file:
public class App {
public string getName(){
String name = "test**";
return name + "fail";
}
}
Unable to figure out what's causing this behaviour.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04033 seconds