1

我在 WAS 8.5 上部署期间收到 java.lang.NoClassDefFoundError 错误。我已经包含了 icu4j jar,但仍然出现以下错误。我已将 jar 放在 lib 文件夹中。请您指教。

[2/4/16 15:41:49:952 GMT] 00000054 webapp        E com.ibm.ws.webcontainer.webapp.WebApp notifyServletContextCreated SRVE0283E: Exception caught while initializing context: {0}
                                 java.lang.NoClassDefFoundError: com.vertexinc.tps.xml.calc.parsegenerate.builder.NonSpecificTransactionBuilder (initialization failure)
        at java.lang.J9VMInternals.initialize(J9VMInternals.java:175)
        at java.lang.Class.forNameImpl(Native Method)
        at java.lang.Class.forName(Class.java:250)
        at com.vertexinc.tps.xml.calc.parsegenerate.builder.BuilderRegistration.register(BuilderRegistration.java:33)
        at com.vertexinc.tps.xml.calc.service.XmlTaxCalculator.init(XmlTaxCalculator.java:76)
        at com.ford.finance.taxconnector.engine.VertexTaxEngine.initVertex(VertexTaxEngine.java:103)
        at com.ford.finance.taxconnector.engine.VertexTaxEngine.<init>(VertexTaxEngine.java:77)
        at com.ford.finance.taxconnector.engine.VertexTaxEngine.initialize(VertexTaxEngine.java:51)
        at com.ford.finance.taxconnector.config.Config.init(Config.java:154)
        at com.ford.finance.taxconnector.config.Config.getInstance(Config.java:83)
        at com.ford.finance.taxconnector.TaxConnectorStartupListener.contextInitialized(TaxConnectorStartupListener.java:51)
        at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:1689)
        at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:410)
        at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:88)
        at com.ibm.ws.webcontainer.VirtualHostImpl.addWebApplication(VirtualHostImpl.java:169)
        at com.ibm.ws.webcontainer.WSWebContainer.addWebApp(WSWebContainer.java:749)
        at com.ibm.ws.webcontainer.WSWebContainer.addWebApplication(WSWebContainer.java:634)
        at com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:422)
        at com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:714)
        at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1167)
        at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1370)
        at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:639)
        at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:968)
        at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:773)
        at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplicationDynamically(ApplicationMgrImpl.java:1369)
        at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:2170)
        at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:435)
        at com.ibm.ws.runtime.component.CompositionUnitImpl.start(CompositionUnitImpl.java:123)
        at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.start(CompositionUnitMgrImpl.java:378)
        at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.access$500(CompositionUnitMgrImpl.java:126)
        at com.ibm.ws.runtime.component.CompositionUnitMgrImpl$1.run(CompositionUnitMgrImpl.java:653)
        at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:5471)
        at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:5597)
        at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255)
        at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:667)
        at com.ibm.ws.runtime.component.CompositionUnitMgrImpl.startCompositionUnit(CompositionUnitMgrImpl.java:611)
        at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:1259)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
        at java.lang.reflect.Method.invoke(Method.java:611)
        at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:69)
        at sun.reflect.GeneratedMethodAccessor120.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
        at java.lang.reflect.Method.invoke(Method.java:611)
        at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:272)
        at javax.management.modelmbean.RequiredModelMBean$4.run(RequiredModelMBean.java:1152)
        at java.security.AccessController.doPrivileged(AccessController.java:388)
        at com.ibm.oti.security.CheckedAccessControlContext.securityCheck(CheckedAccessControlContext.java:30)
        at sun.misc.JavaSecurityAccessWrapper.doIntersectionPrivilege(JavaSecurityAccessWrapper.java:41)
        at javax.management.modelmbean.RequiredModelMBean.invokeMethod(RequiredModelMBean.java:1146)
        at javax.management.modelmbean.RequiredModelMBean.invoke(RequiredModelMBean.java:999)
        at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:847)
        at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:783)
        at com.ibm.ws.management.AdminServiceImpl$1.run(AdminServiceImpl.java:1350)
        at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
        at com.ibm.ws.management.AdminServiceImpl.invoke(AdminServiceImpl.java:1243)
        at com.ibm.ws.management.connector.AdminServiceDelegator.invoke(AdminServiceDelegator.java:181)
        at com.ibm.ws.management.connector.ipc.CallRouter.route(CallRouter.java:247)
        at com.ibm.ws.management.connector.ipc.IPCConnectorInboundLink.doWork(IPCConnectorInboundLink.java:360)
        at com.ibm.ws.management.connector.ipc.IPCConnectorInboundLink$IPCConnectorReadCallback.complete(IPCConnectorInboundLink.java:602)
        at com.ibm.ws.ssl.channel.impl.SSLReadServiceContext$QueuedWork.run(SSLReadServiceContext.java:1981)
        at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1720)
Caused by: java.lang.NoClassDefFoundError: com.ibm.icu.text.Normalizer
        at com.vertexinc.util.unicode.Normalizer.normalize(Normalizer.java:26)
        at com.vertexinc.util.config.SysConfig.getEnv(SysConfig.java:744)
        at com.vertexinc.tps.common.domain.CalcEnv.loadConfig(CalcEnv.java:84)
        at com.vertexinc.tps.common.domain.CalcEnv.<init>(CalcEnv.java:73)
        at com.vertexinc.tps.common.domain.CalcEnvManager.createService(CalcEnvManager.java:32)
        at com.vertexinc.tps.common.domain.CalcEnvManager.getService(CalcEnvManager.java:22)
        at com.vertexinc.tps.common.calc.app.direct.CalcEngine.isDefaultAutoCommit(CalcEngine.java:1110)
        at com.vertexinc.tps.common.calc.app.direct.TransactionFactory.<init>(TransactionFactory.java:96)
        at com.vertexinc.tps.common.calc.app.direct.CalcEngine.createTransactionFactory(CalcEngine.java:506)
        at com.vertexinc.tps.xml.calc.parsegenerate.builder.CreateUtil.getTransactionFactory(CreateUtil.java:35)
        at com.vertexinc.tps.xml.calc.parsegenerate.builder.CreateUtil.createTransaction(CreateUtil.java:40)
        at com.vertexinc.tps.xml.calc.parsegenerate.builder.NonSpecificTransactionBuilder.<clinit>(NonSpecificTransactionBuilder.java:40)
        at java.lang.J9VMInternals.initializeImpl(Native Method)
        at java.lang.J9VMInternals.initialize(J9VMInternals.java:235)
        at java.lang.Class.forNameImpl(Native Method)
        at java.lang.Class.forName(Class.java:250)
        at com.vertexinc.tps.xml.calc.parsegenerate.builder.BuilderRegistration.register(BuilderRegistration.java:33)
        at com.vertexinc.tps.xml.calc.service.XmlTaxCalculator.init(XmlTaxCalculator.java:76)
        at com.ford.finance.taxconnector.engine.VertexTaxEngine.initVertex(VertexTaxEngine.java:103)
        at com.ford.finance.taxconnector.engine.VertexTaxEngine.<init>(VertexTaxEngine.java:77)
        at com.ford.finance.taxconnector.engine.VertexTaxEngine.initialize(VertexTaxEngine.java:51)
        at com.ford.finance.taxconnector.config.Config.init(Config.java:154)
        at com.ford.finance.taxconnector.config.Config.getInstance(Config.java:83)
        at com.ford.finance.taxconnector.TaxConnectorStartupListener.contextInitialized(TaxConnectorStartupListener.java:51)
        at com.ibm.ws.webcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:1689)
        at com.ibm.ws.webcontainer.webapp.WebAppImpl.initialize(WebAppImpl.java:410)
        at com.ibm.ws.webcontainer.webapp.WebGroupImpl.addWebApplication(WebGroupImpl.java:88)
4

1 回答 1

1

您尝试使用哪个版本?很可能您遇到了与此处此处所述的开源软件包的库冲突。特别感兴趣的是设计一个独立的共享库或使用 Always-Protected Packages 功能对 JavaEE 应用程序隐藏 com.ibm.icu 包。

Application Server 8.5 包括 ICU 版本 4.4.2,如 WAS_HOME/plugins/com.ibm.icu.jar 的 MANIFEST.MF 中所述。

于 2016-02-04T19:59:55.227 回答