You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@tuscany.apache.org by Abraham Washington <ab...@yahoo.com> on 2008/07/28 23:19:12 UTC
das npe in PassByValueInterceptor
hi, i'm trying to get DAS to work for my service. i'm able to query and get results back no problem. below is my code for updating. if i take out the call to account.set(....), then the apply works (but there were no changes to the DataObject). with the account.set(...) call, the exception is thrown. ideas? thx abe
Command read = das.getCommand(
read.setParameter(1, Integer.valueOf(organizationId));
root = read.executeQuery();
DataObject account = root.getDataObject(
System.
account.set(
System.
das.applyChanges(root);"getAccountByID");"ACCOUNT[1]");out.println("accountName before change -> "+ account.getString("ACCOUNT_NAME"));"ACCOUNT_NAME", "TestAccount");out.println("apply changes...");
apply changes...Exception in thread "main" java.lang.NullPointerExceptionat org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.copyFault(
at org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke(
at org.apache.tuscany.sca.binding.sca.impl.SCABindingInvoker.invoke(
at org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke(
at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(
at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(
at $Proxy7.updateOrganization(Unknown Source)PassByValueInterceptor.java:125)PassByValueInterceptor.java:115)SCABindingInvoker.java:61)PassByValueInterceptor.java:108)JDKInvocationHandler.java:286)JDKInvocationHandler.java:154)
Re: das npe in PassByValueInterceptor
Posted by Jean Madson <je...@gmail.com>.
Can you put here all stack trace?
2008/7/28 Abraham Washington <ab...@yahoo.com>
> hi, i'm trying to get DAS to work for my service. i'm able to query and
> get results back no problem. below is my code for updating. if i take out
> the call to account.set(....), then the apply works (but there were no
> changes to the DataObject). with the account.set(...) call, the exception
> is thrown. ideas? thx abe
>
>
>
> Command read = das.getCommand(
> "getAccountByID");
>
> read.setParameter(1, Integer.*valueOf*(organizationId));
>
> root = read.executeQuery();
>
> DataObject account = root.getDataObject(
> "ACCOUNT[1]");
>
> System.
> *out*.println("accountName before change -> " + account.getString(
> "ACCOUNT_NAME"));
>
> account.set(
> "ACCOUNT_NAME", "TestAccount");
>
> System.
> *out*.println("apply changes...");
>
> das.applyChanges(root);
>
>
>
> apply changes...
>
> Exception in thread "main"
> *java.lang.NullPointerException*
>
> at
> org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.copyFault(
> *PassByValueInterceptor.java:125*)
>
> at
> org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke(
> *PassByValueInterceptor.java:115*)
>
> at org.apache.tuscany.sca.binding.sca.impl.SCABindingInvoker.invoke(
> *SCABindingInvoker.java:61*)
>
> at
> org.apache.tuscany.sca.core.databinding.wire.PassByValueInterceptor.invoke(
> *PassByValueInterceptor.java:108*)
>
> at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(
> *JDKInvocationHandler.java:286*)
>
> at org.apache.tuscany.sca.core.invocation.JDKInvocationHandler.invoke(
> *JDKInvocationHandler.java:154*)
>
> at $Proxy7.updateOrganization(Unknown Source)
>
>
>
>
>
>
>
>