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)