javajspweblogic11g

Error in "yyy.jspf" at line 7: The type java.lang.CharSequence cannot be resolved. It is indirectly referenced from required .class files


We are using weblogic server 11g and this jsp file was working with jdk1.6. Now, when we tried to upgrade to JDK1.8, the weblogic is throwing this exception, when I hit the login page. The same code is working fine with Tomcat9.0 container. Tried two solutions like

  1. Added source and target options for javac(The type java.lang.CharSequence cannot be resolved in package declaration)
  2. Selected JSP Compiler Backwards Compatible option under web applications tab of domain (While compiling jsp WebLogic 12c throw error)

but it none of them worked. Can anyone please help me to find a solution for this issue? Thanks in advance.

Full Stack trace:

javax.servlet.ServletException: weblogic.servlet.jsp.CompilationException: Failed to compile JSP /WEB-INF/web/en/US/enterpriseMgr/Login/xxx.jsp
xxx.jsp:2:18: Error in "yyy.jspf" at line 7: The type java.lang.CharSequence cannot be resolved. It is indirectly referenced from required .class files
<%@ include file="../../common/yyy.jspf"%>
                 ^-----------------------------^
xxx.jsp:2:18: Error in "yyy.jspf" at line 96: The type java.util.Map$Entry cannot be resolved. It is indirectly referenced from required .class files
<%@ include file="../../common/yyy.jspf"%>
                 ^-----------------------------^

Solution

  • This error is related to an incompatibility between the WebLogic 11g JSP compiler and JDK 1.8.

    See other details and a workaround from my answer to a similar error related to the same incompatibility: java.util.Map$Entry cannot be resolved Error using Java 1.8.