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.
显示 更早的评论
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 个评论
Chrysanthie
2013-7-16
编辑:Chrysanthie
2013-7-16
Chrysanthie
2013-7-16
eduardo
2023-9-27
what if i need to create the object more than once?? say in a for loop?
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Deploy to Java Applications Using MWArray Data API 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!