我已创建了JPA Spring启动应用程序,该应用程序在我的本地环境中正常运行,但在将其部署到IBM Bluemix中的 Java Liberty Cloud Foundary应用程序时出现以下错误:
本地IDE:Eclipse Oxygen
当我在我的本地IDE上运行此应用程序时,它访问了云Db Compose for MySQL并按预期提供结果。
http://localhost:8080/users/all
在IBM Bluemix中部署,它会给出错误消息
服务器:IBM Bluemix
部署:Cloud Foundary
Cloud Foundary App:Java Liberty
数据库:Compose for MySQL
错误404:SRVE0190E:找不到文件:/
pom.xml
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.4.2.RELEASE</version>
</parent>
<dependencies>
<!-- Web -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
</dependencies>
messages.log
[9/15/17 9:59:23:464 UTC] 00000026 com.ibm.ws.webcontainer.osgi.mbeans.PluginGenerator I SRVE9103I: A configuration file for a web server plugin was automatically generated for this server at /home/vcap/app/wlp/usr/servers/defaultServer/logs/state/plugin-cfg.xml.
[9/15/17 9:59:23:990 UTC] 00000033 com.ibm.ws.logging.internal.impl.IncidentImpl I FFDC1015I: An FFDC Incident has been created: "java.lang.NoClassDefFoundError: org.apache.tiles.el.ScopeELResolver com.ibm.ws.injectionengine.InjectionProcessorManager.getAllDeclaredFields 249" at ffdc_17.09.15_09.59.23.0.log
[9/15/17 9:59:24:002 UTC] 00000033 com.ibm.ws.injectionengine.InjectionProcessorManager W CWNEN0047W: Resource annotations on the fields of the org.springframework.web.servlet.view.tiles3.TilesConfigurer$CompositeELResolverImpl class will be ignored. The annotations could not be obtained because of the exception : java.lang.NoClassDefFoundError: org.apache.tiles.el.ScopeELResolver
[9/15/17 9:59:24:020 UTC] 00000033 com.ibm.ws.logging.internal.impl.IncidentImpl I FFDC1015I: An FFDC Incident has been created: "java.lang.NoClassDefFoundError: org.apache.tiles.el.ScopeELResolver com.ibm.wsspi.injectionengine.MethodMap.getAllDeclaredMethods 106" at ffdc_17.09.15_09.59.24.0.log
[9/15/17 9:59:24:021 UTC] 00000033 com.ibm.wsspi.injectionengine.MethodMap W CWNEN0049W: Resource annotations on the methods of the org.springframework.web.servlet.view.tiles3.TilesConfigurer$CompositeELResolverImpl class will be ignored. The annotations could not be obtained because of the exception : java.lang.NoClassDefFoundError: org.apache.tiles.el.ScopeELResolver
ffdc_17.09.15_09.59.23.0.log
Exception = java.lang.NoClassDefFoundError
Source = com.ibm.ws.injectionengine.InjectionProcessorManager.getAllDeclaredFields
probeid = 249
Stack Dump = java.lang.NoClassDefFoundError: org.apache.tiles.el.ScopeELResolver
at java.lang.J9VMInternals.prepareClassImpl(Native Method)
at java.lang.J9VMInternals.prepare(Unknown Source)
at java.lang.Class.getDeclaredFields(Unknown Source)
at com.ibm.ws.injectionengine.InjectionProcessorManager.getAllDeclaredFields(InjectionProcessorManager.java:375)
at com.ibm.ws.injectionengine.InjectionProcessorManager.processAnnotations(InjectionProcessorManager.java:216)
at com.ibm.ws.injectionengine.AbstractInjectionEngine.processInjectionMetaData(AbstractInjectionEngine.java:514)
at com.ibm.ws.injectionengine.osgi.internal.OSGiInjectionEngineImpl.processInjectionMetaData(OSGiInjectionEngineImpl.java:239)
at com.ibm.ws.injectionengine.ReferenceContextImpl.processImpl(ReferenceContextImpl.java:595)
at com.ibm.ws.injectionengine.ReferenceContextImpl.process(ReferenceContextImpl.java:290)
at com.ibm.ws.injectionengine.osgi.internal.OSGiReferenceContextImpl.process(OSGiReferenceContextImpl.java:31)
at com.ibm.ws.webcontainer.osgi.webapp.WebApp.commonInitializationStart(WebApp.java:255)
at com.ibm.ws.webcontainer.webapp.WebApp.initialize(WebApp.java:1039)
at com.ibm.ws.webcontainer.webapp.WebApp.initialize(WebApp.java:6595)
at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost.startWebApp(DynamicVirtualHost.java:468)
at com.ibm.ws.webcontainer.osgi.DynamicVirtualHost.startWebApplication(DynamicVirtualHost.java:463)
at com.ibm.ws.webcontainer.osgi.WebContainer.startWebApplication(WebContainer.java:1120)
at com.ibm.ws.webcontainer.osgi.WebContainer.access$000(WebContainer.java:104)
at com.ibm.ws.webcontainer.osgi.WebContainer$2.run(WebContainer.java:932)
at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.apache.tiles.el.ScopeELResolver
at com.ibm.ws.classloading.internal.AppClassLoader.findClassCommonLibraryClassLoaders(AppClassLoader.java:499)
at com.ibm.ws.classloading.internal.AppClassLoader.findClass(AppClassLoader.java:282)
at java.lang.ClassLoader.loadClassHelper(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at com.ibm.ws.classloading.internal.AppClassLoader.findOrDelegateLoadClass(AppClassLoader.java:477)
at com.ibm.ws.classloading.internal.AppClassLoader.loadClass(AppClassLoader.java:449)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 23 more