I executed a JUnit Test on the services and there was no null pointer
Exception.
Also there is no constraint validation on the Entity. How can I make
the exception message more clear ??
Below the Code of the entity :
@Document(collection="transactions")
public class Transaction implements Serializable {
private static final long serialVersionUID = 4999532858364711856L;
@Id private ObjectId id;
@SuppressWarnings("unused")
private String strId;
@Indexed private ObjectId accountId;
@Indexed private ObjectId destTransactionId;
private String type;
private Date date;
private Double amount;
private String payee;
private String tags;
public Transaction() {
date = new Date();
}
public Transaction(String type, Date date, Double amount, String
payee) {
super();
this.type = type;
this.date = date;
this.amount = amount;
this.payee = payee;
}
public ObjectId getId() {
return id;
}
public void setId(ObjectId id) {
this.id = id;
}
public ObjectId getAccountId() {
return accountId;
}
public void setAccountId(ObjectId accountId) {
this.accountId = accountId;
}
public ObjectId getDestTransactionId() {
return destTransactionId;
}
public void setDestTransactionId(ObjectId destTransactionId) {
this.destTransactionId = destTransactionId;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public Date getDate() {
return date;
}
public void setDate(Date date) {
this.date = date;
}
public Double getAmount() {
return amount;
}
public void setAmount(Double amount) {
this.amount = amount;
}
public String getPayee() {
return payee;
}
public void setPayee(String payee) {
this.payee = payee;
}
public String getTags() {
return tags;
}
public void setTags(String tags) {
this.tags = tags;
}
public List<String> getSplitedTags() {
List<String> tagsList = null;
if(tags != null)
tagsList = Arrays.asList(tags.split(" "));
return tagsList == null ? new ArrayList<String>() : tagsList;
}
public String getStrId() {
return getId().toStringMongod();
}
public void setStrId(String strId) {
this.strId = strId;
}
}
On Sep 15, 8:02 am, Ashwin Desikan <[email protected]> wrote:
> Have u tried to override the onFailure and onviolation methods in ur
> Receiver? They give you better clarity on the error?
>
> Do u any constraints/ validation on the entity? If they are not met your
> request would fail
>
> Thanks
> Ashwin
>
> Sent from my iPhone
>
> On Sep 15, 2011, at 1:24 PM, POODevelopper <[email protected]> wrote:
>
>
>
>
>
>
>
> > Finally RequestFactory work with Spring back end, but I have another
> > issue : Is that i receive an exception on client when he process the
> > data, the server service is call but I get this exception on client.
>
> > Everything is set up correctly the Proxy Value Object, the Request
> > Object and the RequestFactory. I just can't determine the cause for
> > this exception it is making me crazy !!!
>
> > I tired to create a method on the service which return a simple String
> > and it work but for the complex type "GxpensesTransaction" no chance.
> > Below the exception I'm getting :
>
> > SEVERE: One or more exceptions caught, see full set in
> > UmbrellaException#getCauses
> > com.google.web.bindery.event.shared.UmbrellaException: One or more
> > exceptions caught, see full set in UmbrellaException#getCauses
> > at
> > com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext.fa
> > il(AbstractRequestContext.java:
> > 727)
> > at
> > com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext
> > $StandardPayloadDialect.processPayload(AbstractRequestContext.java:
> > 331)
> > at
> > com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext
> > $5.onTransportSuccess(AbstractRequestContext.java:1108)
> > at
> > com.google.web.bindery.requestfactory.gwt.client.DefaultRequestTransport
> > $1.onResponseReceived(DefaultRequestTransport.java:136)
> > at
> > com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:
> > 287)
> > at com.google.gwt.http.client.RequestBuilder
> > $1.onReadyStateChange(RequestBuilder.java:395)
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > at
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
> > 39)
> > at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
> > l.java:
> > 25)
> > at java.lang.reflect.Method.invoke(Method.java:597)
> > at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:
> > 103)
> > at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:
> > 71)
> > at
> > com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.jav
> > a:
> > 172)
> > at
> > com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingFo
> > rReturn(BrowserChannelServer.java:
> > 337)
> > at
> > com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChann
> > elServer.java:
> > 218)
> > at
> > com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:
> > 136)
> > at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:
> > 561)
> > at
> > com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:
> > 269)
> > at
> > com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.j
> > ava:
> > 91)
> > at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
> > at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:213)
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > at
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
> > 39)
> > at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
> > l.java:
> > 25)
> > at java.lang.reflect.Method.invoke(Method.java:597)
> > at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:
> > 103)
> > at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:
> > 71)
> > at
> > com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.jav
> > a:
> > 172)
> > at
> > com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChanne
> > lServer.java:
> > 292)
> > at
> > com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChan
> > nelServer.java:
> > 546)
> > at
> > com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java
> > :
> > 363)
> > at java.lang.Thread.run(Thread.java:680)
> > Caused by: java.lang.RuntimeException: Server Error: null
> > at
> > com.google.web.bindery.requestfactory.shared.Receiver.onFailure(Receiver.ja
> > va:
> > 44)
> > at org.gxpenses.client.activity.AccountActivity
> > $1.onFailure(AccountActivity.java:81)
> > at
> > com.google.web.bindery.requestfactory.shared.impl.AbstractRequest.onFail(Ab
> > stractRequest.java:
> > 118)
> > at
> > com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext.fa
> > il(AbstractRequestContext.java:
> > 707)
> > at
> > com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext
> > $StandardPayloadDialect.processPayload(AbstractRequestContext.java:
> > 331)
> > at
> > com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext
> > $5.onTransportSuccess(AbstractRequestContext.java:1108)
> > at
> > com.google.web.bindery.requestfactory.gwt.client.DefaultRequestTransport
> > $1.onResponseReceived(DefaultRequestTransport.java:136)
> > at
> > com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:
> > 287)
> > at com.google.gwt.http.client.RequestBuilder
> > $1.onReadyStateChange(RequestBuilder.java:395)
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > at
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
> > 39)
> > at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
> > l.java:
> > 25)
> > at java.lang.reflect.Method.invoke(Method.java:597)
> > at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:
> > 103)
> > at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:
> > 71)
> > at
> > com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.jav
> > a:
> > 172)
> > at
> > com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingFo
> > rReturn(BrowserChannelServer.java:
> > 337)
> > at
> > com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChann
> > elServer.java:
> > 218)
> > at
> > com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:
> > 136)
> > at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:
> > 561)
> > at
> > com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:
> > 269)
> > at
> > com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.j
> > ava:
> > 91)
> > at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
> > at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:213)
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > at
> > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
> > 39)
> > at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
> > l.java:
> > 25)
> > at java.lang.reflect.Method.invoke(Method.java:597)
> > at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:
> > 103)
> > at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:
> > 71)
> > at
> > com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.jav
> > a:
> > 172)
> > at
> > com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChanne
> > lServer.java:
> > 292)
> > at
> > com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChan
> > nelServer.java:
> > 546)
> > at
> > com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java
> > :
> > 363)
> > at java.lang.Thread.run(Thread.java:680)
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google Web Toolkit" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> > [email protected].
> > For more options, visit this group
> > athttp://groups.google.com/group/google-web-toolkit?hl=en.
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.