I have commons-httpclient-2.0.2.jar in my classpath, but when trying to instantiate an HttpInvokerProxyFactoryBean from my BeanFactory, I get a NoClassDefFoundError complaining about org/apache/commons/httpclient/methods/RequestEntity (Introduced in httpclient v3).
Can anyone confirm that the CommonsHttpInvokerRequestExecutor is in fact compatible with httpclient 2.x, as stated in the Spring API Javadoc?
My Spring configuration is below:
The error stack trace is below:Code:<bean id="httpInvokerProxy" class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean"> <property name="serviceInterface"> <value>com.mycompany.TestService</value> </property> <property name="serviceUrl"> <value>http://localhost:8084/TestApp/remoting/TestService-httpinvoker</value> </property> <property name="httpInvokerRequestExecutor"> <bean class="org.springframework.remoting.httpinvoker.CommonsHttpInvokerRequestExecutor"/> </property> </bean>
Thanks for any tips.Code:org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'httpInvokerProxy' defined in resource loaded through SAX InputSource: Cannot create inner bean 'org.springframework.remoting.httpinvoker.CommonsHttpInvokerRequestExecutor#1f01a29' of type [org.springframework.remoting.httpinvoker.CommonsHttpInvokerRequestExecutor] while setting bean property 'httpInvokerRequestExecutor'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.remoting.httpinvoker.CommonsHttpInvokerRequestExecutor#1f01a29' defined in resource loaded through SAX InputSource: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: org/apache/commons/httpclient/methods/RequestEntity Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.remoting.httpinvoker.CommonsHttpInvokerRequestExecutor#1f01a29' defined in resource loaded through SAX InputSource: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: org/apache/commons/httpclient/methods/RequestEntity Caused by: java.lang.NoClassDefFoundError: org/apache/commons/httpclient/methods/RequestEntity


Reply With Quote