You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jess Holle <je...@ptc.com> on 2012/12/13 04:45:24 UTC

Tomcat 7.0.34 JspC issue?

I moved to Tomcat 7.0.34 -- apparently with inadequate testing / too 
much trust.

Some JSPs that precompiled just fine with 7.0.33 and many previous 
Tomcat versions now produce the error shown below

Moving back to the ecj jar from Tomcat 7.0.33 resolves the issue. I'm 
assuming buggy JDT compiler until proven otherwise.

--
Jess Holle

   [jasper2] java.lang.ArrayStoreException: org.eclipse.jdt.internal.compiler.ast.ReturnStatement
   [jasper2] 	at org.eclipse.jdt.internal.compiler.flow.FinallyFlowContext.recordNullReference(FinallyFlowContext.java:440)
   [jasper2] 	at org.eclipse.jdt.internal.compiler.flow.FinallyFlowContext.recordUsingNullReference(FinallyFlowContext.java:405)
   [jasper2] 	at org.eclipse.jdt.internal.compiler.flow.LoopingFlowContext.complainOnDeferredNullChecks(LoopingFlowContext.java:278)
   [jasper2] 	at org.eclipse.jdt.internal.compiler.ast.DoStatement.analyseCode(DoStatement.java:112)
   [jasper2] 	at org.eclipse.jdt.internal.compiler.ast.Block.analyseCode(Block.java:39)
   [jasper2] 	at org.eclipse.jdt.internal.compiler.ast.IfStatement.analyseCode(IfStatement.java:102)
   [jasper2] 	at org.eclipse.jdt.internal.compiler.ast.Block.analyseCode(Block.java:39)
   [jasper2] 	at org.eclipse.jdt.internal.compiler.ast.TryStatement.analyseCode(TryStatement.java:260)
   [jasper2] 	at org.eclipse.jdt.internal.compiler.ast.Block.analyseCode(Block.java:39)
   [jasper2] 	at org.eclipse.jdt.internal.compiler.ast.IfStatement.analyseCode(IfStatement.java:102)
   [jasper2] 	at org.eclipse.jdt.internal.compiler.ast.LabeledStatement.analyseCode(LabeledStatement.java:54)
   [jasper2] 	at org.eclipse.jdt.internal.compiler.ast.Block.analyseCode(Block.java:39)
   [jasper2] 	at org.eclipse.jdt.internal.compiler.ast.DoStatement.analyseCode(DoStatement.java:69)
   [jasper2] 	at org.eclipse.jdt.internal.compiler.ast.Block.analyseCode(Block.java:39)
   [jasper2] 	at org.eclipse.jdt.internal.compiler.ast.IfStatement.analyseCode(IfStatement.java:102)
   [jasper2] 	at org.eclipse.jdt.internal.compiler.ast.Block.analyseCode(Block.java:39)
   [jasper2] 	at org.eclipse.jdt.internal.compiler.ast.DoStatement.analyseCode(DoStatement.java:69)
   [jasper2] 	at org.eclipse.jdt.internal.compiler.ast.Block.analyseCode(Block.java:39)
   [jasper2] 	at org.eclipse.jdt.internal.compiler.ast.IfStatement.analyseCode(IfStatement.java:102)
   [jasper2] 	at org.eclipse.jdt.internal.compiler.ast.Block.analyseCode(Block.java:39)
   [jasper2] 	at org.eclipse.jdt.internal.compiler.ast.DoStatement.analyseCode(DoStatement.java:69)
   [jasper2] 	at org.eclipse.jdt.internal.compiler.ast.Block.analyseCode(Block.java:39)
   [jasper2] 	at org.eclipse.jdt.internal.compiler.ast.IfStatement.analyseCode(IfStatement.java:102)
   [jasper2] 	at org.eclipse.jdt.internal.compiler.ast.Block.analyseCode(Block.java:39)
   [jasper2] 	at org.eclipse.jdt.internal.compiler.ast.DoStatement.analyseCode(DoStatement.java:69)
   [jasper2] 	at org.eclipse.jdt.internal.compiler.ast.Block.analyseCode(Block.java:39)
   [jasper2] 	at org.eclipse.jdt.internal.compiler.ast.IfStatement.analyseCode(IfStatement.java:102)
   [jasper2] 	at org.eclipse.jdt.internal.compiler.ast.Block.analyseCode(Block.java:39)
   [jasper2] 	at org.eclipse.jdt.internal.compiler.ast.DoStatement.analyseCode(DoStatement.java:69)
   [jasper2] 	at org.eclipse.jdt.internal.compiler.ast.Block.analyseCode(Block.java:39)
   [jasper2] 	at org.eclipse.jdt.internal.compiler.ast.IfStatement.analyseCode(IfStatement.java:102)
   [jasper2] 	at org.eclipse.jdt.internal.compiler.ast.Block.analyseCode(Block.java:39)
   [jasper2] 	at org.eclipse.jdt.internal.compiler.ast.TryStatement.analyseCode(TryStatement.java:336)
   [jasper2] 	at org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.analyseCode(MethodDeclaration.java:110)
   [jasper2] 	at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.internalAnalyseCode(TypeDeclaration.java:710)
   [jasper2] 	at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.analyseCode(TypeDeclaration.java:255)
   [jasper2] 	at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.analyseCode(CompilationUnitDeclaration.java:111)
   [jasper2] 	at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:776)
   [jasper2] 	at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:470)
   [jasper2] 	at org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:458)
   [jasper2] 	at org.apache.jasper.compiler.Compiler.compile(Compiler.java:378)
   [jasper2] 	at org.apache.jasper.JspC.processFile(JspC.java:1179)
   [jasper2] 	at org.apache.jasper.JspC.execute(JspC.java:1329)
   [jasper2] 	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
   [jasper2] 	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
   [jasper2] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   [jasper2] 	at java.lang.reflect.Method.invoke(Method.java:601)
   [jasper2] 	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
   [jasper2] 	at org.apache.tools.ant.Task.perform(Task.java:348)
   [jasper2] 	at org.apache.tools.ant.Target.execute(Target.java:392)
   [jasper2] 	at org.apache.tools.ant.Target.performTasks(Target.java:413)
   [jasper2] 	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
   [jasper2] 	at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
   [jasper2] 	at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
   [jasper2] 	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
   [jasper2] 	at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
   [jasper2] 	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
   [jasper2] 	at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
   [jasper2] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   [jasper2] 	at java.lang.reflect.Method.invoke(Method.java:601)
   [jasper2] 	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
   [jasper2] 	at org.apache.tools.ant.Task.perform(Task.java:348)
   [jasper2] 	at org.apache.tools.ant.Target.execute(Target.java:392)
   [jasper2] 	at org.apache.tools.ant.Target.performTasks(Target.java:413)
   [jasper2] 	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
   [jasper2] 	at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
   [jasper2] 	at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
   [jasper2] 	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
   [jasper2] 	at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
   [jasper2] 	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
   [jasper2] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   [jasper2] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
   [jasper2] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   [jasper2] 	at java.lang.reflect.Method.invoke(Method.java:601)
   [jasper2] 	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
   [jasper2] 	at org.apache.tools.ant.Task.perform(Task.java:348)
   [jasper2] 	at org.apache.tools.ant.Target.execute(Target.java:392)
   [jasper2] 	at org.apache.tools.ant.Target.performTasks(Target.java:413)
   [jasper2] 	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
   [jasper2] 	at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
   [jasper2] 	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
   [jasper2] 	at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
   [jasper2] 	at org.apache.tools.ant.Main.runBuild(Main.java:811)
   [jasper2] 	at org.apache.tools.ant.Main.startAnt(Main.java:217)
   [jasper2] 	at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
   [jasper2] 	at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)


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


Re: Tomcat 7.0.34 JspC issue?

Posted by Mark Thomas <ma...@apache.org>.

Jess Holle <je...@ptc.com> wrote:

>No, unfortunately I have no small test case.  Our JSPs are the opposite
>
>of standalone test cases and I've not had time to try to find a trigger
>
>within them -- and quite likely won't have such time.

Fair enough. If you do find time, that would be great.

Mark

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


Re: Tomcat 7.0.34 JspC issue?

Posted by Jess Holle <je...@ptc.com>.
No, unfortunately I have no small test case.  Our JSPs are the opposite 
of standalone test cases and I've not had time to try to find a trigger 
within them -- and quite likely won't have such time.

Out of our 1000's of JSP pages I saw a dozen or so JSP precompilation 
failures that weren't present prior to stopping the precompilation early 
-- hence I don't know how many failures I would have had.

I tested this with Java 6 and Java 7 against 2 different versions of our 
application (compiled with Java 6 and Java 7, respectively) where Tomcat 
7.0.33 worked fine.  Tomcat 7.0.34 failed in both cases -- until I 
reverted to the old ecj.jar.

There *may* be a relationship to how my pre-compilation runs. Even if 
that's the case I'll be sticking with the old ecj.jar as it clearly works.

The pre-compilation script that I was running does the following:

 1. Try to compile everything en masse excluding known failures (mostly
    legacy JSP fragments that were improperly named .jspf rather than .jsp)
 2. Catch (via ant-contrib) any failure and re-try to compile everything
    en masse excluding known failure
      * The first attempt has been consistently failing for quite a
        number of Tomcat releases for no apparent reason on a tag file
        or some such as I recall (too many nested dependencies?) where
        the second would succeed.
 3. Catch any failure one again
      * If there was a failure try to recompile each JSP individually so
        as to generate an accurate list of failures.
 4. If there was no failure on the second attempt, then try to compile
    every JSP in the known failure list so as to verify that the entire
    known failure list is still failing.

The need to re-try the en-masse JspC has been bothersome for quite some 
time -- and doesn't seem to be addressed by simple things like giving 
the script more memory.  That said, this issue has been there for quite 
some time.

The new issue shows up when trying to compile one of the failing JSPs 
all by itself and results in a stack trace into the bowels of ECJ, so 
this really looks like an issue in ECJ.

--
Jess Holle

On 12/13/2012 1:07 AM, Mark Thomas wrote:
> Jess Holle <je...@ptc.com> wrote:
>> I moved to Tomcat 7.0.34 -- apparently with inadequate testing / too
>> much trust.
>>
>> Some JSPs that precompiled just fine with 7.0.33 and many previous
>> Tomcat versions now produce the error shown below
>>
>> Moving back to the ecj jar from Tomcat 7.0.33 resolves the issue. I'm
>> assuming buggy JDT compiler until proven otherwise.
> It certainly sounds like a bug in ecj.jar
>
> Do you have a sample JSP you can share that demonstrates the issue?
>
> Mark
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>


Re: Tomcat 7.0.34 JspC issue?

Posted by Mark Thomas <ma...@apache.org>.
Jess Holle <je...@ptc.com> wrote:

>I moved to Tomcat 7.0.34 -- apparently with inadequate testing / too 
>much trust.
>
>Some JSPs that precompiled just fine with 7.0.33 and many previous 
>Tomcat versions now produce the error shown below
>
>Moving back to the ecj jar from Tomcat 7.0.33 resolves the issue. I'm 
>assuming buggy JDT compiler until proven otherwise.

It certainly sounds like a bug in ecj.jar

Do you have a sample JSP you can share that demonstrates the issue?

Mark


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