tag invocation problem with version 0.8.4.5
tunggad opened this issue · comments
myTemplate2.html resides in the same folder as admin.html
`args String arg1, Integer arg2
This is a String = '${arg1}' and this is an Integer = ~arg2
And admin.html is:
{extends "adminLayout.html" /}
{set title:"playSHOP Dashboard" /}
`set leftCol
`
`set rightCol
`
Error:
Compilation error (In /app/japidviews/Application/admin.java around line 90)
The file /app/japidviews/Application/admin.java could not be compiled. Error raised is : _myTemplate24 cannot be resolved
play.exceptions.CompilationException: _myTemplate24 cannot be resolved
at play.classloading.ApplicationCompiler$2.acceptResult(ApplicationCompiler.java:246)
at org.eclipse.jdt.internal.compiler.Compiler.handleInternalException(Compiler.java:672)
at org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:516)
at play.classloading.ApplicationCompiler.compile(ApplicationCompiler.java:280)
at play.classloading.ApplicationClassloader.getAllClasses(ApplicationClassloader.java:408)
at play.Play.start(Play.java:456)
at play.Play.detectChanges(Play.java:563)
at play.Invoker$Invocation.init(Invoker.java:187)
at Invocation.HTTP Request(Play!)
also tried to put the myTemplate2.html in _tag folder or to invoke using full path name ---> same error
O I see the problem. Please use 0.8.4.3 in the interim while I'm fixing this.
oops, that version has been pulled off the repo. Please inline the tag in the set tag as a work around.
please take a look at version 0.8.4.7 and see if it fixes it.
Hi Bing,
i have done following steps:
- upgrade to 0.8.4.7
- play clean + play japid:regen
- play run and hit /Application/admin
code of controllers.Application.java:
public class Application extends JapidController {
public static void index() {
render();
}
public static void admin() {
renderJapid();
}
}
--> error (first hit)
java.lang.ExceptionInInitializerError
at cn.bran.japid.template.JapidTemplateBaseWithoutPlay.escape(JapidTemplateBaseWithoutPlay.java:177)
at japidviews._tags.myTag.doLayout(myTag.java:67)
at cn.bran.japid.template.JapidTemplateBaseWithoutPlay.layout(JapidTemplateBaseWithoutPlay.java:114)
at japidviews._tags.myTag.render(myTag.java:57)
at japidviews.Application.admin.rightCol(admin.java:86)
at japidviews._layouts.adminLayout.layout(adminLayout.java:101)
at japidviews.Application.admin.render(admin.java:53)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at cn.bran.japid.util.RenderInvokerUtils.render(RenderInvokerUtils.java:30)
at cn.bran.play.JapidController.invokeRender(JapidController.java:78)
at cn.bran.play.JapidController.getRenderResultWith(JapidController.java:251)
at cn.bran.play.JapidController.renderJapidWith(JapidController.java:129)
at cn.bran.play.JapidController.renderJapid(JapidController.java:120)
at controllers.Application.admin(Application.java:19)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at play.mvc.ActionInvoker.invokeWithContinuation(ActionInvoker.java:540)
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:498)
at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:474)
at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:469)
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:157)
at play.server.PlayHandler$NettyInvocation.execute(PlayHandler.java:237)
at play.Invoker$Invocation.run(Invoker.java:265)
at play.server.PlayHandler$NettyInvocation.run(PlayHandler.java:217)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.IllegalStateException: Cannot find reference definition file [htmlentities.properties] as class path resource
at cn.bran.japid.util.HTMLUtils$HtmlCharacterEntityReferences.(HTMLUtils.java:91)
at cn.bran.japid.util.HTMLUtils.(HTMLUtils.java:40)
at cn.bran.japid.template.JapidTemplateBaseWithoutPlay.escape(JapidTemplateBaseWithoutPlay.java:177)
at japidviews._tags.myTag.doLayout(myTag.java:67)
at cn.bran.japid.template.JapidTemplateBaseWithoutPlay.layout(JapidTemplateBaseWithoutPlay.java:115)
at japidviews._tags.myTag.render(myTag.java:58)
at japidviews.Application.admin.rightCol(admin.java:86)
at japidviews._layouts.adminLayout.layout(adminLayout.java:101)
at japidviews.Application.admin.render(admin.java:54)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at cn.bran.japid.util.RenderInvokerUtils.render(RenderInvokerUtils.java:30)
at cn.bran.play.JapidController.invokeRender(JapidController.java:78)
at cn.bran.play.JapidController.getRenderResultWith(JapidController.java:251)
at cn.bran.play.JapidController.renderJapidWith(JapidController.java:129)
at cn.bran.play.JapidController.renderJapid(JapidController.java:121)
at controllers.Application.admin(Application.java:19)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at play.mvc.ActionInvoker.invokeWithContinuation(ActionInvoker.java:540)
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:498)
at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:474)
at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:469)
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:157)
at play.server.PlayHandler$NettyInvocation.execute(PlayHandler.java:238)
at play.Invoker$Invocation.run(Invoker.java:265)
at play.server.PlayHandler$NettyInvocation.run(PlayHandler.java:217)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:139)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:909)
... 1 more
11:54:43,167 ERROR ~
@66m0kji7a
Internal Server Error (500) for request GET /Application/admin
Execution exception (In /app/controllers/Application.java around line 19)
RuntimeException occured : error in running the renderer: null
play.exceptions.JavaExecutionException: error in running the renderer: null
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:227)
at Invocation.HTTP Request(Play!)
Caused by: java.lang.RuntimeException: error in running the renderer: null
at cn.bran.japid.util.RenderInvokerUtils.render(RenderInvokerUtils.java:39)
at cn.bran.play.JapidController.invokeRender(JapidController.java:78)
at cn.bran.play.JapidController.getRenderResultWith(JapidController.java:251)
at cn.bran.play.JapidController.renderJapidWith(JapidController.java:129)
at cn.bran.play.JapidController.renderJapid(JapidController.java:121)
at controllers.Application.admin(Application.java:19)
at play.mvc.ActionInvoker.invokeWithContinuation(ActionInvoker.java:540)
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:498)
at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:474)
at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:469)
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:157)
... 1 more
trying to hit /Application/admin againg then --> other error:
java.lang.NoClassDefFoundError: cn/bran/japid/util/HTMLUtils
at cn.bran.japid.template.JapidTemplateBaseWithoutPlay.escape(JapidTemplateBaseWithoutPlay.java:177)
at japidviews.Application.myTemplate2.doLayout(myTemplate2.java:67)
at cn.bran.japid.template.JapidTemplateBaseWithoutPlay.layout(JapidTemplateBaseWithoutPlay.java:114)
at japidviews.Application.myTemplate2.render(myTemplate2.java:57)
at japidviews.Application.admin.rightCol(admin.java:86)
at japidviews._layouts.adminLayout.layout(adminLayout.java:101)
at japidviews.Application.admin.render(admin.java:53)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at cn.bran.japid.util.RenderInvokerUtils.render(RenderInvokerUtils.java:30)
at cn.bran.play.JapidController.invokeRender(JapidController.java:78)
at cn.bran.play.JapidController.getRenderResultWith(JapidController.java:251)
at cn.bran.play.JapidController.renderJapidWith(JapidController.java:129)
at cn.bran.play.JapidController.renderJapid(JapidController.java:120)
at controllers.Application.admin(Application.java:19)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at play.mvc.ActionInvoker.invokeWithContinuation(ActionInvoker.java:540)
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:498)
at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:474)
at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:469)
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:157)
at play.server.PlayHandler$NettyInvocation.execute(PlayHandler.java:237)
at play.Invoker$Invocation.run(Invoker.java:265)
at play.server.PlayHandler$NettyInvocation.run(PlayHandler.java:217)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
11:55:45,479 ERROR ~
@66m0kji7b
Internal Server Error (500) for request GET /Application/admin
Execution exception (In /app/controllers/Application.java around line 19)
RuntimeException occured : error in running the renderer: cn/bran/japid/util/HTMLUtils
play.exceptions.JavaExecutionException: error in running the renderer: cn/bran/japid/util/HTMLUtils
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:227)
at Invocation.HTTP Request(Play!)
Caused by: java.lang.RuntimeException: error in running the renderer: cn/bran/japid/util/HTMLUtils
at cn.bran.japid.util.RenderInvokerUtils.render(RenderInvokerUtils.java:39)
at cn.bran.play.JapidController.invokeRender(JapidController.java:78)
at cn.bran.play.JapidController.getRenderResultWith(JapidController.java:251)
at cn.bran.play.JapidController.renderJapidWith(JapidController.java:129)
at cn.bran.play.JapidController.renderJapid(JapidController.java:121)
at controllers.Application.admin(Application.java:19)
at play.mvc.ActionInvoker.invokeWithContinuation(ActionInvoker.java:540)
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:498)
at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:474)
at play.mvc.ActionInvoker.invokeControllerMethod(ActionInvoker.java:469)
at play.mvc.ActionInvoker.invoke(ActionInvoker.java:157)
... 1 more
Please check out version 0.8.4.8 for the fix. Thanks again for reporting.
version 0.8.4.8 worked fine!