Results 1 to 2 of 2

Thread: How using Commons httpClient

  1. #1
    Join Date
    Oct 2007
    Location
    belarus
    Posts
    1

    Default How using Commons httpClient

    I have simple example of spring remote using http invokers.
    I want change it to use jakarta tomcat httpClient.
    This is my client.xml code
    Code:
    <?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:aop="http://www.springframework.org/schema/aop"
           xmlns:tx="http://www.springframework.org/schema/tx"
           xsi:schemaLocation="
           http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
           http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
           http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd">
    
    	<bean id="personServiceHttpInvokerProxy"
    		class="org.springframework.remoting.httpinvoker.HttpInvokerProxyFactoryBean">
    		<property name="serviceUrl"
    			value="http://localhost:8080/personservice/personservice/personService" />
    		<property name="serviceInterface"
    			value="com.personservice.service.PersonService" />
    		<property name="httpInvokerRequestExecutor">
    			<bean
    				class="org.springframework.remoting.httpinvoker.CommonsHttpInvokerRequestExecutor" />
    		</property>
    	</bean>
    And now, it is error:

    PHP Code:
    Caused byorg.springframework.beans.factory.BeanCreationExceptionError creating bean with name 'org.springframework.remoting.httpinvoker.CommonsHttpInvokerRequestExecutor#147ee05' defined in class path resource [client.xml]: Instantiation of bean failednested exception is java.lang.NoClassDefFoundErrororg/apache/commons/httpclient/HttpConnectionManager
    Caused by
    java.lang.NoClassDefFoundErrororg/apache/commons/httpclient/HttpConnectionManager 
    .

    Where is mistake? And should i change somthing in my server part?

    sorry for my english

  2. #2
    Join Date
    Nov 2006
    Location
    Germany
    Posts
    452

    Default

    Hello,

    do you have the commons-httpclient.jar file inside your classpath ?
    You need add least the version 3.0

    Have a look at the Javadoc for a greater explanation.
    http://www.springframework.org/docs/...tExecutor.html

    rgds
    agim

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •