Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Problems with Java based Matlab web server
Replies: 1   Last Post: Aug 4, 2013 1:35 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Jeramie

Posts: 1
Registered: 4/30/10
Problems with Java based Matlab web server
Posted: Apr 30, 2010 6:38 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hello Everyone!

So we are trying to run Matlab applications on a webserver. We've installed
Matlab (R2010a) & Matlab Java Builder (Version 2.1) on a server (Linux
ubuntu). Apache2 (2.2.12) and tomcat6 are installed. We are currently able to run Matlab scripts via SSH remotely but we cannot get the java interface working.

We tried to compile several Matlab apps with Java Builder (that worked) and run them as webapps on the webserver (that didn't work).

There are different errors with different apps.

1) For WebFigureExample from the Mathworks Central it is:

java.lang.ClassNotFoundException:
com.mathworks.toolbox.javabuilder.MWComponentInstance
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1399)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1245)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:332)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:632)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1862)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:902)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1366)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1245)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:332)
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2308)
at java.lang.Class.getDeclaredFields(Class.java:1760)
at org.apache.catalina.util.DefaultAnnotationProcessor$2.run(DefaultAnnotationProcessor.java:164)
at org.apache.catalina.util.DefaultAnnotationProcessor$2.run(DefaultAnnotationProcessor.java:162)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.util.DefaultAnnotationProcessor.processAnnotations(DefaultAnnotationProcessor.java:161)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1120)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:809)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:129)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
at java.lang.Thread.run(Thread.java:636)



and it's right, there is no MWComponentInstance.class in
com.mathworks.toolbox.javabuilder, it is in
com.mathworks.toolbox.javabuilder.internal. How to fix it?




2) For another example application (WebFigureQuickStart) it is:

SEVERE: Servlet.service() for servlet jsp threw exception
javax.servlet.jsp.JspTagException: An Unknown issue occurred while
trying to generate the DefaultFigure.
at com.mathworks.toolbox.javabuilder.webfigures.jsp.JspWebFigureTagHandler.writeHtml(JspWebFigureTagHandler.java:141)
at com.mathworks.toolbox.javabuilder.webfigures.jsp.JspWebFigureTagHandler.doStartTag(JspWebFigureTagHandler.java:146)
at org.apache.jsp.WebFigureExample_jsp._jspx_meth_wf_005fweb_002dfigure_005f0(WebFigureExample_jsp.java:138)
at org.apache.jsp.WebFigureExample_jsp._jspService(WebFigureExample_jsp.java:73)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:4



3)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:269)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAsPrivileged(Subject.java:537)
at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:301)
at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:162)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:283)
at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:56)
at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:189)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:185)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
at java.lang.Thread.run(Thread.java:636)



This could hardly be permissions, because I added

grant {
permission java.security.AllPermission;
};

to /etc/tomcat6/policy.d/50local.policy (tomcat was restarted afterwards)





Any help or examples working with Matlab R2010a are appreciated!



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.