0

InterpreterNotFoundException: java not found

asked 2022-10-12 17:25:09 +0800

rmedina gravatar image rmedina
0

I have getting this message everytime I try to run my application: org.zkoss.zk.scripting.InterpreterNotFoundException: java no encontrada. at org.zkoss.zk.scripting.Interpreters.newInterpreter(Interpreters.java:71) at org.zkoss.zk.ui.impl.PageImpl.getInterpreter(PageImpl.java:886) at org.zkoss.zk.ui.impl.PageImpl.interpret(PageImpl.java:875) at org.zkoss.zk.ui.impl.UiEngineImpl.execNonComponent(UiEngineImpl.java:958) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:744) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate(UiEngineImpl.java:654) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild0(UiEngineImpl.java:827) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:781) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:690) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreateChild(UiEngineImpl.java:752) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate0(UiEngineImpl.java:712) at org.zkoss.zk.ui.impl.UiEngineImpl.execCreate(UiEngineImpl.java:654) at org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage0(UiEngineImpl.java:397) at org.zkoss.zk.ui.impl.UiEngineImpl.execNewPage(UiEngineImpl.java:312) at org.zkoss.zk.ui.http.DHtmlLayoutServlet.process(DHtmlLayoutServlet.java:215) at org.zkoss.zk.ui.http.DHtmlLayoutServlet.doGet(DHtmlLayoutServlet.java:136) at javax.servlet.http.HttpServlet.service(HttpServlet.java:655) at javax.servlet.http.HttpServlet.service(HttpServlet.java:764) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:227) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:197) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:541) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:135) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:92) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:687) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:78) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:360) at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399) at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65) at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:890) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1787) at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49) at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1191) at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.base/java.lang.Thread.run(Thread.java:833)

I`m using zk and Hibernate with maven. In my pom I have: <zk.version>6.5.4</zk.version> <czk.version>3.6.0.0</czk.version>

    <dependency>
        <groupId>org.zkoss.zk</groupId>
        <artifactId>zkbind</artifactId>
        <version>${zk.version}</version>
    </dependency>
    <dependency>
        <groupId>org.zkoss.zk</groupId>
        <artifactId>zul</artifactId>
        <version>${zk.version}</version>
    </dependency>
    <dependency>
        <groupId>org.zkoss.zk</groupId>
        <artifactId>zkplus</artifactId>
        <version>${zk.version}</version>
    </dependency>
    <dependency>
        <groupId>org.zkoss.zk</groupId>
        <artifactId>zhtml</artifactId>
        <version>${zk.version}</version>
    </dependency>
    <dependency>
        <groupId>org.zkoss.zkforge</groupId>
        <artifactId>ckez</artifactId>
        <version>${czk.version}</version>
    </dependency>

The initial proccess of my application is runned well, Hibernate session is opened,some tables are read and the initial data, loaded. Then, when the application must render the first panel, that error occurs. What i'm doing badly?

delete flag offensive retag edit

3 Answers

Sort by » oldest newest most voted
0

answered 2022-10-13 09:47:55 +0800

MDuchemin gravatar image MDuchemin
2298 1 5
ZK Team

updated 2022-10-13 09:48:28 +0800

Hey there

The interpreters are responsible for executing code located in zscript elements in your zul files.

By default, ZK will load the "Beanshell" java interpreter transitively from the zcommon depdencency, and use that library to execute code located in zscript

Most likely explanation are that you don't have the bsh (beanshell) library currently loaded, or that you modified the default ZK java interpreter, and don't have the new target interpreter loaded.

see here and here for more info.

link publish delete flag offensive edit
0

answered 2022-10-15 01:44:32 +0800

rmedina gravatar image rmedina
0

Thank you very much for your reply! My zk.xml was writed by zk studio. Their contents is just:

<zk> <device-config> <device-type>ajax</device-type> <device-class>org.zkoss.zk.device.AjaxDevice</device-class> <server-push-class>org.zkoss.zk.ui.impl.PollingServerPush</server-push-class> <timeout-uri>/SesionCaducada.zul</timeout-uri> </device-config> <system-config> <disable-event-thread>false</disable-event-thread> </system-config>

</zk> The Java interpreter is not changed (I hope). And I have added i the pom.xml reference to the commons package: <dependency> <groupid>org.zkoss.common</groupid> <artifactid>zcommon</artifactid> <version>${zk.version}</version> </dependency>

Anyway, the error still occurs.

link publish delete flag offensive edit
0

answered 2022-10-17 11:14:39 +0800

MDuchemin gravatar image MDuchemin
2298 1 5
ZK Team

Hey there!

Since you are using maven, please run the mvn dependency:tree command on your project. This will display the resulting dependency tree after resolving transitive dependencies.

You should see the beanshell dependency in the tree such as:

[INFO] +- org.zkoss.zk:zkplus:jar:9.0.0-Eval:compile
[INFO] |  \- org.zkoss.zk:zul:jar:9.0.0-Eval:compile
[INFO] |     \- org.zkoss.zk:zk:jar:9.0.0-Eval:compile
[INFO] |        +- org.zkoss.common:zweb:jar:9.0.0-Eval:compile
[INFO] |        |  \- org.zkoss.common:zcommon:jar:9.0.0-Eval:compile
[INFO] |        |     +- commons-fileupload:commons-fileupload:jar:1.3.3:compile
[INFO] |        |     +- org.zkoss.common:zel:jar:9.0.0-Eval:compile
[INFO] |        |     +- org.apache-extras.beanshell:bsh:jar:2.0b6:compile <<<<-------- THAT ONE

In my sample here, the beanshell is loaded transitively from zcommon. You may have another version of the bsh dependency loaded transitively by another parent, which could cause issues, or have transitive dependencies excluded for that one.

If you are seeing the bsh dependency loaded properly, and you still get that error message, then you may need to check for instances of zscript elements in your project. if some have a page language tag or scrip language attribute, they could be trying to load a different interpreter https://www.zkoss.org/wiki/ZKDeveloper%27sGuide/AdvancedZK/Zscriptotherthanjava/HowtoSelectaDifferentScriptingLanguage

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
2 followers

RSS

Stats

Asked: 2022-10-12 17:25:09 +0800

Seen: 6 times

Last updated: Oct 17

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More