How do I prevent Matlab java object generated with MATLAB Builder JA from failing with errors on the second time it is called in the same applciation scope.
Show older comments
Two different matlab programs compile with javabuilder and called from JAVA programs are failing on the second time they are called from the same applciation.
Any ideas on what could be happening?
- Matlab code is compiled with MCR 717 x64 using java 1.6.0_38.
- Java calling code is compiled with x64 using java 1.6.0_38.
- matlab java entry function/object is called from java object.
- Java object is called by java session bean.
- Session bean is called by java web service.
- Web service is running in Glassfish 3.1.2.2.
One error on restart: Error using matlabpool (line 134) Java exception occurred: java.lang.IllegalStateException: An application can only use one MCR component that uses Parallel Computing Toolbox functionality. at com.mathworks.toolbox.distcomp.util.MatlabRefStore.initMatlabRef(MatlabRefStore.java:27)
The other error on restart: SEVERE: Undefined function 'javaaddpath' for input arguments of type 'cell'. com.mathworks.toolbox.javabuilder.MWException: An error occurred while initializing the component. Undefined function 'javaaddpath' for input arguments of type 'cell'. at com.mathworks.toolbox.javabuilder.internal.MWMCR.mclInitializeComponentInstance(Native Method) at com.mathworks.toolbox.javabuilder.internal.MWMCR.access$700(MWMCR.java:23) at com.mathworks.toolbox.javabuilder.internal.MWMCR$6.mclInitializeComponentInstance(MWMCR.java:837)
3 Comments
Chrysanthie
on 16 Jul 2013
Edited: Chrysanthie
on 16 Jul 2013
Chrysanthie
on 16 Jul 2013
eduardo
on 27 Sep 2023
what if i need to create the object more than once?? say in a for loop?
Answers (0)
Categories
Find more on Deploy to Java Applications Using MWArray Data API in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!