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 <
ashwin.desi...@gmail.com> 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
>
> > com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChanne lServer.java:
> > 292)
> > at
> > com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChan nelServer.java:
> > com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChanne lServer.java:
> > 292)
> > at
> > com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChan nelServer.java: