Matlab Java Builder JA (Web figure demo) problem

조회 수: 6 (최근 30일)
kaveh
kaveh 2012년 5월 2일
답변: Enric 2014년 7월 9일
Hi
I am trying to implement java_web_figures_demo example.I am following the instructions available at
I am using Java version 1.6,64 bit and Matlab R2011b,64 bit and Netbeans 7.1.1 and Apache Tomcat 7.0.22.0 .I copied and pasted all the codes and every thing looks the same as instructions,but I get these errors.
HTTP Status 500- type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Servlet.init() for servlet ModelRunnerServlet threw exception org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100) org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405) org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:964) org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515) org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:304) java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) java.lang.Thread.run(Thread.java:722)
root cause
java.lang.NoClassDefFoundError: Could not initialize class com.mathworks.toolbox.javabuilder.internal.MWMCR getplotPackage.GetplotPackageMCRFactory.newInstance(GetplotPackageMCRFactory.java:51) getplotPackage.GetplotPackageMCRFactory.newInstance(GetplotPackageMCRFactory.java:62) getplotPackage.getplotClass.<init>(getplotClass.java:65) ModelRunnerServlet.init(ModelRunnerServlet.java:29) org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100) org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405) org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:964) org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515) org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:304) java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) java.lang.Thread.run(Thread.java:722)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.22 logs.
Can you please let me know what should I do. Thanks in advance
  댓글 수: 2
Daniel Armyr
Daniel Armyr 2012년 6월 18일
It seems that your web server cannot find some MCR classes. Verify that you have placed the javabuilder.jar file somewhere where the webserver can find it.
Friedrich
Friedrich 2012년 6월 18일
In addition, make sure the MCR is installed and check the logs for an output stating something like
"Unable to initialize com.mathworks.webintegration.vrd.LicenseActionsFactory Error using internal.matlab.Message/getString Unable to load a message catalog 'Compiler:renderwebfigure'. Please check the file location and format. Error in renderwebfigure>cropFigureAndReturnCData (line 64) Error in renderwebfigure (line 31)"
If you find those, see this BugReport and patch:
http://www.mathworks.com/support/bugreports/756962

댓글을 달려면 로그인하십시오.

답변 (1개)

Enric
Enric 2014년 7월 9일
Looks like you forgot to add the necessary environment variables (see documentation), or forgot to add the javabuilder.jar and your own .jar to the deployment assembly.

카테고리

Help CenterFile Exchange에서 Java Package Integration에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by