Thanks Gayan.

I think I need to replace the current version
with httpclient-4.2.3.wso2v1.jar. If yes, could you please let me know the
place where should I make the change. Because I am not sure which
dependency needs httpclient-4.1.1-wso2v1.jar. So I am not sure how should I
use this newer version instead of older.

Please find attached pom.xml for this project.

Thanks and Regards,
Swapnil

On Thu, Jun 18, 2015 at 5:05 PM, Gayan Gunarathne <gay...@wso2.com> wrote:

> Yeah. DefaultClientConnectionOperator is introduced after the 4.2
> version[1].
>
> I think you can use the latest lib[2].
>
> [1]
> http://hc.apache.org/httpcomponents-client-ga/httpclient/apidocs/org/apache/http/impl/conn/DefaultClientConnectionOperator.html
> [2]
> http://maven.wso2.org/nexus/content/groups/wso2-public/org/apache/httpcomponents/wso2/httpclient/4.2.3.wso2v1/
>
> Thanks,
> Gayan
>
> On Thu, Jun 18, 2015 at 10:01 PM, Swapnil Patil <swapnil.r...@gmail.com>
> wrote:
>
>> Hi All,
>>
>> I am trying to run AWS load balancer extension which is currently under
>> development. While creating AWS client I am getting exception
>> "java.lang.NoSuchMethodError:
>> org.apache.http.impl.conn.DefaultClientConnectionOperator.<init>(Lorg/apache/http/conn/scheme/SchemeRegistry;Lorg/apache/http/conn/DnsResolver;)V"
>>
>> This can be resolved if httpclient-4.2.jar is referenced instead of
>> httpclient-4.1.1-wso2v1.jar. Now the problem is in the lib folder of
>> extension (which is set as classpath) there are two different
>> jars httpclient-4.1.1-wso2v1.jar and httpclient-4.2.jar with different
>> versions. It seems first reference is made to httpclient-4.1.1-wso2v1.jar
>> which is why the exception. If I remove httpclient-4.1.1-wso2v1.jar from
>> classpath, the error gets resolved.
>>
>> So just wondering by which dependency httpclient-4.1.1-wso2v1.jar gets
>> added into lib folder? Do we have something like httpclient-4.2-wso2v1.jar
>> which will have classes corresponding to httpclient-4.2.jar, which can be
>> used? Or if there is any other solution to this?
>>
>> Thanks and Regards,
>> Swapnil
>>
>
>
>
> --
>
> Gayan Gunarathne
> Technical Lead, WSO2 Inc. (http://wso2.com)
> Committer & PMC Member, Apache Stratos
> email : gay...@wso2.com  | mobile : +94 766819985
>
>
>
<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Licensed to the Apache Software Foundation (ASF) under one
  ~ or more contributor license agreements.  See the NOTICE file
  ~ distributed with this work for additional information
  ~ regarding copyright ownership.  The ASF licenses this file
  ~ to you under the Apache License, Version 2.0 (the
  ~ "License"); you may not use this file except in compliance
  ~ with the License.  You may obtain a copy of the License at
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing,
  ~ software distributed under the License is distributed on an
  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  ~ KIND, either express or implied.  See the License for the
  ~ specific language governing permissions and limitations
  ~ under the License.
  -->

<project xmlns="http://maven.apache.org/POM/4.0.0"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd";>
  <modelVersion>4.0.0</modelVersion>
  
  <parent>
    <groupId>org.apache.stratos</groupId>
    <artifactId>stratos-load-balancer-extensions</artifactId>
    <version>4.1.0-SNAPSHOT</version>
  </parent>
  
  <artifactId>org.apache.stratos.aws.extension</artifactId>
  <name>Apache Stratos - AWS Extension</name>
  <description>Apache Stratos AWS Extension for Load Balancing</description>
  <dependencies>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <version>1.7.5</version>
        </dependency>
        <dependency>
            <groupId>org.apache.stratos</groupId>
            <artifactId>org.apache.stratos.common</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.stratos</groupId>
            <artifactId>org.apache.stratos.messaging</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.stratos</groupId>
            <artifactId>org.apache.stratos.load.balancer.extension.api</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
            <version>2.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.velocity</groupId>
            <artifactId>velocity</artifactId>
            <version>1.7</version>
        </dependency>
        <dependency>
            <groupId>org.wso2.andes.wso2</groupId>
            <artifactId>andes-client</artifactId>
            <version>0.13.wso2v8</version>
        </dependency>
        <dependency>
          <groupId>com.amazonaws</groupId>
          <artifactId>aws-java-sdk</artifactId>
          <version>1.8.8</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.4</version>
                <configuration>
                    <archive>
                        <manifest>
                            <mainClass>org.apache.stratos.aws.extension.Main</mainClass>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <descriptors>
                        <descriptor>src/main/assembly/bin.xml</descriptor>
                    </descriptors>
                    <archiverConfig>
                        <fileMode>420</fileMode>
                        <directoryMode>493</directoryMode>
                        <defaultDirectoryMode>493</defaultDirectoryMode>
                    </archiverConfig>
                    <appendAssemblyId>false</appendAssemblyId>
                </configuration>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>attached</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>

Reply via email to