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

            Bug ID: 69339
           Summary: ClassFormatException in Java11 while compiling JSP
                    pages
           Product: Tomcat 9
           Version: 9.0.89
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Jasper
          Assignee: dev@tomcat.apache.org
          Reporter: datti.prudvi...@gmail.com
  Target Milestone: -----

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";
}
}


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]

OSGI based application
Java: Java 11.0.24 (tried with Java 11.0.18 as well)
Tomcat 9.0.89 using ecj-4.20.jar

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

Reply via email to