Hi,
I developed a SmartGWT application that works fine with jetty.
I need to load it in Tomcat, but when i try to login, the AsyncCallBack calls onFailure method with the exception below:
com.google.gwt.user.client.rpc.StatucCodeException: 500 Internal Server Error
Here is the login implementation:
I think it's not a serialization problem. Look the usuario object:
Maybe the problem is a bad tomcat configuration because the application works fine in jetty.
I developed a SmartGWT application that works fine with jetty.
I need to load it in Tomcat, but when i try to login, the AsyncCallBack calls onFailure method with the exception below:
com.google.gwt.user.client.rpc.StatucCodeException: 500 Internal Server Error
Here is the login implementation:
Code:
// Creating asynchronous callback for login
LoginServiceAsync loginService = GWT.create(LoginService.class);
loginService.login(usuario, new AsyncCallback<Void>() {
@Override
public void onSuccess(Void result) {
// Open dash board after login success
clientFactory.getPlaceController().goTo(new SentenceValidationPlace());
}
@Override
public void onFailure(Throwable caught) {
// Show message if fail
AppUtils.showMessageDialog(TipoMensagemDialog.ERROR, caught.toString());
}
});Code:
public class Usuario implements Serializable {
private Long id;
private String login;
private String pass;
private String name;
private Date activate_time;
private Date deactivate_time;
private Integer activated;
public Long getId() {
return id;
}
public Usuario() { }
public void setId(Long id) {
this.id = id;
}
public String getLogin() {
return login;
}
public void setLogin(String login) {
this.login = login;
}
public String getPass() {
return pass;
}
public void setPass(String pass) {
this.pass = pass;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Date getActivate_time() {
return activate_time;
}
public void setActivate_time(Date activate_time) {
this.activate_time = activate_time;
}
public Date getDeactivate_time() {
return deactivate_time;
}
public void setDeactivate_time(Date deactivate_time) {
this.deactivate_time = deactivate_time;
}
public Integer getActivated() {
return activated;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result
+ ((activate_time == null) ? 0 : activate_time.hashCode());
result = prime * result
+ ((activated == null) ? 0 : activated.hashCode());
result = prime * result
+ ((deactivate_time == null) ? 0 : deactivate_time.hashCode());
result = prime * result + ((id == null) ? 0 : id.hashCode());
result = prime * result + ((login == null) ? 0 : login.hashCode());
result = prime * result + ((name == null) ? 0 : name.hashCode());
result = prime * result + ((pass == null) ? 0 : pass.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
Usuario other = (Usuario) obj;
if (activate_time == null) {
if (other.activate_time != null)
return false;
} else if (!activate_time.equals(other.activate_time))
return false;
if (activated == null) {
if (other.activated != null)
return false;
} else if (!activated.equals(other.activated))
return false;
if (deactivate_time == null) {
if (other.deactivate_time != null)
return false;
} else if (!deactivate_time.equals(other.deactivate_time))
return false;
if (id == null) {
if (other.id != null)
return false;
} else if (!id.equals(other.id))
return false;
if (login == null) {
if (other.login != null)
return false;
} else if (!login.equals(other.login))
return false;
if (name == null) {
if (other.name != null)
return false;
} else if (!name.equals(other.name))
return false;
if (pass == null) {
if (other.pass != null)
return false;
} else if (!pass.equals(other.pass))
return false;
return true;
}
@Override
public String toString() {
return "Usuario [id=" + id + ", login=" + login + ", pass=" + pass
+ ", name=" + name + ", activate_time=" + activate_time
+ ", deactivate_time=" + deactivate_time + ", activated="
+ activated + "]";
}
public void setActivated(Integer activated) {
this.activated = activated;
}
}