Matlab Java Builder JA (Web figure demo) problem

3 visualizaciones (últimos 30 días)
kaveh
kaveh el 2 de Mayo de 2012
Respondida: Enric el 9 de Jul. de 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 comentarios
Daniel Armyr
Daniel Armyr el 18 de Jun. de 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 el 18 de Jun. de 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

Iniciar sesión para comentar.

Respuestas (1)

Enric
Enric el 9 de Jul. de 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.

Categorías

Más información sobre Java Package Integration en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by