Matlab Java Builder JA (Web figure demo) problem

12 views (last 30 days)
kaveh
kaveh on 2 May 2012
Answered: Enric on 9 Jul 2014
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 Comments
Daniel Armyr
Daniel Armyr on 18 Jun 2012
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 on 18 Jun 2012
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

Sign in to comment.

Answers (1)

Enric
Enric on 9 Jul 2014
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.

Categories

Find more on Java Package Integration in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!