In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Can not execute the local call Matlab function JAR package, easy to occur problems
A check your environment variable Path:
% JAVA_HOME%\ bin;%JAVA_HOME%\ jre\ bin
F:\ Program Files\ MATLAB\ MATLAB Compiler Runtime\ v717\ runtime\ win32
F:\ ProgramFiles\ MATLAB\ R2012a\ runtime\ win32;F:\ ProgramFiles\ MATLAB\ R2012a\ bin
These are two programs that need to be configured with environment variables.
Both b Matlab and MCR need to be installed, but only one is not enough, because you need to write functions to generate JAR, and only JAR requires a runtime environment.
=
Analysis and solution to the problem of Web calling Matlab:
There are many problems in deploying web and calling matlab. The author encounters many problems because some error messages are not saved. It is impossible to describe all the errors here, but all the configuration information will be added.
1 、 Unsupported major.minorversion 51.0
JDK problem, in the windows test environment, the author's Eclipse project environment is 1.6, and the computer system JDK is also 1.6. But an error was generated at run time.
Resolve:
Understand that the error refers to the low version of the JVM virtual machine can not load a high version of the class file, 51.0 version number refers to JDK1.7, the author's project environment and machine JDK are 1.6. why this problem, after troubleshooting only tomcat problem, Eclipse found the use of Eclipse configuration tomcat content, found that the tomcat reference for 1.7 jdk, replaced, the error disappeared. Therefore, please pay attention to each link and try to maintain a consistent environment.
2 、 TheApache Tomcat Native library which allows optimal performance in productionenvironments was not found on the java.library.path
Tomcat required support issues, here needs a support file tcnative-1.dll, please go to http://tomcat.heanet.ie/native/, download a newer version, the file is in binaries/win32 (or win64), and then put it in your% JAVA_HOME%/bin folder. After placement, repackage the deployment tomcat and start it.
3 、 An incompatible version 1.1.14 of the APR based Apache Tomcat Native library is installed, while Tomcat requires version 1.1.30
This is followed by question 2, and after putting it into the file, the error is prompted because of the version problem. Here, because the downloaded tcnative-1.dll is inconsistent with the required version, it needs to be corrected. We put the downloaded version into% JAVA_HOME%/bin and one into% CATALINA_HOME%/bin. If there is an old version, directly overwrite or mainly with the old version, replace the file in the previous two directories, and we can only keep it consistent.
4 、 org.apache.jasper.JasperException:javax.servlet.ServletException: java.lang.UnsatisfiedLinkError: Failed to findthe library libmwmclmcrrt.so.7.17, required by MATLAB Builder JA, onjava.library.path.
This library is typically installed alongwith MATLAB or the MCR, its absence may indicate an issue with thatinstallation or the current path configuration.
The MCR version that this component is tryingto use is: 7.17.
According to the following hint, it probably means that there is something wrong with my matlab or MCR configuration. Then we should focus on the configuration of the environment, the author encountered this problem on both windows and linux, and attached two solutions.
Windows:
Find the environment variable Path and make sure that JDK, MCR and Matlab are configured in the order of JDK, MCR and Matlab, for example:% JAVA_HOME%\ bin;%JAVA_HOME%\ jre\ bin
F:\ Program Files\ MATLAB\ MATLAB CompilerRuntime\ v714\ runtime\ win32
F:\ ProgramFiles\ MATLAB\ R2012a\ runtime\ win32;F:\ ProgramFiles\ MATLAB\ R2012a\ bin
Linux:
Please find etc/profile, edit the file, and join the Path configuration.
For example, the MCR path is: MCR_HOME=/sur/local/MATLAB/MATLAB Compiler Runtime
ExportPATH=$PATH:$MCR_HOME/v717/runtime/glnx86
At the same time, check the LD_LIBRARY_PATH and XAPPLRESDIR that you set up when you installed MCR.
Export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$MCR_HOME/v717/runtime/glnx86:$MCR_HOME/v717/sys/os/glnx86:$MCR_HOME/v717/sys/java/jre/glnx86/jre/lib/i386/native_threads:$MCR_HOME/v717/sys/java/jre/glnx86/jre/lib/i386/server:$MCR_HOME/v717/sys/java/jre/glnx86/jre/lib/i386
ExportXAPPLRESDIR=$MCR_HOME/v717/X11/app-defaults
The content of the configuration varies according to the number of bits of each person's system, and the floating red part may change, please check it out.
5. Exception in thread "main" java.lang.UnsatisfiedLinkError:Failed to find the library mclmcrrt7_17.dll, required by MATLAB Builder JA, onjava.library.path.
Thislibrary is typically installed along with MATLAB or the MCR, its absence mayindicate an issue with that installation or the current path configuration.
The MCR version that this component is tryingto use is: 7.17.
This problem is similar to that in 4, but note that it is caused by not finding the library file mclmcrrt7_17.dll, which is found in both Matlab and MCR, and in the file home directory runtim/win32 (win64), the file of MCR is preferred. Copy it to c:/windows/system32, and if it is a 64-bit system, copy it to C:\ Windows\ SysWOW64
6. All the major environmental problems can be solved above, and other problems, such as
Javax.servlet.ServletException:java.lang.NoClassDefoundError: Could not initialize class
Com.mathworks.toolbox... ..
For those who cannot find objects, please pay attention to introduce the objects that cannot be found by these prompts into the JSP page to facilitate your own call. Of course, if you have time to use the framework, you can avoid this kind of problem and get the return value directly through the framework.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.