使用最新 Websphere Liberty 版本的异常

Exceptions using latest Websphere Liberty release

我正在查看最新的 WebSphere Liberty Profile 8.5.5.7 完整平台,我尝试部署现有的耳朵,但没有成功。在 server.xml 我添加了:

<featureManager>
    <feature>javaee-7.0</feature>
</featureManager>

但在 ffdc 日志中我得到:

Caused by: java.lang.NoClassDefFoundError: javax/xml/rpc/ServiceException

我的耳朵不是 loaded.One 我的豆子有进口的 javax.xml.rpc.ServiceException

据我所知,ServiceException 是 Java EE 7 规范的一部分。

ffdc 日志中的完整异常是:

   ------Start of DE processing------ = [10/29/15 15:32:11:134 CET]
Exception = com.ibm.ws.container.service.state.StateChangeException
Source = com.ibm.ws.app.manager.module.internal.DeployedAppInfoBase
probeid = 792
Stack Dump = com.ibm.ws.container.service.state.StateChangeException: org.jboss.weld.resources.spi.ResourceLoadingException: Error while loading class aa.bb.SystemClientBean
    at com.ibm.ws.container.service.state.internal.ApplicationStateManager.fireStarting(ApplicationStateManager.java:33)
    at com.ibm.ws.container.service.state.internal.StateChangeServiceImpl.fireApplicationStarting(StateChangeServiceImpl.java:51)
    at com.ibm.ws.app.manager.module.internal.DeployedAppInfoBase.preDeployApp(DeployedAppInfoBase.java:791)
    at com.ibm.ws.app.manager.module.internal.DeployedAppInfoBase.deployApp(DeployedAppInfoBase.java:818)
    at com.ibm.ws.app.manager.ear.internal.EARApplicationHandlerImpl.install(EARApplicationHandlerImpl.java:84)
    at com.ibm.ws.app.manager.internal.statemachine.StartAction.execute(StartAction.java:139)
    at com.ibm.ws.app.manager.internal.statemachine.ApplicationStateMachineImpl.enterState(ApplicationStateMachineImpl.java:1168)
    at com.ibm.ws.app.manager.internal.statemachine.ApplicationStateMachineImpl.run(ApplicationStateMachineImpl.java:781)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: org.jboss.weld.resources.spi.ResourceLoadingException: Error while loading class aa.bb.SystemClientBean
    at org.jboss.weld.resources.ClassTransformer.getBackedAnnotatedType(ClassTransformer.java:186)
    at org.jboss.weld.resources.ClassTransformer.getBackedAnnotatedType(ClassTransformer.java:194)
    at org.jboss.weld.resources.ClassTransformer.getEnhancedAnnotatedType(ClassTransformer.java:228)
    at org.jboss.weld.bootstrap.AbstractBeanDeployer.createSessionBean(AbstractBeanDeployer.java:288)
    at org.jboss.weld.bootstrap.ConcurrentBeanDeployer.doWork(ConcurrentBeanDeployer.java:93)
    at org.jboss.weld.bootstrap.ConcurrentBeanDeployer.doWork(ConcurrentBeanDeployer.java:82)
    at org.jboss.weld.executor.IterativeWorkerTaskFactory.call(IterativeWorkerTaskFactory.java:60)
    at org.jboss.weld.executor.IterativeWorkerTaskFactory.call(IterativeWorkerTaskFactory.java:53)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    ... 3 more
Caused by: java.lang.NoClassDefFoundError: javax/xml/rpc/ServiceException
    at java.lang.Class.getDeclaredConstructors0(Native Method)
    at java.lang.Class.privateGetDeclaredConstructors(Class.java:2663)
    at java.lang.Class.getDeclaredConstructors(Class.java:2012)
    at org.jboss.weld.security.GetDeclaredConstructorsAction.run(GetDeclaredConstructorsAction.java:30)
    at org.jboss.weld.security.GetDeclaredConstructorsAction.run(GetDeclaredConstructorsAction.java:22)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.jboss.weld.annotated.slim.backed.BackedAnnotatedType$BackedAnnotatedConstructors.computeValue(BackedAnnotatedType.java:167)
    at org.jboss.weld.annotated.slim.backed.BackedAnnotatedType$BackedAnnotatedConstructors.computeValue(BackedAnnotatedType.java:164)
    at org.jboss.weld.util.LazyValueHolder.get(LazyValueHolder.java:35)
    at org.jboss.weld.annotated.slim.backed.BackedAnnotatedType$EagerlyInitializedLazyValueHolder.<init>(BackedAnnotatedType.java:160)
    at org.jboss.weld.annotated.slim.backed.BackedAnnotatedType$BackedAnnotatedConstructors.<init>(BackedAnnotatedType.java:164)
    at org.jboss.weld.annotated.slim.backed.BackedAnnotatedType$BackedAnnotatedConstructors.<init>(BackedAnnotatedType.java:164)
    at org.jboss.weld.annotated.slim.backed.BackedAnnotatedType.<init>(BackedAnnotatedType.java:65)
    at org.jboss.weld.annotated.slim.backed.BackedAnnotatedType.of(BackedAnnotatedType.java:48)
    at org.jboss.weld.resources.ClassTransformer$TransformClassToBackedAnnotatedType.load(ClassTransformer.java:83)
    at org.jboss.weld.resources.ClassTransformer$TransformClassToBackedAnnotatedType.load(ClassTransformer.java:80)
    at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3599)
    at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2379)
    at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2342)
    at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2257)
    at com.google.common.cache.LocalCache.get(LocalCache.java:4000)
    at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:4004)
    at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4874)
    at org.jboss.weld.util.cache.LoadingCacheUtils.getCacheValue(LoadingCacheUtils.java:49)
    at org.jboss.weld.util.cache.LoadingCacheUtils.getCastCacheValue(LoadingCacheUtils.java:74)
    at org.jboss.weld.resources.ClassTransformer.getBackedAnnotatedType(ClassTransformer.java:175)
    ... 11 more
Caused by: java.lang.ClassNotFoundException: javax.xml.rpc.ServiceException
    at com.ibm.ws.classloading.internal.AppClassLoader.findClassCommonLibraryClassLoaders(AppClassLoader.java:433)
    at com.ibm.ws.classloading.internal.AppClassLoader.findClass(AppClassLoader.java:279)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at com.ibm.ws.classloading.internal.AppClassLoader.findOrDelegateLoadClass(AppClassLoader.java:411)
    at com.ibm.ws.classloading.internal.AppClassLoader.loadClass(AppClassLoader.java:383)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 37 more 

消息日志还指出:

[10/29/15 15:32:10:312 CET] 0000004f org.jboss.weld.Bootstrap                                     I WELD-000119: Not generating any bean definitions from aa.bb.SystemClientBean because of underlying class loading error: Type javax.xml.rpc.ServiceException not found.  If this is unexpected, enable DEBUG logging to see the full error.
[10/29/15 15:32:11:133 CET] 00000041 com.ibm.ws.logging.internal.impl.IncidentImpl                I FFDC1015I: An FFDC Incident has been created: "org.jboss.weld.resources.spi.ResourceLoadingException: Error while loading class aa.bb.SystemClientBean com.ibm.ws.container.service.state.internal.ApplicationStateManager 32" at ffdc_15.10.29_15.32.10.0.log
[10/29/15 15:32:11:217 CET] 00000041 com.ibm.ws.logging.internal.impl.IncidentImpl                I FFDC1015I: An FFDC Incident has been created: "com.ibm.ws.container.service.state.StateChangeException: org.jboss.weld.resources.spi.ResourceLoadingException: Error while loading class aa.bb.SystemClientBean com.ibm.ws.app.manager.module.internal.DeployedAppInfoBase 792" at ffdc_15.10.29_15.32.11.0.log
[10/29/15 15:32:11:272 CET] 00000041 om.ibm.ws.app.manager.ear.internal.EARApplicationHandlerImpl E CWWKZ0106E: Could not start web application myEAR.
[10/29/15 15:32:11:275 CET] 00000041 com.ibm.ws.app.manager.AppMessageHelper                      E CWWKZ0002E: An exception occurred while starting the application myEAR. The exception message was: com.ibm.ws.container.service.state.StateChangeException: org.jboss.weld.resources.spi.ResourceLoadingException: Error while loading class aa.bb.SystemClientBean

知道如何解决这个问题吗?

WebSphere Liberty 配置文件不支持 JAX-RPC,但支持 JAX-WS 或 JAX-RS。您必须将 Web 服务迁移到 JAX-WS。 JAX-RPC 在 Java EE 6 中已被弃用,在 Java EE 7 中它是可选的。参见 Java EE 7 Technologies

JAX-RPC 仍受 WebSphere Application Server 完整(又名经典)配置文件的支持。