axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shameera Rathnayaka <shameerai...@gmail.com>
Subject Re: Build failure occur when i try run my own test class
Date Wed, 24 Aug 2011 07:07:11 GMT
On Wed, Aug 24, 2011 at 3:10 AM, Amila Manoj <amilamanoj@gmail.com> wrote:

> Hi Shameera,
>
> I'm not familiar with your test case, but it looks like a simple dependency
> missing issue.
> Try adding httpcore dependency to the POM of the module you are building.
> Eg:
> *<dependency>
>     <groupId>org.apache.httpcomponents</groupId>
>     <artifactId>httpcore</artifactId>
>     <version>4.1.3</version>
>     <scope>test</scope>
> </dependency>*
>
> Yes, after adding this dependency to the integration pom it solve the
exception but then it failed due to Assertion fail, then i encountered there
are two modules of addressing, sanpshot and another addressing module with
timestamp (i dont know how it happened) then i removed addressing module
with timestamp now it works fine.

Thanks Amila


>
> On Tue, Aug 23, 2011 at 6:01 PM, Shameera Rathnayaka <
> shameerainfo@gmail.com> wrote:
>
>> HI,
>> I wrote a test class and run it using mvn "-Dtest=EnumTest test" EnumTest
>> is my test class, but it failed giving following error , i refereed
>> LongRunningServiceTest.java to write my test class so i tried to build
>> LongRunningServiceTest  using -Dtest command but i got same result , as my
>> observation it failed when try to start the UtilServer . Even i built in top
>> level(in integration module) everything fine but it didn't run my EnumTest,
>> should i configure this testclass somewhere to run ?
>>
>>
>>
>> -------------------------------------------------------------------------------
>> Test set: org.apache.axis2.engine.EnumTest
>>
>> -------------------------------------------------------------------------------
>> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.571 sec
>> <<< FAILURE!
>> testEnum(org.apache.axis2.engine.EnumTest)  Time elapsed: 0.541 sec  <<<
>> ERROR!
>> java.lang.NoClassDefFoundError: org/apache/http/HttpResponseFactory
>>         at
>> org.apache.axis2.transport.http.SimpleHTTPServer.<init>(SimpleHTTPServer.java:76)
>>         at
>> org.apache.axis2.integration.UtilServer.start(UtilServer.java:78)
>>         at
>> org.apache.axis2.integration.UtilServer.start(UtilServer.java:70)
>>         at org.apache.axis2.engine.EnumTest.setUp(EnumTest.java:48)
>>         at junit.framework.TestCase.runBare(TestCase.java:132)
>>         at junit.framework.TestResult$1.protect(TestResult.java:110)
>>         at junit.framework.TestResult.runProtected(TestResult.java:128)
>>         at junit.framework.TestResult.run(TestResult.java:113)
>>         at junit.framework.TestCase.run(TestCase.java:124)
>>         at junit.framework.TestSuite.runTest(TestSuite.java:232)
>>         at junit.framework.TestSuite.run(TestSuite.java:227)
>>         at
>> org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:81)
>>         at
>> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
>>         at
>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
>>         at
>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:165)
>>         at org.apache.maven.surefire.Surefire.run(Surefire.java:107)
>>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>         at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>         at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>         at java.lang.reflect.Method.invoke(Method.java:597)
>>         at
>> org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:289)
>>         at
>> org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:993)
>> Caused by: java.lang.ClassNotFoundException:
>> org.apache.http.HttpResponseFactory
>>         at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
>>         at java.security.AccessController.doPrivileged(Native Method)
>>         at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
>>         at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
>>         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
>>         at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
>>         ... 22 more
>>
>>
>> --
>> Shameera Rathnayaka
>> Undergraduate
>> Department of Computer Science and Engineering
>> University of Moratuwa.
>> Sri Lanka.
>>
>>
>>
> --
> Regards,
> Amila Manoj
> blog: http://amilamanoj.blogspot.com/
>
>


-- 
Shameera Rathnayaka
Undergraduate
Department of Computer Science and Engineering
University of Moratuwa.
Sri Lanka.

Mime
View raw message