I created a spring boot 2.0.0 - rest application .. It's running fine on the embedded tomcat in STS (using Run as Spring boot application
) but when I assembled it into war and tried to deploy it on weblogic 10.3.6 (java EE 5 compliant server) it failed displaying The configuration for app is still being loaded from your last request, please wait a moment and retry.
on the administration console ... looking in the logs, I found :
####<Apr 18, 2018 2:45:58 PM AST> <Warning> <netuix> <EJASRV7078> <AdminServer> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <weblogic> <> <ab32afc0f77c2566:-190f3657:162d88b7cc4:-8000-000000000000001b> <1524051958770> <BEA-423420> <Redirect is executed in begin or refresh action. Redirect url is /console/console.portal?_nfpb=true&_pageLabel=WebAppApplicationOverviewPage&WebAppApplicationOverviewPortlethandle=com.bea.console.handles.AppDeploymentHandle%28%22com.bea%3AName%3Dapp%2CType%3DAppDeployment%22%29.>
####<Apr 18, 2018 2:46:11 PM AST> <Error> <Console> <EJASRV7078> <AdminServer> <[ACTIVE] ExecuteThread: '1' for queue: 'weblogic.kernel.Default (self-tuning)'> <weblogic> <> <ab32afc0f77c2566:-190f3657:162d88b7cc4:-8000-000000000000001c> <1524051971974> <BEA-240003> <Console encountered the following error java.io.IOException: Exception in AppMerge flows' progression
at weblogic.deploy.api.internal.utils.AppMerger.getMergedApp(AppMerger.java:70)
at weblogic.deploy.api.model.internal.WebLogicDeployableObjectFactoryImpl.createDeployableObject(WebLogicDeployableObjectFactoryImpl.java:181)
at weblogic.deploy.api.model.internal.WebLogicDeployableObjectFactoryImpl.createDeployableObject(WebLogicDeployableObjectFactoryImpl.java:163)
at weblogic.deploy.api.tools.SessionHelper.initialize(SessionHelper.java:727)
at weblogic.deploy.api.tools.SessionHelper.initializeConfiguration(SessionHelper.java:556)
at weblogic.deploy.api.tools.SessionHelper.initializeConfiguration(SessionHelper.java:544)
at weblogic.deploy.api.tools.SessionHelper.initializeConfiguration(SessionHelper.java:627)
at com.bea.console.utils.DeploymentConfigurationHelper$1.execute(DeploymentConfigurationHelper.java:858)
at com.bea.console.utils.DeploymentUtils.runDeploymentAction(DeploymentUtils.java:5023)
at com.bea.console.utils.DeploymentConfigurationHelper.initDeploymentConfiguration(DeploymentConfigurationHelper.java:847)
at com.bea.console.utils.DeploymentConfigurationHelper.completeInitialization(DeploymentConfigurationHelper.java:443)
at com.bea.console.utils.DeploymentConfigurationManager.getDeploymentConfiguration(DeploymentConfigurationManager.java:150)
at com.bea.console.utils.DeploymentConfigurationManager.getDeploymentConfiguration(DeploymentConfigurationManager.java:104)
at com.bea.console.utils.DeploymentConfigurationManager.getDeploymentConfiguration(DeploymentConfigurationManager.java:65)
at com.bea.console.utils.PersistenceUtils.getPersistenceUnitNames(PersistenceUtils.java:76)
at com.bea.console.utils.PersistenceUtils.hasPersistenceUnits(PersistenceUtils.java:52)
at com.bea.console.utils.AppDeploymentBackingFile.preRender(AppDeploymentBackingFile.java:110)
at com.bea.netuix.servlets.controls.Backable$Impl.preRender(Backable.java:191)
at com.bea.netuix.servlets.controls.AdministeredBackableControl.preRender(AdministeredBackableControl.java:104)
at com.bea.netuix.servlets.controls.window.Window.preRender(Window.java:432)
at com.bea.netuix.servlets.controls.page.Page.preRender(Page.java:240)
at com.bea.netuix.nf.ControlLifecycle$6.visit(ControlLifecycle.java:428)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:727)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
at com.bea.netuix.nf.ControlTreeWalker.walkRecursivePreRender(ControlTreeWalker.java:739)
at com.bea.netuix.nf.ControlTreeWalker.walk(ControlTreeWalker.java:146)
at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:395)
at com.bea.netuix.nf.Lifecycle.processLifecycles(Lifecycle.java:361)
at com.bea.netuix.nf.Lifecycle.runOutbound(Lifecycle.java:208)
at com.bea.netuix.nf.Lifecycle.run(Lifecycle.java:162)
at com.bea.netuix.servlets.manager.UIServlet.runLifecycle(UIServlet.java:388)
at com.bea.netuix.servlets.manager.UIServlet.doPost(UIServlet.java:258)
at com.bea.netuix.servlets.manager.UIServlet.doGet(UIServlet.java:211)
at com.bea.netuix.servlets.manager.UIServlet.service(UIServlet.java:196)
at com.bea.netuix.servlets.manager.SingleFileServlet.service(SingleFileServlet.java:251)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
at com.bea.console.utils.MBeanUtilsInitSingleFileServlet.service(MBeanUtilsInitSingleFileServlet.java:64)
at weblogic.servlet.AsyncInitServlet.service(AsyncInitServlet.java:130)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:301)
at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3730)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3696)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2273)
at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2179)
at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1490)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:256)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:221)
Caused by: weblogic.utils.compiler.ToolFailureException: Exception in AppMerge flows' progression
at weblogic.application.compiler.AppMerge.merge(AppMerge.java:172)
at weblogic.deploy.api.internal.utils.AppMerger.merge(AppMerger.java:88)
at weblogic.deploy.api.internal.utils.AppMerger.getMergedApp(AppMerger.java:63)
... 65 more
Caused by: weblogic.utils.compiler.ToolFailureException: String index out of range: 36611
at weblogic.application.compiler.FlowDriver.handleStateChangeException(FlowDriver.java:53)
at weblogic.application.compiler.FlowDriver.nextState(FlowDriver.java:37)
at weblogic.application.compiler.FlowDriver$CompilerFlowDriver.compile(FlowDriver.java:96)
at weblogic.application.compiler.AppMerge.runBody(AppMerge.java:157)
at weblogic.utils.compiler.Tool.run(Tool.java:158)
at weblogic.utils.compiler.Tool.run(Tool.java:115)
at weblogic.application.compiler.AppMerge.merge(AppMerge.java:169)
... 67 more
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: 36611
at java.lang.String.checkBounds(String.java:401)
at java.lang.String.<init>(String.java:442)
at serp.bytecode.lowlevel.ConstantPoolTable.readString(ConstantPoolTable.java:112)
at serp.bytecode.lowlevel.ConstantPoolTable.readString(ConstantPoolTable.java:174)
at org.apache.openjpa.lib.meta.ClassAnnotationMetaDataFilter.matches(ClassAnnotationMetaDataFilter.java:90)
at weblogic.application.utils.ClassFinderMetaDataEnumaration.hasMoreElements(ClassFinderMetaDataEnumaration.java:59)
at weblogic.servlet.internal.WebAnnotationProcessorImpl.getAnnotatedClasses(WebAnnotationProcessorImpl.java:139)
at weblogic.application.compiler.WARModule$WarModuleWebAppHelper.getAnnotatedClasses(WARModule.java:619)
at weblogic.servlet.internal.WebAnnotationProcessorImpl.processAnnotations(WebAnnotationProcessorImpl.java:84)
at weblogic.application.compiler.WARModule.processAnnotations(WARModule.java:433)
at weblogic.application.compiler.EARModule.processAnnotations(EARModule.java:227)
at weblogic.application.compiler.WARModule.merge(WARModule.java:483)
at weblogic.application.compiler.flow.SingleModuleMergeFlow.proecessModule(SingleModuleMergeFlow.java:16)
at weblogic.application.compiler.flow.SingleModuleFlow.compile(SingleModuleFlow.java:36)
at weblogic.application.compiler.FlowDriver$FlowStateChange.next(FlowDriver.java:69)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
at weblogic.application.compiler.FlowDriver.nextState(FlowDriver.java:36)
at weblogic.application.compiler.FlowDriver$CompilerFlowDriver.compile(FlowDriver.java:96)
at weblogic.application.compiler.ReadOnlyWarMerger.merge(ReadOnlyWarMerger.java:27)
at weblogic.application.compiler.flow.AppMergerFlow.mergeInput(AppMergerFlow.java:88)
at weblogic.application.compiler.flow.AppMergerFlow.compile(AppMergerFlow.java:41)
at weblogic.application.compiler.FlowDriver$FlowStateChange.next(FlowDriver.java:69)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
at weblogic.application.compiler.FlowDriver.nextState(FlowDriver.java:36)
... 72 more
I added web.xml and weblogic.xml -because of the java EE 5 nature :
web.xml :
<?xml version="1.0"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
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">
<display-name>Spring Boot Liberty</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
</web-app>
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://java.sun.com/xml/ns/javaee
http://xmlns.oracle.com/weblogic/weblogic-web-app
http://xmlns.oracle.com/weblogic/weblogic-web-app/1.3/weblogic-web-app.xsd">
<wls:weblogic-version>10.3.x</wls:weblogic-version>
<wls:context-root>app</wls:context-root>
<wls:container-descriptor>
<!-- <wls:prefer-web-inf-classes>true</wls:prefer-web-inf-classes> -->
<wls:prefer-application-packages>
<wls:package-name>org.springframework.*</wls:package-name>
</wls:prefer-application-packages>
</wls:container-descriptor>
</wls:weblogic-web-app>
build.gradle:
buildscript {
ext {
springBootVersion = '2.0.0.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
apply plugin: 'java'
apply plugin: 'eclipse-wtp'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
apply plugin: 'war'
group = 'com.mypackage'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.8
repositories {
mavenCentral()
mavenLocal()
}
configurations {
providedRuntime
}
dependencies {
compile('org.springframework.boot:spring-boot-starter-web')
compile('org.springframework.ws:spring-ws-core')
compile('org.mybatis.spring.boot:mybatis-spring-boot-starter:1.3.2')
compile('org.projectlombok:lombok:1.16.20')
compile('com.oracle:ojdbc8:12.0.2')
compileOnly('org.springframework.boot:spring-boot-devtools:2.0.0.RELEASE')
compileOnly('javax.servlet:javax.servlet-api:3.1.0')
providedRuntime('org.springframework.boot:spring-boot-starter-tomcat')
testCompile('org.springframework.boot:spring-boot-starter-test')
testCompile('org.springframework.security:spring-security-test')
}
/*compile('org.springframework.boot:spring-boot-starter-data-jpa')
compile('org.springframework.boot:spring-boot-starter-data-rest')
compile('org.springframework.boot:spring-boot-starter-security')
compile('org.springframework.session:spring-session-core')
*/
bootJar {
baseName = 'gs-consuming-web-service'
version = '0.1.0'
// from genJaxb.classesDir
}
SpringBootServletInitializer :
@SpringBootApplication
@MapperScan(basePackages = { "com.mypackage" })
public class MainClass extends SpringBootServletInitializer implements WebApplicationInitializer{
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(MainClass.class);
}
public static void main(String[] args) {
SpringApplication.run(MainClass.class, args);
}
}
EDIT 1 : I figured out that web.xml is not mandatory in servlet specs 2.5 if no servlets are defined so I removed it altogether with the weblogic.xml .. but the error is still there
EDIT 2 : I tried deploying the generated war on tomcat 8 (servlet specs 3.1 ) and it worked fine - I mean standalone instance not STS embedded
EDIT 3 : I tried deploying the generated war -after removing web.xml - on tomcat 6 (servlet specs 2.5 ) and it didn't work