Hi All,
Im getting the following runtime exception caused by an NPE when running
the ESB tests. This happens for all the test modules. There are no
compilation errors in any test module. Any idea why ?
Running TestSuite
ERROR
[org.wso2.carbon.automation.engine.testlisteners.TestExecutionListener] -
Execution error occurred in
TestExecutionListener:-[Ljava.lang.StackTraceElement;@19be4777
org.apache.maven.surefire.util.SurefireReflectionException:
java.lang.reflect.InvocationTargetException; nested exception is
java.lang.reflect.InvocationTargetException: null
java.lang.reflect.InvocationTargetException
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.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at
org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at
org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at
org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
at
org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
Caused by: java.lang.RuntimeException: Error on initializing test
environment
at
org.wso2.carbon.automation.engine.testlisteners.TestExecutionListener.handleException(TestExecutionListener.java:71)
at
org.wso2.carbon.automation.engine.testlisteners.TestExecutionListener.onExecutionStart(TestExecutionListener.java:52)
at org.testng.TestNG.runExecutionListeners(TestNG.java:1032)
at org.testng.TestNG.run(TestNG.java:983)
at
org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:178)
at
org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:92)
at
org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:96)
... 9 more
*Caused by: java.lang.NullPointerException*
at
org.wso2.carbon.automation.engine.context.DefaultInstance.getDefaultManager(DefaultInstance.java:110)
at
org.wso2.carbon.automation.engine.context.AutomationContext.<init>(AutomationContext.java:149)
at
org.wso2.carbon.automation.engine.testlisteners.TestExecutionListener.onExecutionStart(TestExecutionListener.java:41)
... 14 more
Thanks,
Jeewantha
On Tue, Feb 10, 2015 at 1:54 PM, Malintha Adikari <[email protected]> wrote:
> Hi Pasadi,
>
>
> According to the error log , Test Framework is trying to load a class
> (Axis2ServerExtension) but it can't find it. We register classes in
> automation.xml file which we expect to execute in various phases of test
> execution. If you look at your automation.xml "Listener Extensions"
> sections you may found you have registered this class.
>
> Please make sure *Axis2ServerExtension* class is inside the expected
> location.
>
> Regards,
> Malintha Adikari
>
> On Tue, Feb 10, 2015 at 8:03 AM, Saneth Dharmakeerthi <[email protected]>
> wrote:
>
>>
>> Hi Pasadi,
>>
>> Apologies and I misunderstood *Axis2ServerExtension* as a class in
>> *org.wso2.carbon.**automationutils.*
>> But
>> *org.wso2.esb.integration.common.extensions.axis2server.Axis2ServerExtension*
>> is in *modules/integration/test-common/extensions*
>>
>> so please add *test-common/extensions* as a dependency in all your
>> required test module pom files.
>>
>> <dependency>
>> <groupId>org.wso2.esb</groupId>
>> <artifactId>extensions</artifactId>
>> </dependency>
>>
>>
>> also the version should be the *$project.version* and the need to be
>> added to the root pom.
>>
>>
>>
>>
>> Thanks and Best Regards,
>>
>> Saneth Dharmakeerthi
>> Senior Software Engineer
>> WSO2, Inc.
>> Mobile: +94772325511
>>
>> On Tue, Feb 10, 2015 at 9:55 AM, Saneth Dharmakeerthi <[email protected]>
>> wrote:
>>
>>> HI Pasadi,
>>>
>>> Sorry, correct dependency for *Axis2ServerExtension *is as bellow
>>>
>>> <dependency>
>>> <groupId>org.wso2.carbon.automationutils</groupId>
>>> <artifactId>org.wso2.carbon.integration.common.extensions</artifactId>
>>> <version>${carbon.automationutils.version}</version>
>>> </dependency>
>>>
>>> <carbon.automationutils.version>4.3.0</carbon.automationutils.version>
>>>
>>>
>>> Thanks and Best Regards,
>>>
>>> Saneth Dharmakeerthi
>>> Senior Software Engineer
>>> WSO2, Inc.
>>> Mobile: +94772325511
>>>
>>> On Tue, Feb 10, 2015 at 9:51 AM, Saneth Dharmakeerthi <[email protected]>
>>> wrote:
>>>
>>>> HI Pasadi,
>>>>
>>>> Please verify the pom is updated correctly with integration
>>>> dependencies. *Axis2ServerExtension *is packed inside
>>>> org.wso2.carbon.*automation.extensions.
>>>> *Also refer the dev mail[1]
>>>>
>>>> <dependency>
>>>>
>>>> <groupId>org.wso2.carbon.automation</groupId>
>>>> <artifactId>org.wso2.carbon.automation.extensions</artifactId>
>>>> <version>${carbon.automation.version}</version>
>>>> </dependency>
>>>>
>>>> <carbon.automation.version>4.3.1</carbon.automation.version>
>>>>
>>>>
>>>> [1] [Dev] Automation dependencies to be updated in all products moving
>>>> with git
>>>>
>>>>
>>>>
>>>> Thanks and Best Regards,
>>>>
>>>> Saneth Dharmakeerthi
>>>> Senior Software Engineer
>>>> WSO2, Inc.
>>>> Mobile: +94772325511
>>>>
>>>> On Tue, Feb 10, 2015 at 9:32 AM, Pasadi Munasinghe <[email protected]>
>>>> wrote:
>>>>
>>>>> Hi,
>>>>> When I'm attempting to run the integration tests in product-esb using
>>>>> esb 4.9.0.-M7 pack, I'm getting the following error. This only occurs
>>>>> while
>>>>> running test cases , otherwise it is getting build successfully. Can
>>>>> anyone
>>>>> suggest a solution for this..?
>>>>> Stack Trace is as follows,
>>>>>
>>>>> Running TestSuite
>>>>> ERROR
>>>>> [org.wso2.carbon.automation.engine.testlisteners.TestExecutionListener] -
>>>>> Execution error occurred in
>>>>> TestExecutionListener:-[Ljava.lang.StackTraceElement;@7aae3364
>>>>> org.apache.maven.surefire.util.SurefireReflectionException:
>>>>> java.lang.reflect.InvocationTargetException; nested exception is
>>>>> java.lang.reflect.InvocationTargetException: null
>>>>> java.lang.reflect.InvocationTargetException
>>>>> 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.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
>>>>> at
>>>>> org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
>>>>> at
>>>>> org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
>>>>> at
>>>>> org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
>>>>> at
>>>>> org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)
>>>>> Caused by: java.lang.RuntimeException: Error on initializing test
>>>>> environment
>>>>> at
>>>>> org.wso2.carbon.automation.engine.testlisteners.TestExecutionListener.handleException(TestExecutionListener.java:71)
>>>>> at
>>>>> org.wso2.carbon.automation.engine.testlisteners.TestExecutionListener.onExecutionStart(TestExecutionListener.java:52)
>>>>> at org.testng.TestNG.runExecutionListeners(TestNG.java:1032)
>>>>> at org.testng.TestNG.run(TestNG.java:983)
>>>>> at
>>>>> org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:178)
>>>>> at
>>>>> org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:92)
>>>>> at
>>>>> org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:96)
>>>>> ... 9 more
>>>>> *Caused by: java.lang.ClassNotFoundException:
>>>>> org.wso2.esb.integration.common.extensions.axis2server.Axis2ServerExtension*
>>>>> 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)
>>>>> at java.lang.Class.forName0(Native Method)
>>>>> at java.lang.Class.forName(Class.java:169)
>>>>> at
>>>>> org.wso2.carbon.automation.engine.extensions.TestNGExtensionExecutor.initiate(TestNGExtensionExecutor.java:96)
>>>>> at
>>>>> org.wso2.carbon.automation.engine.testlisteners.TestExecutionListener.onExecutionStart(TestExecutionListener.java:46)
>>>>> ... 14 more
>>>>>
>>>>>
>>>>> Thanks,
>>>>> --
>>>>> Pasadi Munasinghe
>>>>> Software Engineer Intern
>>>>> WSO2, Inc
>>>>> Mobile: +9471 377 5515
>>>>>
>>>>> _______________________________________________
>>>>> Dev mailing list
>>>>> [email protected]
>>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>>
>>>>>
>>>>
>>>
>>
>> _______________________________________________
>> Dev mailing list
>> [email protected]
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> *Malintha Adikari*
> Software Engineer
> WSO2 Inc.; http://wso2.com
> lean.enterprise.middleware
>
> Mobile: +94 71 2312958
> Blog: http://malinthas.blogspot.com
> Page: http://about.me/malintha
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
--
Jeewantha Dharmaparakrama
Software Engineer; WSO2, Inc.; http://wso2.com/
Phone : (+94) 778403757
Blog: http://jeewanthad.blogspot.com/
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev