It's all about the answers!

Ask a question

Build Error due to ant classpath.


Aaron Cohen (8207851) | asked Dec 04 '12, 9:59 a.m.
JAZZ DEVELOPER
I get the following error when running a build which makes OSLC calls using Apache HTTP Client:
java.lang.NoSuchMethodError: org/apache/http/conn/ssl/SSLSocketFactory.<init>(Ljavax/net/ssl/SSLContext;Lorg/apache/http/conn/ssl/X509HostnameVerifier;)
Now this Ant Script runs fine when run locally outside of the Jazz Build Engine. I did a google search which led me to believe that the problem is due to an instance of the Apache Http Client library included in the Jazz Build Engine. Unfortunately setting includeantruntime="false" does not seem to be doing the trick.

Any advice would be greatly appreciated.

My Classpath:
<path id="com.ibm.swg.cip.data.classpath">
        <pathelement location="bin" />
        <pathelement location="libraries/db2jcc_license_cu.jar" />
        <pathelement location="libraries/db2jcc.jar" />
        <pathelement location="libraries/db2jcc4.jar" />
        <pathelement location="libraries/derby-10.8.2.2.jar" />
        <pathelement location="libraries/junit-4.10.jar" />
        <pathelement location="libraries/junit-dep-4.10.jar" />
        <pathelement location="libraries/NCSO.jar" />
        <pathelement location="libraries/commons-dbcp-1.4.jar" />
        <pathelement location="libraries/commons-lang3-3.1.jar" />
        <pathelement location="libraries/commons-pool-1.6.jar" />
        <pathelement location="libraries/fluent-hc-4.2.1.jar" />
        <pathelement location="libraries/httpclient-4.2.1.jar" />
        <pathelement location="libraries/httpclient-cache-4.2.1.jar" />
        <pathelement location="libraries/httpcore-4.2.1.jar" />
        <pathelement location="libraries/httpmime-4.2.1.jar" />
        <pathelement location="libraries/commons-io-2.4.jar" />
        <pathelement location="libraries/json-20090211.jar" />
        <pathelement location="libraries/commons-logging-1.1.1.jar" />
    </path>
The ant target where the exception is thrown:
<target name="AllTests" depends="build">
        <mkdir dir="${junit.output.dir}" />
        <junit fork="no" printsummary="withOutAndErr" includeantruntime="false">
            <formatter type="xml" />
            <test name="com.ibm.cip.swg.data.test.AllTests" outfile="result"/>
            <classpath refid="com.ibm.swg.cip.data.classpath" />
        </junit>
        <junitLogPublisher filepath="result.xml"  buildResultUUID="${buildResultUUID}" repositoryAddress="${repositoryAddress}" userId="${userId}" password="${password}" /> 

    </target>

Be the first one to answer this question!


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.