【发布时间】:2018-11-05 14:06:01
【问题描述】:
我使用 java 7 和 spring boot 1.5.9 开发了一个 RESTful web 服务。在 webcontent 文件夹中添加了 weblogic.xml 和 dispatcherServlet.xml 文件。 我已经生成了一个 WAR 并尝试将其部署到我们的 weblogic 服务器 10.3.6 中,同时我在 weblogic 控制台上收到此错误: 1.无法访问选定的应用程序 2. Appmerge 流程进度异常 3. Appmerge 流程进度异常 4. Unmarshaller 失败
在日志中“
我的 webLogic.xml
<?xml version="1.0" encoding="UTF-8"?>
<wls:weblogic-web-app
xmlns:wls="http://xmlns.oracle.com/weblogic/weblogic-web-app"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.oracle.com/weblogic/weblogic-web-app
http://xmlns.oracle.com/weblogic/weblogic-web-app/1.4/weblogic-web-app.xsd">
<wls:context-root>/myweb</wls:context-root>
<wls:container-descriptor>
<wls:prefer-application-packages>
<wls:package-name>org.springframework.*</wls:package-name>
<wls:package-name>org.springframework.util.MultiValueMap.*</wls:package-name>
<wls:package-name>org.slf4j.*</wls:package-name>
<wls:package-name>com.fasterxml.jackson.databind.*</wls:package-name>
<wls:package-name>com.fasterxml.jackson.*</wls:package-name>
<wls:package-name>com.fasterxml.jackson.datatype.jsr310.*</wls:package-name>
</wls:prefer-application-packages>
</wls:container-descriptor>
</wls:weblogic-web-app>
dispatcherServlet.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
</beans>
web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" version="3.1">
<display-name>SlotBookingAvailability</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
</web-app>
ServletInitializer.java
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.support.SpringBootServletInitializer;
public class ServletInitializer extends SpringBootServletInitializer {
protected SpringApplicationBuilder configure(
SpringApplicationBuilder application) {
return application.sources(new Class[]{SlotBookingAvailabilityApplication.class});
}
}
谁能告诉我如何解决这个问题?
【问题讨论】:
-
在日志中 "
-
请将您的错误堆栈跟踪从评论部分移至问题。
标签: java spring-boot war web.xml weblogic-10.x