Apache CXF 2.5.2 & JBOSS 7.1.1 Final
larvender Jul 12, 2012 6:32 AMAfter I deploy this application. The server throws these error.
Evironment: apache cxf 2.5.2 and JBOSS 7.1.1 Final.
My lib.
activemq-core-5.4.2.jar
aopalliance-1.0.jar
commons-collections-3.2.1.jar
commons-lang-2.6.jar
commons-logging-1.1.1.jar
commons-pool-1.6.jar
cxf-2.5.2.jar
cxf-manifest.jar
cxf-services-sts-core-2.5.2.jar
cxf-services-wsn-api-2.5.2.jar
cxf-services-wsn-core-2.5.2.jar
cxf-xjc-boolean-2.4.0.jar
cxf-xjc-bug671-2.4.0.jar
cxf-xjc-dv-2.4.0.jar
cxf-xjc-ts-2.4.0.jar
FastInfoset-1.2.9.jar
geronimo-activation_1.1_spec-1.1.jar
geronimo-annotation_1.0_spec-1.1.1.jar
geronimo-javamail_1.4_spec-1.7.1.jar
geronimo-jaxws_2.2_spec-1.1.jar
geronimo-jms_1.1_spec-1.1.1.jar
geronimo-servlet_2.5_spec-1.1.2.jar
geronimo-stax-api_1.0_spec-1.0.1.jar
geronimo-ws-metadata_2.0_spec-1.1.3.jar
gxserver5.2.5.jar
jaxb-api-2.2.3.jar
jaxb-impl-2.2.4-1.jar
jettison-1.3.1.jar
jetty-continuation-7.5.4.v20111024.jar
jetty-http-7.5.4.v20111024.jar
jetty-io-7.5.4.v20111024.jar
jetty-server-7.5.4.v20111024.jar
jetty-util-7.5.4.v20111024.jar
jra-1.0-alpha-4.jar
js-1.7R2.jar
jsr311-api-1.1.1.jar
log4j-1.2.13.jar
neethi-3.0.1.jar
saaj-api-1.3.4.jar
saaj-impl-1.3.12.jar
slf4j-api-1.6.2.jar
slf4j-jdk14-1.6.2.jar
spring-aop-3.0.6.RELEASE.jar
spring-asm-3.0.6.RELEASE.jar
spring-beans-3.0.6.RELEASE.jar
spring-context-3.0.6.RELEASE.jar
spring-core-3.0.6.RELEASE.jar
spring-expression-3.0.6.RELEASE.jar
spring-jms-3.0.6.RELEASE.jar
spring-ldap-core-1.3.1.RELEASE.jar
spring-tx-3.0.6.RELEASE.jar
spring-web-3.0.6.RELEASE.jar
stax2-api-3.1.1.jar
velocity-1.7.jar
woodstox-core-asl-4.1.1.jar
wsdl4j-1.6.2.jar
wss4j-1.6.4.jar
These are the error.
17:25:05,898 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed to start service jboss.deployment.unit."VPlusGateway.war".INSTALL: org.jboss.msc.service.StartException in service jboss.deployment.unit."VPlusGateway.war".INSTALL: Failed to process phase INSTALL of deployment "VPlusGateway.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_23]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_23]
at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_23]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011030: Could not configure component org.apache.cxf.wsn.client.Publisher
at org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:92)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
... 5 more
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS011054: Could not find default constructor for class org.apache.cxf.wsn.client.Publisher
at org.jboss.as.ee.component.ComponentDescription$DefaultComponentConfigurator.configure(ComponentDescription.java:606)
at org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:81)
... 6 more
17:25:05,914 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "VPlusGateway.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"VPlusGateway.war\".INSTALL" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"VPlusGateway.war\".INSTALL: Failed to process phase INSTALL of deployment \"VPlusGateway.war\""}}
17:25:08,164 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015877: Stopped deployment VPlusGateway.war in 2230ms
17:25:08,164 INFO [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report
These are my classes.
Interface: IAccountInformation
import javax.jws.WebMethod; import javax.jws.WebService; import javax.jws.soap.SOAPBinding; import javax.jws.soap.SOAPBinding.Style; import javax.jws.soap.SOAPBinding.Use; import javax.xml.ws.BindingType; @WebService @SOAPBinding(style=Style.DOCUMENT, use=Use.ENCODED) @BindingType(javax.xml.ws.soap.SOAPBinding.SOAP12HTTP_BINDING) public interface IAccountInformation { @WebMethod long sum(long a, long b); }
Class: AccountInformation
@WebService(endpointInterface="com.xxxx.ws.interfaces.IAccountInformation", serviceName="accountInformation") public class AccountInformation implements IAccountInformation { @Override public long sum(long a, long b) { return a+b; } }
And my xml files.
web.xml
<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0"> <display-name>VPlusGateway</display-name> <welcome-file-list> <welcome-file>index.html</welcome-file> <welcome-file>index.htm</welcome-file> <welcome-file>index.jsp</welcome-file> <welcome-file>default.html</welcome-file> <welcome-file>default.htm</welcome-file> <welcome-file>default.jsp</welcome-file> </welcome-file-list> <context-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:vPlusContext.xml</param-value> </context-param> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <servlet> <servlet-name>CXFServlet</servlet-name> <servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class> </servlet> <servlet-mapping> <servlet-name>CXFServlet</servlet-name> <url-pattern>/services/*</url-pattern> </servlet-mapping> </web-app>
vplusContext.xml
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws" xmlns:jaxrs="http://cxf.apache.org/jaxrs" xmlns:soap="http://cxf.apache.org/bindings/soap" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd http://cxf.apache.org/bindings/soap http://cxf.apache.org/schemas/configuration/soap.xsd http://cxf.apache.org/jaxrs http://cxf.apache.org/schemas/jaxrs.xsd"> <import resource="classpath:META-INF/cxf/cxf.xml" /> <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" /> <import resource="classpath:META-INF/cxf/cxf-servlet.xml" /> <!-- WSDL --> <jaxws:endpoint id="accountInfo" implementor="com.xxxx.ws.implement.AccountInformation" address="/wsdl/account"/> <!-- REST --> <jaxrs:server id="myService" address="/rest/a"> <jaxrs:serviceBeans> <ref bean="accountRS" /> </jaxrs:serviceBeans> </jaxrs:server> <bean id="accountRS" class="com.xxxx.ws.implement.AccountRS" /> </beans>
cxf-extension-soap.xml
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:foo="http://cxf.apache.org/configuration/foo" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"> <bean id="org.apache.cxf.binding.soap.SoapBindingFactory" class="org.apache.cxf.bus.spring.OldSpringSupport" lazy-init="true"> <constructor-arg ref="cxf" /> <constructor-arg value="org.apache.cxf.binding.soap.SoapBindingFactory" /> <constructor-arg value="cxf-extension-soap.xml" /> </bean> <bean id="org.apache.cxf.binding.soap.SoapTransportFactory" class="org.apache.cxf.bus.spring.OldSpringSupport" lazy-init="true"> <constructor-arg ref="cxf" /> <constructor-arg value="org.apache.cxf.binding.soap.SoapTransportFactory" /> </bean> <bean id="org.apache.cxf.binding.soap.customEditorConfigurer" class="org.springframework.beans.factory.config.CustomEditorConfigurer"> <property name="propertyEditorRegistrars"> <list> <bean class="org.apache.cxf.binding.soap.spring.SoapVersionRegistrar" /> </list> </property> </bean> </beans>
cxf-servlet.xml
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd"> </beans>
cfx.xml
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd"> <bean id="cxf" class="org.apache.cxf.bus.spring.SpringBus" destroy-method="shutdown" /> <bean id="org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor" class="org.apache.cxf.bus.spring.BusWiringBeanFactoryPostProcessor" /> <bean id="org.apache.cxf.bus.spring.Jsr250BeanPostProcessor" class="org.apache.cxf.bus.spring.Jsr250BeanPostProcessor" /> <bean id="org.apache.cxf.bus.spring.BusExtensionPostProcessor" class="org.apache.cxf.bus.spring.BusExtensionPostProcessor" /> </beans>
Please help me solve this problem.
Thansk you in advance.
PS. This application can run on JBOSS 6.x Final