我正在使用Spring Boot MVC Maven应用程序来绘制Matlab webfigures。我的matlab应用程序返回4个webfigure对象,我想在我的应用程序页面上显示它们。我使用javabuilder将matlab代码包装到Java类中。 但是我收到了错误:
无法初始化com.mathworks.mwswing.MJStartup
我能够在Spring XML中使应用程序工作,但是春季启动对我不起作用。不知道为什么。
我的消息来源:
UploadingController.java
package com.hellokoding.uploadingfiles;
import HRVAS_web_v3.HRVAS_web_v3;
import com.mathworks.toolbox.javabuilder.MWException;
import com.mathworks.toolbox.javabuilder.MWJavaObjectRef;
import com.mathworks.toolbox.javabuilder.webfigures.WebFigure;
import com.mathworks.toolbox.javabuilder.webfigures.WebFigureHtmlGenerator;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;
import java.io.File;
import java.io.IOException;
import javax.servlet.http.HttpServletRequest;
import org.slf4j.LoggerFactory;
@Controller
public class UploadingController {
public static final String uploadingdir = System.getProperty("user.dir") + "/uploadingdir/";
private final org.slf4j.Logger logger = LoggerFactory.getLogger(this.getClass());
@RequestMapping("/")
public String home(Model model) {
File file = new File(uploadingdir);
model.addAttribute("files", file.listFiles());
logger.debug("This is a debug message");
return "home.jsp";
}
@RequestMapping(value = "/", method = RequestMethod.POST)
public String uploadingPost(@RequestParam("uploadingFiles") MultipartFile[] uploadingFiles, Model model, HttpServletRequest request) throws IOException, MWException {
logger.debug("This is a debug 2 message");
for(MultipartFile uploadedFile : uploadingFiles) {
File file = new File(uploadingdir + uploadedFile.getOriginalFilename());
uploadedFile.transferTo(file);
}
HRVAS_web_v3 hrvas;
hrvas = new HRVAS_web_v3();
Object[] result = hrvas.HRVAS_Langer_v3(4);
MWJavaObjectRef ref;
ref = (MWJavaObjectRef)result[0];
WebFigure obrazek = (WebFigure)ref.get();
ref = (MWJavaObjectRef)result[1];
WebFigure obrazek1 = (WebFigure)ref.get();
ref = (MWJavaObjectRef)result[2];
WebFigure obrazek2 = (WebFigure)ref.get();
ref = (MWJavaObjectRef)result[3];
WebFigure obrazek3 = (WebFigure)ref.get();
WebFigureHtmlGenerator webFigures;
webFigures = new WebFigureHtmlGenerator(request);
String webFig = webFigures.getFigureEmbedString(obrazek,"obrazek", "session", "300", "300", "");
String webFig1 = webFigures.getFigureEmbedString(obrazek1,"obrazek1", "session", "300", "300", "");
String webFig2 = webFigures.getFigureEmbedString(obrazek2,"obrazek2", "session", "300", "300", "");
String webFig3 = webFigures.getFigureEmbedString(obrazek3,"obrazek3", "session", "300", "300", "");
model.addAttribute("webFig", webFig);
model.addAttribute("webFig1", webFig1);
model.addAttribute("webFig2", webFig2);
model.addAttribute("webFig3", webFig3);
model.addAttribute("msg", "hello world");
return "redirect:/";
}
}
Application.java
package com.hellokoding.uploadingfiles;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import java.io.File;
import java.io.IOException;
@SpringBootApplication
public class Application {
public static void main(String[] args) throws IOException {
new File(UploadingController.uploadingdir).mkdirs();
SpringApplication.run(Application.class, args);
}
}
针对home.jsp
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib prefix="wf" uri="http://www.mathworks.com/builderja/webfigures.tld" %>
<f:view>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>JSP Page</title>
</head>
<body>
ahoj
<h1><h:outputText value="Hello World!"/></h1>
<form name="uploadingForm" enctype="multipart/form-data" action="/" method="POST">
<p>
<input id="fileInput" type="file" name="uploadingFiles" multiple>
selected files: <span id="fileNum">0</span>;
total size: <span id="fileSize">0</span>
</p>
<p>
<input type="submit" value="Upload files">
</p>
</form>
<p>
${webFig}
</p>
</body>
</html>
webfigures.tld
<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
<taglib>
<tlibversion>1.0</tlibversion>
<jspversion>1.1</jspversion>
<shortname>WebFigures</shortname>
<info>MATLAB Builder for Java WebFigures Tag library</info>
<tag>
<name>web-figure</name>
<tagclass>com.mathworks.toolbox.javabuilder.webfigures.JspWebFigureTag</tagclass>
<!--Body content can have a value of
empty: no body
JSP: body that is evaluated by container, then possibly
processed by the tag
tagdependent: body is only processed by tag; JSP in body is not
evaluated.
-->
<bodycontent>JSP</bodycontent>
<info>Embeds a live figure frame in an HTML document.</info>
<attribute>
<name>root</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>width</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>height</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>style</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>name</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>scope</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
</taglib>
的pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>uploadingfiles-springboot-freemarker</artifactId>
<name>uploadingfiles-springboot-freemarker</name>
<description>uploadingfiles-springboot-freemarker</description>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.3.6.RELEASE</version>
</parent>
<properties>
<java.version>1.7</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-freemarker</artifactId>
</dependency>
<dependency>
<groupId>a</groupId>
<artifactId>a</artifactId>
<version>1</version>
</dependency>
<dependency>
<groupId>b</groupId>
<artifactId>b</artifactId>
<version>1</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
收到错误:
2017-03-15 15:24:55.653 INFO 25864 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8080 (http)
2017-03-15 15:24:55.669 INFO 25864 --- [ main] o.apache.catalina.core.StandardService : Starting service Tomcat
2017-03-15 15:24:55.670 INFO 25864 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet Engine: Apache Tomcat/8.0.36
2017-03-15 15:24:56.365 INFO 25864 --- [ost-startStop-1] org.apache.jasper.servlet.TldScanner : At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
2017-03-15 15:24:56.376 INFO 25864 --- [ost-startStop-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2017-03-15 15:24:56.377 INFO 25864 --- [ost-startStop-1] o.s.web.context.ContextLoader : Root WebApplicationContext: initialization completed in 3447 ms
2017-03-15 15:24:56.978 INFO 25864 --- [ost-startStop-1] o.s.b.c.e.ServletRegistrationBean : Mapping servlet: 'dispatcherServlet' to [/]
2017-03-15 15:24:56.986 INFO 25864 --- [ost-startStop-1] o.s.b.c.embedded.FilterRegistrationBean : Mapping filter: 'characterEncodingFilter' to: [/*]
2017-03-15 15:24:56.986 INFO 25864 --- [ost-startStop-1] o.s.b.c.embedded.FilterRegistrationBean : Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
2017-03-15 15:24:56.986 INFO 25864 --- [ost-startStop-1] o.s.b.c.embedded.FilterRegistrationBean : Mapping filter: 'httpPutFormContentFilter' to: [/*]
2017-03-15 15:24:56.987 INFO 25864 --- [ost-startStop-1] o.s.b.c.embedded.FilterRegistrationBean : Mapping filter: 'requestContextFilter' to: [/*]
2017-03-15 15:24:57.334 INFO 25864 --- [ main] s.w.s.m.m.a.RequestMappingHandlerAdapter : Looking for @ControllerAdvice: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@1b0b4509: startup date [Wed Mar 15 15:24:52 CET 2017]; root of context hierarchy
2017-03-15 15:24:57.464 INFO 25864 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/]}" onto public java.lang.String com.hellokoding.uploadingfiles.UploadingController.home(org.springframework.ui.Model)
2017-03-15 15:24:57.465 INFO 25864 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/],methods=[POST]}" onto public java.lang.String com.hellokoding.uploadingfiles.UploadingController.uploadingPost(org.springframework.web.multipart.MultipartFile[],org.springframework.ui.Model,javax.servlet.http.HttpServletRequest) throws java.io.IOException,com.mathworks.toolbox.javabuilder.MWException
2017-03-15 15:24:57.468 INFO 25864 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity<java.util.Map<java.lang.String, java.lang.Object>> org.springframework.boot.autoconfigure.web.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
2017-03-15 15:24:57.468 INFO 25864 --- [ main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
2017-03-15 15:24:57.558 INFO 25864 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/webjars/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-03-15 15:24:57.558 INFO 25864 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-03-15 15:24:57.632 INFO 25864 --- [ main] o.s.w.s.handler.SimpleUrlHandlerMapping : Mapped URL path [/**/favicon.ico] onto handler of type [class org.springframework.web.servlet.resource.ResourceHttpRequestHandler]
2017-03-15 15:24:58.032 INFO 25864 --- [ main] o.s.w.s.v.f.FreeMarkerConfigurer : ClassTemplateLoader for Spring macros added to FreeMarker configuration
2017-03-15 15:24:58.282 INFO 25864 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup
2017-03-15 15:24:58.455 INFO 25864 --- [ main] s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat started on port(s): 8080 (http)
2017-03-15 15:24:58.464 INFO 25864 --- [ main] c.h.uploadingfiles.Application : Started Application in 6.165 seconds (JVM running for 6.694)
2017-03-15 15:25:07.087 INFO 25864 --- [nio-8080-exec-1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring FrameworkServlet 'dispatcherServlet'
2017-03-15 15:25:07.087 INFO 25864 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : FrameworkServlet 'dispatcherServlet': initialization started
2017-03-15 15:25:07.110 INFO 25864 --- [nio-8080-exec-1] o.s.web.servlet.DispatcherServlet : FrameworkServlet 'dispatcherServlet': initialization completed in 22 ms
Unable to initialize com.mathworks.mwswing.MJStartup
java.awt.HeadlessException
at sun.java2d.HeadlessGraphicsEnvironment.getDefaultScreenDevice(HeadlessGraphicsEnvironment.java:77)
at com.mathworks.hg.peer.FigureAxisComponentProxy.chooseGraphicsConfigurationByVisual(FigureAxisComponentProxy.java:239)
at com.mathworks.hg.peer.FigureAxisComponentProxy.construct(FigureAxisComponentProxy.java:66)
at com.mathworks.hg.peer.FigureAxisComponentProxy.setVisual(FigureAxisComponentProxy.java:112)
at com.mathworks.hg.peer.FigureHG1Mediator.initializeClient(FigureHG1Mediator.java:51)
at com.mathworks.hg.peer.FigurePeer.doInitializePeer(FigurePeer.java:407)
at com.mathworks.hg.peer.FigurePeer$1.run(FigurePeer.java:353)
at com.mathworks.jmi.AWTUtilities$Invoker$5$1.run(AWTUtilities.java:562)
at com.mathworks.mvm.context.ThreadContext$1.call(ThreadContext.java:78)
at com.mathworks.mvm.context.ThreadContext.callWithContext(ThreadContext.java:107)
at com.mathworks.mvm.context.ThreadContext.runWithContext(ThreadContext.java:75)
at com.mathworks.mvm.context.MvmContext.runWithContext(MvmContext.java:93)
at com.mathworks.jmi.AWTUtilities$Invoker$5.runWithOutput(AWTUtilities.java:559)
at com.mathworks.jmi.AWTUtilities$Invoker$2.watchedRun(AWTUtilities.java:447)
at com.mathworks.jmi.AWTUtilities$WatchedRunnable.run(AWTUtilities.java:378)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:312)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:745)
at java.awt.EventQueue.access$300(EventQueue.java:103)
at java.awt.EventQueue$3.run(EventQueue.java:706)
at java.awt.EventQueue$3.run(EventQueue.java:704)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:715)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:91)
------------------------------------------------------------------------
Segmentation violation detected at Wed Mar 15 15:26:12 2017
------------------------------------------------------------------------
Configuration:
Crash Decoding : Disabled
Default Encoding: windows-1250
MATLAB Root : C:\Program Files\MATLAB\MATLAB Compiler Runtime\v80
MATLAB Version : 8.0.0.783 (R2012b)
Operating System: Microsoft Windows 7
Processor ID : x86 Family 6 Model 69 Stepping 1, GenuineIntel
Virtual Machine : Java 1.7.0_80-b15 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
Window System : Version 6.1 (Build 7601: Service Pack 1)
Fault Count: 1
Abnormal termination:
Segmentation violation
Register State (from fault):
RAX = 000000001a78ae90 RBX = 000000001703d700
RCX = 000000001a698390 RDX = 0000000000000000
RSP = 000000001798f8e8 RBP = 0000000000000001
RSI = 0000000018785280 RDI = 000000001a698390
R8 = 0000000000000001 R9 = 000000001545ff70
R10 = 00000000154f76f0 R11 = 00003b0307bc0004
R12 = 000000001a3fffe0 R13 = 0000000017990fd8
R14 = 0000000000000000 R15 = 000000001798fd18
RIP = 0000000000000000 EFL = 00010246
CS = 0033 FS = 0053 GS = 002b
Stack Trace (from fault):
[ 0] 0x0000000000000000 C:\Program Files\Java\jdk1.7.0_80\bin\java.exe+00000000 ???+8791431836623
[ 1] 0x0000000011907e73 C:\Program Files\MATLAB\MATLAB Compiler Runtime\v80\bin\win64\libmwgui.dll+00556659 ( wm_DestroyWindow+000163 )
[ 2] 0x00000000138d2381 C:\Program Files\MATLAB\MATLAB Compiler Runtime\v80\bin\win64\hg.dll+00598913 ( FigureHandleHGPeerQueue+014081 )
[ 3] 0x000000001388ceb5 C:\Program Files\MATLAB\MATLAB Compiler Runtime\v80\bin\win64\hg.dll+00315061 ( hgHitTest+003861 )
[ 4] 0x0000000013c51512 C:\Program Files\MATLAB\MATLAB Compiler Runtime\v80\bin\win64\hg.dll+04265234 ( gsDoMexGet+000450 )
[ 5] 0x0000000013c516ae C:\Program Files\MATLAB\MATLAB Compiler Runtime\v80\bin\win64\hg.dll+04265646 ( gsDoMexGet+000862 )
[ 6] 0x0000000013c562ab C:\Program Files\MATLAB\MATLAB Compiler Runtime\v80\bin\win64\hg.dll+04285099 ( HO_Delete+000027 )
[ 7] 0x0000000013c6da3a C:\Program Files\MATLAB\MATLAB Compiler Runtime\v80\bin\win64\hg.dll+04381242 ( hgConvertUDInterfaceToHandle+012010 )
[ 8] 0x0000000074d2cd13 C:\Program Files\MATLAB\MATLAB Compiler Runtime\v80\bin\win64\udd.dll+00183571 ( UDInterface::destroyInternals+000067 )
[ 9] 0x0000000074d2ce96 C:\Program Files\MATLAB\MATLAB Compiler Runtime\v80\bin\win64\udd.dll+00183958 ( UDInterface::destroyUnconditional+000230 )
[ 10] 0x0000000074d2cf5b C:\Program Files\MATLAB\MATLAB Compiler Runtime\v80\bin\win64\udd.dll+00184155 ( UDInterface::destroy+000123 )
[ 11] 0x0000000013c6a7b1 C:\Program Files\MATLAB\MATLAB Compiler Runtime\v80\bin\win64\hg.dll+04368305 ( setupHGUDInterface+003713 )
[ 12] 0x0000000013c9703c C:\Program Files\MATLAB\MATLAB Compiler Runtime\v80\bin\win64\hg.dll+04550716 ( gsPlotFcnSwitch+067372 )
[ 13] 0x000000005f904830 C:\WINDOWS\WinSxS\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_08e61857a83bc251\MSVCR90.dll+00477232 ( tanhf+031920 )
[ 14] 0x000000005f8d3b3c C:\WINDOWS\WinSxS\amd64_microsoft.vc90.crt_1fc8b3b9a1e18e3b_9.0.30729.6161_none_08e61857a83bc251\MSVCR90.dll+00277308 ( _is_exception_typeof+000464 )
[ 15] 0x0000000077b1b681 C:\WINDOWS\SYSTEM32\ntdll.dll+00308865 ( RtlRestoreContext+000738 )
[ 16] 0x000000001388d426 C:\Program Files\MATLAB\MATLAB Compiler Runtime\v80\bin\win64\hg.dll+00316454 ( hgHitTest+005254 )
[ 17] 0x000000001388d5a1 C:\Program Files\MATLAB\MATLAB Compiler Runtime\v80\bin\win64\hg.dll+00316833 ( hgFigure+000289 )
[ 18] 0x0000000073bc6aea C:\Program Files\MATLAB\MATLAB Compiler Runtime\v80\bin\win64\hgbuiltins.dll+00092906 ( MLTerminate_hgbuiltins+087626 )
[ 19] 0x0000000074e8d17f C:\Program Files\MATLAB\MATLAB Compiler Runtime\v80\bin\win64\m_dispatcher.dll+00053631 ( Mfunction_handle::dispatch+001023 )
[ 20] 0x0000000074e8cf82 C:\Program Files\MATLAB\MATLAB Compiler Runtime\v80\bin\win64\m_dispatcher.dll+00053122 ( Mfunction_handle::dispatch+000514 )
[ 21] 0x000007fee2b79482 C:\Program Files\MATLAB\MATLAB Compiler Runtime\v80\bin\win64\m_interpreter.dll+00496770 ( inFunctionHandleInterface::DestroyWorkspace+309314 )
[ 22] 0x000007fee2b75ca4 C:\Program Files\MATLAB\MATLAB Compiler Runtime\v80\bin\win64\m_interpreter.dll+00482468 ( inFunctionHandleInterface::DestroyWorkspace+295012 )
[ 23] 0x000007fee2b5de1f C:\Program Files\MATLAB\MATLAB Compiler Runtime\v80\bin\win64\m_interpreter.dll+00384543 ( inFunctionHandleInterface::DestroyWorkspace+197087 )
[ 24] 0x000007fee2b5dd80 C:\Program Files\MATLAB\MATLAB Compiler Runtime\v80\bin\win64\m_interpreter.dll+00384384 ( inFunctionHandleInterface::DestroyWorkspace+196928 )
[ 25] 0x000007fee2b8197d C:\Program Files\MATLAB\MATLAB Compiler Runtime\v80\bin\win64\m_interpreter.dll+00530813 ( inFunctionHandleInterface::DestroyWorkspace+343357 )
[ 26] 0x000007fee2b80271 C:\Program Files\MATLAB\MATLAB Compiler Runtime\v80\bin\win64\m_interpreter.dll+00524913 ( inFunctionHandleInterface::DestroyWorkspace+337457 )
[ 27] 0x000007fee2b620e9 C:\Program Files\MATLAB\MATLAB Compiler Runtime\v80\bin\win64\m_interpreter.dll+00401641 ( inFunctionHandleInterface::DestroyWorkspace+214185 )
[ 28] 0x0000000074e8c80d C:\Program Files\MATLAB\MATLAB Compiler Runtime\v80\bin\win64\m_dispatcher.dll+00051213 ( Mfh_file::dispatch_fh+000509 )
[ 29] 0x0000000074e8d0d6 C:\Program Files\MATLAB\MATLAB Compiler Runtime\v80\bin\win64\m_dispatcher.dll+00053462 ( Mfunction_handle::dispatch+000854 )
[ 30] 0x000007fee2b22cd8 C:\Program Files\MATLAB\MATLAB Compiler Runtime\v80\bin\win64\m_interpreter.dll+00142552 ( MathWorks::MException::MExceptionEnvelope::MExceptionEnvelope+003336 )
[ 31] 0x000007fee2bdbeb2 C:\Program Files\MATLAB\MATLAB Compiler Runtime\v80\bin\win64\m_interpreter.dll+00900786 ( inMexCallMATLAB+000738 )
[ 32] 0x000007fee2bdbb9e C:\Program Files\MATLAB\MATLAB Compiler Runtime\v80\bin\win64\m_interpreter.dll+00899998 ( IInterpreter::GetInterpreterBridge+148286 )
[ 33] 0x000007fee3061d61 C:\Program Files\MATLAB\MATLAB Compiler Runtime\v80\bin\win64\m_interpreter.dll+05643617 ( inCallFcnWithTrapInDesiredWS+000097 )
[ 34] 0x00000000750b33d2 C:\Program Files\MATLAB\MATLAB Compiler Runtime\v80\bin\win64\iqm.dll+00734162 ( iqm::BaseFEvalPlugin::inCallFcnWithTrap+000066 )
[ 35] 0x00000000750b4f2a C:\Program Files\MATLAB\MATLAB Compiler Runtime\v80\bin\win64\iqm.dll+00741162 ( iqm::BaseFEvalPlugin::execute+000314 )
[ 36] 0x0000000074996d22 C:\Program Files\MATLAB\MATLAB Compiler Runtime\v80\bin\win64\mcr.dll+00159010 ( mcr_init_std_output+020802 )
[ 37] 0x000000007507a00e C:\Program Files\MATLAB\MATLAB Compiler Runtime\v80\bin\win64\iqm.dll+00499726 ( iqm::IqmQE::qeInstance+027422 )
[ 38] 0x0000000075071ff6 C:\Program Files\MATLAB\MATLAB Compiler Runtime\v80\bin\win64\iqm.dll+00466934 ( iqm::BaseIqmPlugin::createEvent+042774 )
[ 39] 0x000000001451e0b6 C:\Program Files\MATLAB\MATLAB Compiler Runtime\v80\bin\win64\uiw.dll+00385206 ( UIW_IsUserMessage+000086 )
[ 40] 0x000000001451e7b9 C:\Program Files\MATLAB\MATLAB Compiler Runtime\v80\bin\win64\uiw.dll+00387001 ( UIW_SetGLIMUserMsg+000153 )
[ 41] 0x00000000779f87b2 C:\WINDOWS\system32\USER32.dll+00165810 ( GetMenuBarInfo+000626 )
[ 42] 0x00000000779df587 C:\WINDOWS\system32\USER32.dll+00062855 ( SystemParametersInfoW+000247 )
[ 43] 0x00000000779e4815 C:\WINDOWS\system32\USER32.dll+00083989 ( IsProcessDPIAware+000453 )
[ 44] 0x0000000077b1bc65 C:\WINDOWS\SYSTEM32\ntdll.dll+00310373 ( KiUserCallbackDispatcher+000031 )
[ 45] 0x00000000779e908a C:\WINDOWS\system32\USER32.dll+00102538 ( PeekMessageW+000182 )
[ 46] 0x00000000779e506e C:\WINDOWS\system32\USER32.dll+00086126 ( GetKeyState+000238 )
[ 47] 0x00000000779e3a07 C:\WINDOWS\system32\USER32.dll+00080391 ( PeekMessageA+000087 )
[ 48] 0x00000000144f8f4b C:\Program Files\MATLAB\MATLAB Compiler Runtime\v80\bin\win64\uiw.dll+00233291 ( UIW_SetCurrentDialog+000731 )
[ 49] 0x000000001451fbe2 C:\Program Files\MATLAB\MATLAB Compiler Runtime\v80\bin\win64\uiw.dll+00392162 ( ws_FreeSystemFont+000546 )
[ 50] 0x000000001314e6a3 C:\Program Files\MATLAB\MATLAB Compiler Runtime\v80\bin\win64\libmwservices.dll+00779939 ( sysq::removeCommitDatabaseUpdatesHook+002131 )
[ 51] 0x000000001314fe18 C:\Program Files\MATLAB\MATLAB Compiler Runtime\v80\bin\win64\libmwservices.dll+00785944 ( sysq::removeCommitDatabaseUpdatesHook+008136 )
[ 52] 0x0000000013151a20 C:\Program Files\MATLAB\MATLAB Compiler Runtime\v80\bin\win64\libmwservices.dll+00793120 ( sysq::addProcessPendingEventsUnitTestHook+000240 )
[ 53] 0x0000000013151ae8 C:\Program Files\MATLAB\MATLAB Compiler Runtime\v80\bin\win64\libmwservices.dll+00793320 ( sysq::addProcessPendingEventsUnitTestHook+000440 )
[ 54] 0x0000000013151ca3 C:\Program Files\MATLAB\MATLAB Compiler Runtime\v80\bin\win64\libmwservices.dll+00793763 ( sysq::addProcessPendingEventsUnitTestHook+000883 )
[ 55] 0x0000000013151d76 C:\Program Files\MATLAB\MATLAB Compiler Runtime\v80\bin\win64\libmwservices.dll+00793974 ( sysq::addProcessPendingEventsUnitTestHook+001094 )
[ 56] 0x000000007498837e C:\Program Files\MATLAB\MATLAB Compiler Runtime\v80\bin\win64\mcr.dll+00099198 ( mcr::setInterpreterThreadToCurrent+036894 )
[ 57] 0x0000000074988665 C:\Program Files\MATLAB\MATLAB Compiler Runtime\v80\bin\win64\mcr.dll+00099941 ( mcr::setInterpreterThreadToCurrent+037637 )
[ 58] 0x000000007497b166 C:\Program Files\MATLAB\MATLAB Compiler Runtime\v80\bin\win64\mcr.dll+00045414 ( DepfunRules::postWarning+003430 )
[ 59] 0x00000000778c59cd C:\WINDOWS\system32\kernel32.dll+00088525 ( BaseThreadInitThunk+000013 )
[ 60] 0x0000000077afa561 C:\WINDOWS\SYSTEM32\ntdll.dll+00173409 ( RtlUserThreadStart+000033 )
If this problem is reproducible, please submit a Service Request via:
http://www.mathworks.com/support/contact_us/
A technical support engineer might contact you with further information.
Thank you for your help.** This crash report has been saved to disk as C:\Users\640398\AppData\Local\Temp\matlab_crash_dump.25864-1 **
Caught "std::exception" Exception message is:
FatalException
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 1:36.913s
Finished at: Wed Mar 15 15:26:26 CET 2017
Final Memory: 9M/219M
------------------------------------------------------------------------
Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default-cli) on project uploadingfiles-springboot-freemarker: Command execution failed. Process exited with an error: -1073740771 (Exit value: -1073740771) -> [Help 1]
To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.
For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
答案 0 :(得分:0)
无法初始化com.mathworks.mwswing.MJStartup
Mathworks support team为此错误提供了解决方案
请注意,MATLAB官方仅支持单一版本 监控设置。
您可以尝试通过更改Java Virtual来解决此问题 MATLAB使用的机器。请参阅下面的相关解决方案 有关如何执行此操作的说明。
要检查MATLAB是否正在使用新的JVM,请使用以下命令启动MATLAB
-nodisplay
选项并在MATLAB命令中输入'version -java' 提示。如果MATLAB没有使用新的JVM,您可能需要从MATLAB的Java路径创建一个符号链接(例如,
/usr/local/matlab/sys/java/jre/glnxa64/jre1.6.0_13
)到新的JVM。 然后添加一个名为的文件/usr/local/matlab/sys/java/jre/glnxa64/jre.cfg
包含单个 行:1.6.0_13