0
votes

I've developed a RESTful webservices using java 7 and spring boot 1.5.9. Have added weblogic.xml and dispatcherServlet.xml files in webcontent folder. I've generated a WAR and tried to deploy it into our weblogic server 10.3.6, while doing that i'm getting this error on weblogic console: 1. Unable to access the selected appliation 2. Exception in Appmerge flows' progression 3. Exception in Appmerge flows' progression 4. Unmarshaller failed

In logs "

My 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});
    }
}

Could anyone please tell me how to resolve this?

1
In Logs "<Error> <J2EE> <BEA-160197> <Unable to load descriptor C:\Users\Bmaharana\Desktop\webservices\SlotBookingAvailability.war/WEB-INF/web.xml of module SlotBookingAvailability.war. The error is weblogic.descriptor.DescriptorException: Unmarshaller failed"Charan
please move your error stack trace from comment section to question.want2learn

1 Answers

0
votes

I think your weblogic.xml is not correct. Try this and this should fix your problem

<?xml version="1.0" encoding="UTF-8"?>
<weblogic-web-app xmlns="http://www.bea.com/ns/weblogic/weblogic-web-app"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.bea.com/ns/weblogic/weblogic-web-app 
                    http://www.bea.com/ns/weblogic/weblogic-web-app/1.0/weblogic-web-app.xsd">