You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "D, Dwarakesh" <Dw...@xerox.com> on 2016/08/03 15:39:34 UTC

Tomcat7 jsp compilation error with java1.8

Dear Tomcat Support,

I have compiled and build one of our application using java 1.8.0_45. I have deployed the war file in tomcat-7.0.27 and am getting the below exception.
Is this error because of the java version? Does tomcat-7.0.27 supports java1.8.0_45 or do I need to use Java1.7? Please advise.
exception
org.apache.jasper.JasperException: Unable to compile class for JSP:

An error occurred at line: 1 in the generated java file
The type java.util.Map$Entry cannot be resolved. It is indirectly referenced from required .class files

Stacktrace:
        org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:102)
        org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:331)
        org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:469)
        org.apache.jasper.compiler.Compiler.compile(Compiler.java:378)




Thanks,
Dwarak


RE: Tomcat7 jsp compilation error with java1.8

Posted by "D, Dwarakesh" <Dw...@xerox.com>.
I got it. I have used the ecj-4.4.2.jar from the later tomcat version and try to recompile the application. The JSP compilation issue was resolved now.

Thank you.

-----Original Message-----
From: D, Dwarakesh [mailto:Dwarakesh.D@xerox.com] 
Sent: Thursday, August 04, 2016 12:02 PM
To: Tomcat Users List
Subject: RE: Tomcat7 jsp compilation error with java1.8

Thank you. Can you let me know the process how to upgrade to ecj-4.4.2.jar so that I can use and run with the same Java8(with tomcat 7.0.27) without changing the java version to 7.

Thanks,
Dwarak



-----Original Message-----
From: Coty Sutherland [mailto:csutherl@redhat.com]
Sent: Thursday, August 04, 2016 12:23 AM
To: Tomcat Users List
Subject: Re: Tomcat7 jsp compilation error with java1.8

The problem is with java8 support in ECJ, not tomcat directly. You need at least JDT 4.4 in order to have full java8 support in my experiences. I just tested with 7.0.27 built from sources and the issue is present with the 3.7.2 version that it depends on. If I upgrade to ecj-4.4.2.jar (retrieved from a later build of tomcat7) then JSPs will compile and everything works.

On Wed, Aug 3, 2016 at 12:46 PM, D, Dwarakesh <Dw...@xerox.com> wrote:
> Running on Java 1.8.0_45.
>
> Thanks,
> Dwarak
>
> ________________________________________
> From: Mark Thomas [markt@apache.org]
> Sent: Wednesday, August 03, 2016 10:58 AM
> To: users@tomcat.apache.org
> Subject: Re: Tomcat7 jsp compilation error with java1.8
>
> On 3 August 2016 08:39:34 GMT-07:00, "D, Dwarakesh" <Dw...@xerox.com> wrote:
>>Dear Tomcat Support,
>>
>>I have compiled and build one of our application using java 1.8.0_45. 
>>I have deployed the war file in tomcat-7.0.27
>
> Running on what version of Java?
>
> Mark
>
>
>> and am getting the below
>>exception.
>>Is this error because of the java version? Does tomcat-7.0.27 supports
>>java1.8.0_45 or do I need to use Java1.7? Please advise.
>>exception
>>org.apache.jasper.JasperException: Unable to compile class for JSP:
>>
>>An error occurred at line: 1 in the generated java file The type 
>>java.util.Map$Entry cannot be resolved. It is indirectly referenced 
>>from required .class files
>>
>>Stacktrace:
>>org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultError
>>Handler.java:102)
>>org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.
>>java:331)
>>org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:469)
>>        org.apache.jasper.compiler.Compiler.compile(Compiler.java:378)
>>
>>
>>
>>
>>Thanks,
>>Dwarak
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


B KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKCB  [  X  ܚX KK[XZ[
 \ \  ][  X  ܚX P X ]
 \X K ܙ B  ܈Y][ۘ[  [X[  K[XZ[
 \ \  Z[ X ]
 \X K ܙ B 

RE: Tomcat7 jsp compilation error with java1.8

Posted by "D, Dwarakesh" <Dw...@xerox.com>.
Thank you. Can you let me know the process how to upgrade to ecj-4.4.2.jar so that I can use and run with the same Java8(with tomcat 7.0.27) without changing the java version to 7.

Thanks,
Dwarak



-----Original Message-----
From: Coty Sutherland [mailto:csutherl@redhat.com] 
Sent: Thursday, August 04, 2016 12:23 AM
To: Tomcat Users List
Subject: Re: Tomcat7 jsp compilation error with java1.8

The problem is with java8 support in ECJ, not tomcat directly. You need at least JDT 4.4 in order to have full java8 support in my experiences. I just tested with 7.0.27 built from sources and the issue is present with the 3.7.2 version that it depends on. If I upgrade to ecj-4.4.2.jar (retrieved from a later build of tomcat7) then JSPs will compile and everything works.

On Wed, Aug 3, 2016 at 12:46 PM, D, Dwarakesh <Dw...@xerox.com> wrote:
> Running on Java 1.8.0_45.
>
> Thanks,
> Dwarak
>
> ________________________________________
> From: Mark Thomas [markt@apache.org]
> Sent: Wednesday, August 03, 2016 10:58 AM
> To: users@tomcat.apache.org
> Subject: Re: Tomcat7 jsp compilation error with java1.8
>
> On 3 August 2016 08:39:34 GMT-07:00, "D, Dwarakesh" <Dw...@xerox.com> wrote:
>>Dear Tomcat Support,
>>
>>I have compiled and build one of our application using java 1.8.0_45. 
>>I have deployed the war file in tomcat-7.0.27
>
> Running on what version of Java?
>
> Mark
>
>
>> and am getting the below
>>exception.
>>Is this error because of the java version? Does tomcat-7.0.27 supports
>>java1.8.0_45 or do I need to use Java1.7? Please advise.
>>exception
>>org.apache.jasper.JasperException: Unable to compile class for JSP:
>>
>>An error occurred at line: 1 in the generated java file The type 
>>java.util.Map$Entry cannot be resolved. It is indirectly referenced 
>>from required .class files
>>
>>Stacktrace:
>>org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultError
>>Handler.java:102)
>>org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.
>>java:331)
>>org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:469)
>>        org.apache.jasper.compiler.Compiler.compile(Compiler.java:378)
>>
>>
>>
>>
>>Thanks,
>>Dwarak
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org



Re: Tomcat7 jsp compilation error with java1.8

Posted by Coty Sutherland <cs...@redhat.com>.
The problem is with java8 support in ECJ, not tomcat directly. You
need at least JDT 4.4 in order to have full java8 support in my
experiences. I just tested with 7.0.27 built from sources and the
issue is present with the 3.7.2 version that it depends on. If I
upgrade to ecj-4.4.2.jar (retrieved from a later build of tomcat7)
then JSPs will compile and everything works.

On Wed, Aug 3, 2016 at 12:46 PM, D, Dwarakesh <Dw...@xerox.com> wrote:
> Running on Java 1.8.0_45.
>
> Thanks,
> Dwarak
>
> ________________________________________
> From: Mark Thomas [markt@apache.org]
> Sent: Wednesday, August 03, 2016 10:58 AM
> To: users@tomcat.apache.org
> Subject: Re: Tomcat7 jsp compilation error with java1.8
>
> On 3 August 2016 08:39:34 GMT-07:00, "D, Dwarakesh" <Dw...@xerox.com> wrote:
>>Dear Tomcat Support,
>>
>>I have compiled and build one of our application using java 1.8.0_45. I
>>have deployed the war file in tomcat-7.0.27
>
> Running on what version of Java?
>
> Mark
>
>
>> and am getting the below
>>exception.
>>Is this error because of the java version? Does tomcat-7.0.27 supports
>>java1.8.0_45 or do I need to use Java1.7? Please advise.
>>exception
>>org.apache.jasper.JasperException: Unable to compile class for JSP:
>>
>>An error occurred at line: 1 in the generated java file
>>The type java.util.Map$Entry cannot be resolved. It is indirectly
>>referenced from required .class files
>>
>>Stacktrace:
>>org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:102)
>>org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:331)
>>org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:469)
>>        org.apache.jasper.compiler.Compiler.compile(Compiler.java:378)
>>
>>
>>
>>
>>Thanks,
>>Dwarak
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


RE: Tomcat7 jsp compilation error with java1.8

Posted by "D, Dwarakesh" <Dw...@xerox.com>.
Running on Java 1.8.0_45.

Thanks,
Dwarak

________________________________________
From: Mark Thomas [markt@apache.org]
Sent: Wednesday, August 03, 2016 10:58 AM
To: users@tomcat.apache.org
Subject: Re: Tomcat7 jsp compilation error with java1.8

On 3 August 2016 08:39:34 GMT-07:00, "D, Dwarakesh" <Dw...@xerox.com> wrote:
>Dear Tomcat Support,
>
>I have compiled and build one of our application using java 1.8.0_45. I
>have deployed the war file in tomcat-7.0.27

Running on what version of Java?

Mark


> and am getting the below
>exception.
>Is this error because of the java version? Does tomcat-7.0.27 supports
>java1.8.0_45 or do I need to use Java1.7? Please advise.
>exception
>org.apache.jasper.JasperException: Unable to compile class for JSP:
>
>An error occurred at line: 1 in the generated java file
>The type java.util.Map$Entry cannot be resolved. It is indirectly
>referenced from required .class files
>
>Stacktrace:
>org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:102)
>org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:331)
>org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:469)
>        org.apache.jasper.compiler.Compiler.compile(Compiler.java:378)
>
>
>
>
>Thanks,
>Dwarak



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat7 jsp compilation error with java1.8

Posted by Mark Thomas <ma...@apache.org>.
On 3 August 2016 08:39:34 GMT-07:00, "D, Dwarakesh" <Dw...@xerox.com> wrote:
>Dear Tomcat Support,
>
>I have compiled and build one of our application using java 1.8.0_45. I
>have deployed the war file in tomcat-7.0.27

Running on what version of Java?

Mark


> and am getting the below
>exception.
>Is this error because of the java version? Does tomcat-7.0.27 supports
>java1.8.0_45 or do I need to use Java1.7? Please advise.
>exception
>org.apache.jasper.JasperException: Unable to compile class for JSP:
>
>An error occurred at line: 1 in the generated java file
>The type java.util.Map$Entry cannot be resolved. It is indirectly
>referenced from required .class files
>
>Stacktrace:
>org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:102)
>org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:331)
>org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:469)
>        org.apache.jasper.compiler.Compiler.compile(Compiler.java:378)
>
>
>
>
>Thanks,
>Dwarak



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org