gpt4 book ai didi

java - 引起原因:java.lang.NoClassDefFoundError:org/apache/cxf/ws/policy/builder/jaxb/JaxbAssertionBuilder

转载 作者:行者123 更新时间:2023-11-29 04:44:16 24 4
gpt4 key购买 nike

I am migrating my application from jboss-eap-5.1 to jboss-eap-6.4.0. My application is using spring 3.1.1 related jar and apache-cxf-2.7.7 jars. 

Ear file structure is as below
EAR/lib - contains all the jar which is common for wars.
app1.war/lib - contains jars required for it
app2.war/lib - contains jars required for it


I have also excluded modules for webservice, org.jboss.as.jaxrs & ejb3 from standalong.xml config file.


Spring jars :
spring-orm-3.1.1.RELEASE.jar
spring-aop-3.1.1.RELEASE.jar spring-oxm-3.2.4.RELEASE.jar
spring-asm-3.1.1.RELEASE.jar spring-test-3.2.4.RELEASE.jar
spring-beans-3.1.1.RELEASE.jar spring-tx-3.1.1.RELEASE.jar
spring-context-3.1.1.RELEASE.jar spring-web-3.2.4.RELEASE.jar
spring-core-3.1.1.RELEASE.jar spring-webmvc-3.2.4.RELEASE.jar
spring-data-commons-core-1.1.0.RELEASE.jar spring-ws-core-2.1.4.RELEASE.jar
spring-data-jpa-1.0.3.RELEASE.jar spring-ws-test-2.1.4.RELEASE.jar
spring-expression-3.1.1.RELEASE.jar spring-xml-2.1.4.RELEASE.jar

javaw.ws.rs jar containes below jar
javax.ws.rs-api-2.0-m10.jar

apache-cfx-jars packaged in ear/lib are
cxf-api-2.7.7.jar cxf-rt-frontend-jaxrs-2.7.7.jar
cxf-rt-bindings-soap-2.7.7.jar cxf-rt-frontend-jaxws-2.7.7.jar
cxf-rt-bindings-xml-2.7.7.jar cxf-rt-frontend-simple-2.7.7.jar
cxf-rt-core-2.7.7.jar cxf-rt-transports-http-2.7.7.jar
cxf-rt-databinding-jaxb-2.7.7.jar cxf-rt-transports-local-2.7.7.jar
cxf-rt-features-clustering-2.7.7.jar


now when i deploy , i am getting below error. I am not sure how to resolve this error as below
7:33:07,784 INFO [org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor] (pool-6-thread-2) JSR-330 'javax.inject.Inject' annotation found and supported for autowiring


07:33:07,785 INFO [org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor](pool-5-thread-1)JSR-330'javax.inject.Inject'注释已找到并支持自动装配
07:33:07,790信息[org.springframework.beans.factory.support.DefaultListableBeanFactory](池6线程2)在org.springframework.beans.factory.support.DefaultListableBeanFactory@75b6f75e中预先实例化单例: cxf,org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,servletContextReaderComponent,org.springframework.context.annotation.internalConfigurationAnnotationProcessor org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationAuthorServiceService,Provider,服务商,签名soaExceptionHandler,soaClientPolicyEvaluator,com.walmart.platform.soa.client.listener.SOAClientLife CycleListener#0,clientHeaderOutInterceptor,clientLoggingOutInterceptor,clientHeaderInInterceptor,clientLoggingInInterceptor,serviceAuthOutInterceptor,clientPolicyOutInterceptor,clientPolicyInInterceptor,cxf.config2,org.springframework.context.annotation.ConfigurationClassPostProcessor $ ImportAwareBeanPostor工厂层次结构的根
@

07:33:08,015错误[stderr](Thread-147)2016-06-20 07:33:08.014 WARN net.spy.memcached.auth.AuthThread:身份验证失败到/172.16.113.154:11210,状态:{OperationStatus成功= false:无效参数}
07:33:08,026警告[org.jboss.modules](pool-6-thread-2)无法在模块“ deployment.smcfs.ear:main”中定义类org.apache.cxf.transport.http.policy.HTTPServerAssertionBuilder。来自服务模块加载器:java.lang.LinkageError:无法链接org / apache / cxf / transport / http / policy / HTTPServerAssertionBuilder(服务模块加载器中的模块“ deployment.smcfs.ear:main”)
        在org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:487)[jboss-modules.jar:1.3.6.Final-redhat-1]
        在org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:277)[jboss-modules.jar:1.3.6.Final-redhat-1]
        在org.jboss.modules.ModuleClassLoader $ 1.loadClassLocal(ModuleClassLoader.java:92)[jboss-modules.jar:1.3.6.Final-redhat-1]
        在org.jboss.modules.Module.loadModuleClass(Module.java:568)[jboss-modules.jar:1.3.6.Final-redhat-1

When i check errors closely it is failing due to below class not found exception .

]
at com.walmartlabs.services.util.base.LabsCallable.call(LabsCallable.java:31) [labs-ims-1.0.jar:]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_51]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_51]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_51]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_51]


造成原因:java.lang.NoClassDefFoundError:org / apache / cxf / ws / policy / builder / jaxb / JaxbAssertionBuilder
        在java.lang.ClassLoader.defineClass1(本机方法)[rt.jar:1.8.0_51]
        在java.lang.ClassLoader.defineClass(ClassLoader.java:760)[rt.jar:1.8.0_51]
        在org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:361)[jboss-modules.jar:1.3.6.Final-redhat-1]
        在org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:482)上[jboss-modules.jar:1.3.6.Final-redhat-1]
        ...另外148个
由以下原因引起:java.lang.ClassNotFoundException:服务模块加载程序中的“模块” deployment.smcfs.ear:main”中的org.apache.cxf.ws.policy.builder.jaxb.JaxbAssertionBuilder。
        在org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213)[jboss-modules.jar:1.3.6。

    *********************************************8

at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_51]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_51]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_51]
at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_51]


造成原因:java.lang.NoClassDefFoundError:org / apache / cxf / ws / policy / AbstractPolicyInterceptorProvider
        在java.lang.ClassLoader.defineClass1(本机方法)[rt.jar:1.8.0_51]
        在java.lang.ClassLoader.defineClass(ClassLoader.java:760)[rt.jar:1.8.0_51]
        在org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:361)[jboss-modules.jar:1.3.6.Final-redhat-1]
        在org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:482)上[jboss-modules.jar:1.3.6.Final-redhat-1]
        ...另外148个
由以下原因引起:java.lang.ClassNotFoundException:服务模块加载程序[Module“ deployment.smcfs.ear:main”中的org.apache.cxf.ws.policy.AbstractPolicyInterceptorProvider
        在org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:213)[jboss-modules.jar:1.3.6.Final-redhat-1]
        一种

    ************************************


任何建议如何克服这个问题

Thanks

最佳答案

我必须将以下依赖项添加到pom中以避免该错误:

 <dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-frontend-jaxrs</artifactId>
<version>3.2.0</version>
</dependency>

<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-ws-policy</artifactId>
<version>3.2.0</version>
</dependency>

<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-wsdl</artifactId>
<version>3.2.0</version>
</dependency>


<dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http</artifactId>
<version>3.2.0</version>
</dependency>

关于java - 引起原因:java.lang.NoClassDefFoundError:org/apache/cxf/ws/policy/builder/jaxb/JaxbAssertionBuilder,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37925396/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com