0
votes

Created Spring boot applciation and need to deploy in weblogic 11g. While deploying, getting some error Error String index out of range: 29232.

Code implements attached below,

@SpringBootApplication

@EnableScheduling public class SupportServiceApplication extends SpringBootServletInitializer implements WebApplicationInitializer {

@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder app) {
    return app.sources(SupportServiceApplication.class);
}

public static void main(String[] args) {
    SpringApplication.run(SupportServiceApplication.class, args);
}

}

**Pom.xml : **

<?xml version="1.0" encoding="UTF-8"?>

https://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 org.springframework.boot spring-boot-starter-parent 2.2.0.RELEASE de.basf.ap.agrilog support-service 1.0.0 support-service war Agrilog support service for self-healing Agrilog issues

<properties>
    <java.version>1.8</java.version>
</properties>

<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-cache</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-jdbc</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-jpa</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-quartz</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>

    <dependency>
        <groupId>com.oracle.ojdbc</groupId>
        <artifactId>ojdbc8</artifactId>
        <scope>runtime</scope>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
        <exclusions>
            <exclusion>
                <groupId>org.junit.vintage</groupId>
                <artifactId>junit-vintage-engine</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok</artifactId>
        <version>1.18.10</version>
    </dependency>
</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-war-plugin</artifactId>
            <configuration>
                <failOnMissingWebXml>false</failOnMissingWebXml>
                <archive>
                    <manifest>
                        <addDefaultImplementationEntries>false</addDefaultImplementationEntries>
                    </manifest>
                </archive>
            </configuration>
        </plugin>
    </plugins>
</build>

Added the weblogic.xml and dispatcherServlet-servlet.xml under WEB-INF folder

weblogic.xml :

<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://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd http://xmlns.oracle.com/weblogic/weblogic-web-app http://xmlns.oracle.com/weblogic/weblogic-web-app/1.3/weblogic-web-app.xsd">
<wls:context-root>/support-service</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>

dispatcherServlet-servlet.xml

<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">

1

1 Answers

0
votes

So just to start off you will run into a few problems. You are using springboot 2.2.0 which will cause your dynamic web module facet to be set to 4.0. You will not be able to change this.

Next up, you are deploying to WLS11g. You not be able to deploy the .war file as WLS12c isn't even compatible with the dynamic web module of 4.0.

If you can, use a lower version of Spring Boot. 1.5.4 should work for you. Additionally if you must stay on your current version of spring boot for whatever reason see if you can deploy to another server (TomCat/Jetty)