I am trying to write a test which cover a admin service method which uses
registry API and ended up with this. So I am not sure if client/server
 definition is valid here.

In any case NPE should not be thrown. May be you need to throw a proper
error.

Rajika

On Wed, Apr 18, 2012 at 10:00 PM, Senaka Fernando <[email protected]> wrote:

> Hi Rajika,
>
> Transaction.init needs to be called before you can do the required checks.
> This is also mentioned in the documentation. Generally the init will be
> called at server start-up (Within the server I mean). But, an integration
> test is a client (not a server), and this is not supposed to be used.
> That's why it produces an NPE.
>
> Thanks,
> Senaka.
>
> On Wed, Apr 18, 2012 at 4:05 PM, Rajika Kumarasiri <[email protected]>wrote:
>
>> Caused by: java.lang.AssertionError: Deploying proxy failed!
>> at org.testng.Assert.fail(Assert.java:78)
>> at
>> org.wso2.csg.integration.tests.ProxyAdminServiceTestCase.testProxyOperations(ProxyAdminServiceTestCase.java:115)
>>  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.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:80)
>> at org.testng.internal.Invoker.invokeMethod(Invoker.java:673)
>>  ... 29 more
>> Caused by: java.lang.NullPointerException
>> at
>> org.wso2.carbon.registry.core.jdbc.utils.Transaction.isStarted(Transaction.java:70)
>>  at
>> org.wso2.csg.integration.tests.CSGIntegrationTestCase.persistIntoRegistry(CSGIntegrationTestCase.java:145)
>> at
>> org.wso2.csg.integration.tests.ProxyAdminServiceTestCase.testProxyOperations(ProxyAdminServiceTestCase.java:112)
>>
>>
>> _______________________________________________
>> Dev mailing list
>> [email protected]
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
> *Senaka Fernando*
> Product Manager - WSO2 Governance Registry;
> Associate Technical Lead; WSO2 Inc.; http://wso2.com*
> Member; Apache Software Foundation; http://apache.org
>
> E-mail: senaka AT wso2.com
> **P: +1 408 754 7388; ext: 51736*; *M: +94 77 322 1818
> Linked-In: http://linkedin.com/in/senakafernando
>
> *Lean . Enterprise . Middleware
>
>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to