i'm migrating application jboss 6.1.0 jboss eap 4.2.xa.
i know have changed many things, 1 of important jboss includes of framework / used libraries (modules), great (war files smaller).
now, have 2 applications, both mounted spring / cxf , maven2. 1 exposes web services , second first client.
the problem in client application, @ runtime, when try instantiate proxy web service following error:
------ java.lang.noclassdeffounderror: org/apache/cxf/jaxws/jaxwsproxyfactorybean @ es....myfactory.getservice_wsc(myfactory.java:59) ... @ javax.servlet.http.httpservlet.service(httpservlet.java:847) ... @ org.jboss.as.web.security.securitycontextassociationvalve.invoke(securitycontextassociationvalve.java:169) ... @ org.apache.tomcat.util.net.jioendpoint$worker.run(jioendpoint.java:920) @ java.lang.thread.run(thread.java:662) caused by: java.lang.classnotfoundexception: org.apache.cxf.jaxws.jaxwsproxyfactorybean [module "deployment.myapp.war:main" service module loader] @ org.jboss.modules.moduleclassloader.findclass(moduleclassloader.java:196) @ org.jboss.modules.concurrentclassloader.performloadclassunchecked(concurrentclassloader.java:444) @ org.jboss.modules.concurrentclassloader.performloadclasschecked(concurrentclassloader.java:432) @ org.jboss.modules.concurrentclassloader.performloadclasschecked(concurrentclassloader.java:399) @ org.jboss.modules.concurrentclassloader.performloadclass(concurrentclassloader.java:374) @ org.jboss.modules.concurrentclassloader.loadclass(concurrentclassloader.java:119) ... 21 more ------
in pom.xml, have following (cxf provided):
<properties> <cxf.version>2.6.6</cxf.version> <cxf.scope>provided</cxf.scope> </properties> <!-- cxf --> <dependency> <groupid>org.apache.cxf</groupid> <artifactid>cxf-rt-frontend-jaxws</artifactid> <version>${cxf.version}</version> <scope>${cxf.scope}</scope> </dependency> <dependency> <groupid>org.apache.cxf</groupid> <artifactid>cxf-rt-transports-http</artifactid> <version>${cxf.version}</version> <exclusions> <exclusion> <artifactid>commons-logging</artifactid> <groupid>commons-logging</groupid> </exclusion> </exclusions> <scope>${cxf.scope}</scope> </dependency> <dependency> <groupid>org.apache.cxf</groupid> <artifactid>cxf-rt-ws-security</artifactid> <version>${cxf.version}</version> <scope>${cxf.scope}</scope> </dependency>
could include cxf libraries presumably not necessary , jboss eap 6 has them?, though, if why error above noclassdeffounderror -> caused by: java.lang.classnotfoundexception?
thank you!
finally i've solved it.
first of all, thank willome response. nature of services architecture (implemented apache cxf) preferred solve using cxf.
jboss eap 6 embed full version of cxf framework, particularity "divided" modules , key has been identify modules included in application.
the thing war light, , can not include vast majority of frameworks / libraries ... in case went 1 war of 30mb final 5mb.
then added file application jboss-deployment-structure.xml, following contents:
<?xml version="1.0" encoding="utf-8"?> <jboss-deployment-structure> <deployment> <dependencies> <module name="org.jboss.ws.cxf.jbossws-cxf-client" services="import" /> <module name="org.apache.cxf.impl"> <imports> <include path="meta-inf"/> <include path="meta-inf/cxf"/> </imports> </module> <!-- ... --> </dependencies> </deployment> </jboss-deployment-structure>
and kept scope "provided" in pom.xm cxf framework.
Comments
Post a Comment