Unable to compile class for JSP

From the error it seems that you are trying to import something which is not a class.

If your MyFunctions is a class, you should import it like this:

<%@page import="com.TransportPortal.MyFunctions"%>

If it is a package and you want to import everything in the package you should do like this:

<%@page import="com.TransportPortal.MyFunctions.* "%>

Edit:

There are two cases which will give you this error, edited to cover both.


Either you can Downgrade to JRE 1.7.49

or if you want to run on JRE 8

Step to fix:-

  • Go to Lib folder of Liferay Tomcat .

  • Replace :- ecj-3.7.2.jar with ecj-4.4.2.

  • Restart the Server


It may be related to Java JRE version.

In my case I need Tomcat 6.0.26 which presented same error with JRE 1.8.0_91. A downgrade to JRE 1.7.49 solved it.

You might find more information in: http://www.howopensource.com/2015/07/unable-to-compile-class-for-jsp-the-type-java-util-mapentry-cannot-be-resolved/

Tags:

Jsp