Spring 2.5.1 and Xfire 1.2.6 - NoSuchMethodError: <init>
Trying to integrate Spring 2.5.5 with Xfire 1.2.6, I am trying to inject one of my beans into my service, but it fails to initialize in the following exception:
java.lang.NoSuchMethodError: <init>
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:420)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:357)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:763)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
Truncated. see log file for complete stacktrace
I get this as soon as I submit my first service request via SoapUI. I've been searching the web for years and struggling with this and I would love to help :)
Here is my web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/spring/datasourceContext.xml
/WEB-INF/spring/applicationContext.xml
classpath:org/codehaus/xfire/spring/xfire.xml
</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<listener>
<listener-class>com.moo.app.util.appWSEnvLifeCycleListener</listener-class>
</listener>
<servlet>
<servlet-name>xfire</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml</param-value>
</init-param>
<init-param>
<param-name>debug</param-name>
<param-value>3</param-value>
</init-param>
<init-param>
<param-name>detail</param-name>
<param-value>3</param-value>
</init-param>
<load-on-startup>0</load-on-startup>
</servlet>
<servlet>
<servlet-name>LogFile</servlet-name>
<servlet-class>com.moo.app.dashboard.servlet.LogFileServlet</servlet-class>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>xfire</servlet-name>
<url-pattern>/services/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>LogFile</servlet-name>
<url-pattern>*.zip</url-pattern>
</servlet-mapping>
<mime-mapping>
<extension>zip</extension>
<mime-type>application/zip</mime-type>
</mime-mapping>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
<!-- Struts Tag Library Descriptors -->
<jsp-config>
<taglib>
<taglib-uri>/tags/struts-bean</taglib-uri>
<taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/tags/struts-html</taglib-uri>
<taglib-location>/WEB-INF/struts-html.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/tags/struts-logic</taglib-uri>
<taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/tags/struts-nested</taglib-uri>
<taglib-location>/WEB-INF/struts-nested.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/tags/struts-tiles</taglib-uri>
<taglib-location>/WEB-INF/struts-tiles.tld</taglib-location>
</taglib>
</jsp-config>
</web-app>
and my applicationContext.xml:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">
<bean id="app.TransactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="appDataSource" />
</bean>
<bean id="app.TxProxyTemplate"
class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean"
abstract="true">
<property name="transactionManager" ref="app.TransactionManager" />
<property name="transactionAttributes">
<props>
<prop key="save*">PROPAGATION_REQUIRED</prop>
<prop key="create*">PROPAGATION_SUPPORTS</prop>
<prop key="update*">PROPAGATION_SUPPORTS</prop>
<prop key="*">PROPAGATION_SUPPORTS,readOnly</prop>
</props>
</property>
</bean>
<bean id="app.BaseappDAO" class="com.moo.app.app.data.BaseappDAO" abstract="true">
<property name="dataSource" ref="appDataSource" />
</bean>
<bean id="app.MembershipDetailsDAO" class="com.moo.app.app.data.MembershipDetailsDAOImpl"
parent="app.BaseappDAO">
</bean>
<bean id="app.MembershipDetails" class="com.moo.app.app.data.MembershipDetailsServiceImpl">
<property name="membershipDetailsDAO" ref="app.MembershipDetailsDAO" />
</bean>
<bean id="app.appService" class="com.moo.app.app">
<property name="membershipDetailsService" ref="app.MembershipDetails" />
</bean>
</beans>
and finally my xfire-servlet.xml:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd">
<bean class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
<property name="urlMap">
<map>
<entry key="/services/app/">
<ref bean="app.appService"/>
</entry>
</map>
</property>
</bean>
<!-- Declare a parent bean with all properties common to both services -->
<bean id="echo" class="org.codehaus.xfire.spring.remoting.XFireExporter">
<property name="serviceFactory">
<ref bean="xfire.serviceFactory"/>
</property>
<property name="xfire">
<ref bean="xfire"/>
</property>
<property name="serviceBean">
<ref bean="app.appService"/>
</property>
<property name="serviceClass">
<value>com.moo.app.app.appService</value>
</property>
</bean>
</beans>
Not sure why this is happening. The JARs I am using are as follows:
- activation-1.1.jar
- app-SNAPSHOT.jar
- Commons-beanutils-1.7.0.jar
- Commons-codec-1.3.jar
- Commons-collections.jar
- Commons-digester.jar
- Commons-fileupload.jar
- Commons-httpclient-3.0.1.jar
- Commons-lang.jar
- General-logging 1.0.4.jar
- Commons-logging api-1.0.jar
- Common-validator.jar
- jaxen-1,1-beta-9.jar
- Jaxws-api-2.0.jar
- JDOM-1.0.jar
- jsr173_api-1.0.jar
- log4j-1.2.12.jar
- ojdbc14.jar
- Saaj-api-1.3.jar
- Saaj-osusch-1.3.jar
- spring-webmvc-1.2.6.jar
- spring.2.5.1.jar
- spacers-legacy.jar
- struts.jar
- wsdl4j-1.6.1.jar
- wstx-ASL-3.2.0.jar
- xbean- spring -2.8.jar
- Xfire-aegis-1.2.6.jar
- Xfire-annotations-1.2.6.jar
- Xfire-core-1.2.6.jar
- XFire-java5-1.2.6.jar
- XFire-JAXWS-1.2.6.jar
- XFire-jsr181-api-1.0-M1.jar
- xfire- spring -1.2.6.jar
- XmlSchema-1.1.jar
I am deploying this to Weblogic 8.2 as a WAR file.
Any help would be greatly appreciated.
+2
source to share