1

We are trying to migrate our application from Java 1.6 to Java 1.8. I'm able to successfully build and deploy the EAR on WL11, but when I try to access the application, I get this error:

javax.servlet.ServletException: weblogic.servlet.jsp.CompilationException: Failed to compile JSP /jsp/login/SuperAdminProgramView.jsp
SuperAdminProgramView.jsp:24:18: The type java.util.Map$Entry cannot be resolved. It is indirectly referenced from required .class files
<%@ page import="com.gxs.ncm.mvc.model.valueobject.*" %>

Could anyone kindly let know how to resolve this issue on Web logic 11 with Java 1.8. What is the solution to make it work on Java 1.8. Does the Web logic use Java 1.8 to compile the jsp or does it use the Java version which was selected during installation of Web Logic?

Punith
  • 11
  • 1
  • 4
  • are you using eclips ? – Keval Apr 02 '15 at 12:20
  • 1
    Possible duplicate of [this](http://stackoverflow.com/questions/26700824/jdk-8-the-type-java-util-mapentry-cannot-be-resolved) – Parth Soni Apr 02 '15 at 12:21
  • Hi Keval, I was using eclipse Ganymede and was getting the same error with Java 1.8. When i used eclipse Juno with Java 1.8 the error was no longer present. This is the sample program that i used on both eclipse versions - import java.util.HashMap; public class Maptest { public static void main(String[] args) { HashMap hash = new HashMap(); } } – Punith Apr 02 '15 at 12:22
  • possible duplicate of [Error when using LogManager (l4j2) with Java 8 (java.lang.reflect.AnnotatedElement cannot be resolved)](http://stackoverflow.com/questions/26102115/error-when-using-logmanager-l4j2-with-java-8-java-lang-reflect-annotatedeleme) – Anderson Vieira Apr 02 '15 at 12:24
  • I'm not encountering this issue once i started using eclipse Juno. But I'm getting this error in Web Logic at Runtime. – Punith Apr 02 '15 at 12:28

4 Answers4

1

Unfortunately, Eclipse Ganymede is too out-of-date to be used with Java 1.8. You'll need to update to Juno or later; ideally, you'd use Luna, since it's the later and greater Eclipse.

You can find the latest Eclipse download here, or, if you'd prefer to get Eclipse Juno or Kepler, you can get that here with instructions here1 on patching it to run with Java 8.

1 I couldn't find an official Eclipse tutorial on how to upgrade, but StackOverflow seems good enough.

Community
  • 1
  • 1
Nic
  • 6,211
  • 10
  • 46
  • 69
0

Using Eclipse Luna it will solve your problem, since it is compatible with Java 8.

Magnilex
  • 11,584
  • 9
  • 62
  • 84
Keval
  • 1,857
  • 16
  • 26
0

For me, the solution was to use a newer ecj jar file, ecj-4.4.2.jar

webber55
  • 329
  • 4
  • 13
0

When WebLogic finds a JSP without associated class or with an associated class compiled with a different WebLogic version it tries to recompile it during deployment.

This error is caused by an incompatibility between the WebLogic 11g JSP compiler and JDK 1.8.

In fact Oracle WebLogic 11g do not support JDK 1.8. See official certification matrix from Oracle site.

The support to JDK 1.8 was introduced in WebLogic Server 12.1.3 (see WLS 12.1.3 - What's New - Supported Configurations)

A workaround I've found is to pre-compile jsp pages using JDK 1.7 and the weblogic.appc utility from the same WebLogic version. This avoids recompilation during deployment and skips this specific error/incompatibility related only to the compiler. But I suggest to downgrade to JDK 1.7 or upgrade WebLogic to 12.1.3 or above, because of the missing official support from Oracle.

Mariano Paniga
  • 626
  • 12
  • 26