3 Replies Latest reply on Apr 26, 2016 3:56 AM by ozizka

    FreeMarker template error in JPA Report (Windup 2.4.0.Final)

    rafaelcba

      I'm using Windup 2.4.0.Final to analyse a Seam 2.2.5 (EAP) web app that runs on JBoss EAP 5.2.

      I tried using different options for input: EAR package and --sourceMode.

      I ran windup in a Windows Box with Java SE 7 and 8.

       

      The windup generated the final report but the JPA report page show an exception error in the JPA Entities section:

       

      FreeMarker template error (DEBUG mode; use RETHROW in production!): The following has evaluated to null or missing: ==> entity.entityName [in template "reports/templates/jpa.
      ftl" at line 114, column 55] ---- Tip: It's the step after the last dot that caused this error, not those before it. ---- Tip: If the failing expression is known to be legally
      refer to something that's sometimes null or missing, either specify a default value like myOptionalVar!myDefault, or use <#if myOptionalVar??>when-present<#else>when-missing. (
      These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack
      trace ("~" means nesting-related): - Failed at: ${entity.entityName} [in template "reports/templates/jpa.ftl" at line 114, column 53] ---- Java stack trace (for programmers):
      ---- freemarker.core.InvalidReferenceException: [... Exception message was already printed; see it above ...] at freemarker.core.InvalidReferenceException.getInstance(
      InvalidReferenceException.java:131) at freemarker.core.EvalUtil.coerceModelToString(EvalUtil.java:355) at freemarker.core.Expression.evalAndCoerceToString(Expression.java:82)
      at freemarker.core.DollarVariable.accept(DollarVariable.java:41) at freemarker.core.Environment.visit(Environment.java:324) at freemarker.core.MixedContent.accept(MixedContent.
      java:54) at freemarker.core.Environment.visitByHiddingParent(Environment.java:345) at freemarker.core.IteratorBlock$IterationContext.executeNestedBlockInner(IteratorBlock.
      java:240) at freemarker.core.IteratorBlock$IterationContext.executeNestedBlock(IteratorBlock.java:220) at freemarker.core.IteratorBlock$IterationContext.accept(IteratorBlock.
      java:194) at freemarker.core.Environment.visitIteratorBlock(Environment.java:572) at freemarker.core.IteratorBlock.acceptWithResult(IteratorBlock.java:78) at freemarker.core.
      IteratorBlock.accept(IteratorBlock.java:64) at freemarker.core.Environment.visit(Environment.java:324) at freemarker.core.MixedContent.accept(MixedContent.java:54) at
      freemarker.core.Environment.visitByHiddingParent(Environment.java:345) at freemarker.core.ConditionalBlock.accept(ConditionalBlock.java:48) at freemarker.core.Environment.visit
      (Environment.java:324) at freemarker.core.MixedContent.accept(MixedContent.java:54) at freemarker.core.Environment.visit(Environment.java:324) at freemarker.core.Environment.
      process(Environment.java:302) at freemarker.template.Template.process(Template.java:325) at org.jboss.windup.reporting.freemarker.FreeMarkerIterationOperation.perform(
      FreeMarkerIterationOperation.java:132) at org.jboss.windup.reporting.freemarker.FreeMarkerIterationOperation.perform(FreeMarkerIterationOperation.java:35) at org.jboss.windup.
      config.operation.iteration.AbstractIterationOperation.perform(AbstractIterationOperation.java:65) at org.jboss.windup.config.operation.GraphOperation.perform(GraphOperation.
      java:24) at org.ocpsoft.rewrite.config.DefaultOperationBuilder$DefaultOperationBuilderInternal.perform(DefaultOperationBuilder.java:54) at org.jboss.windup.config.operation.
      Iteration.perform(Iteration.java:263) at org.jboss.windup.config.operation.Iteration.perform(Iteration.java:203) at org.ocpsoft.rewrite.config.RuleBuilder.perform(RuleBuilder.
      java:168) at org.jboss.windup.config.RuleSubset.perform(RuleSubset.java:250) at org.jboss.windup.exec.WindupProcessorImpl.execute(WindupProcessorImpl.java:140) at sun.reflect.
      NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.
      invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.jboss.forge.furnace.proxy.ClassLoaderInterceptor$1.call(
      ClassLoaderInterceptor.java:87) at org.jboss.forge.furnace.util.ClassLoaders.executeIn(ClassLoaders.java:42) at org.jboss.forge.furnace.proxy.ClassLoaderInterceptor.invoke(
      ClassLoaderInterceptor.java:103) at org.jboss.windup.exec.WindupProcessorImpl_$$_javassist_adb1af0d-acb1-4fb1-9eae-456f8ce8424a.execute(
      WindupProcessorImpl_$$_javassist_adb1af0d-acb1-4fb1-9eae-456f8ce8424a.java) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.
      NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.
      Method.invoke(Method.java:606) at org.jboss.forge.furnace.proxy.ClassLoaderAdapterCallback$2.call(ClassLoaderAdapterCallback.java:123) at org.jboss.forge.furnace.util.
      ClassLoaders.executeIn(ClassLoaders.java:42) at org.jboss.forge.furnace.proxy.ClassLoaderAdapterCallback.invoke(ClassLoaderAdapterCallback.java:96) at org.jboss.windup.exec.
      WindupProcessor_$$_javassist_2c930f17-2b37-462f-888e-e90f3fa5e869.execute(WindupProcessor_$$_javassist_2c930f17-2b37-462f-888e-e90f3fa5e869.java) at org.jboss.windup.bootstrap.
      commands.windup.RunWindupCommand.runWindup(RunWindupCommand.java:209) at org.jboss.windup.bootstrap.commands.windup.RunWindupCommand.execute(RunWindupCommand.java:53) at org.
      jboss.windup.bootstrap.Bootstrap.executePhase(Bootstrap.java:286) at org.jboss.windup.bootstrap.Bootstrap.run(Bootstrap.java:165) at org.jboss.windup.bootstrap.Bootstrap.main(
      Bootstrap.java:95)
      
      
      
      
      



      Have some one experienced this exception for JPA report?

      What is relevant to check in my environment to help investigate this issue? Is the some log output? Is there a debug mode in Windup execution?