Struts2 json model -


i following problems when enter action:

struts problem report

struts has detected unhandled exception:

messages:

 java.lang.reflect.invocationtargetexception   org.apache.struts2.json.jsonexception: java.lang.reflect.invocationtargetexception   org.apache.struts2.json.jsonexception:  org.apache.struts2.json.jsonexception: java.lang.reflect.invocationtargetexception 

file:

model/empresa.java line number: 34

//action

private static final long serialversionuid = 1l;  private sincronizaservice service = new sincronizaserviceimp();   //your result list   private list<sincroniza>      gridmodel;    //get how many rows want have grid - rownum attribute in grid   private integer             rows             = 0;    //get requested page. default grid sets 1.   private integer             page             = 0;    // sorting order - asc or desc   private string              sord;    // index row - i.e. user click sort.   private string              sidx;    // search field   private string              searchfield;    // search string   private string              searchstring;    // search operation ['eq','ne','lt','le','gt','ge','bw','bn','in','ni','ew','en','cn','nc']   private string              searchoper;    // total pages   private integer             total            = 0;    // record   private integer             records          = 0;   public string execute() throws exception   {      int = (rows * page);     int = - rows;       //count rows (select count(*) custumer)     records = 5;//custumerdao.count();      //your logic search , select required data.     gridmodel = service.lista();//custumerdao.find(from, to);      //calculate total pages query     total =(int) math.ceil((double)records / (double)rows);      return success;   }    public string getjson() throws exception   {     return execute();   }  public list<sincroniza> getgridmodel() {     return gridmodel; }  public void setgridmodel(list<sincroniza> gridmodel) {     this.gridmodel = gridmodel; }  public integer getrows() {     return rows; }  public void setrows(integer rows) {     this.rows = rows; }  public integer getpage() {     return page; }  public void setpage(integer page) {     this.page = page; }  public string getsord() {     return sord; }  public void setsord(string sord) {     this.sord = sord; }  public string getsidx() {     return sidx; }  public void setsidx(string sidx) {     this.sidx = sidx; }  public string getsearchfield() {     return searchfield; }  public void setsearchfield(string searchfield) {     this.searchfield = searchfield; }  public string getsearchstring() {     return searchstring; }  public void setsearchstring(string searchstring) {     this.searchstring = searchstring; }  public string getsearchoper() {     return searchoper; }  public void setsearchoper(string searchoper) {     this.searchoper = searchoper; }  public integer gettotal() {     return total; }  public void settotal(integer total) {     this.total = total; }  public integer getrecords() {     return records; }  public void setrecords(integer records) {     this.records = records; } 

//model

private static final long serialversionuid = 1l;  private integer idempresa; private string descripcion; private string abreviacion; private string alterno_id; private date fecha_alta; private date fecha_cambios; private date fecha_baja;  public empresa(int idempresa, string descripcion, string abreviacion,         string alterno_id, date fecha_alta, date fecha_cambios,         date fecha_baja) {     super();     this.idempresa = idempresa;     this.descripcion = descripcion;     this.abreviacion = abreviacion;     this.alterno_id = alterno_id;     this.fecha_alta = fecha_alta;     this.fecha_cambios = fecha_cambios;     this.fecha_baja = fecha_baja; }  public empresa(){}  public int getidempresa() {     return idempresa;//this line 34 } public void setidempresa(int idempresa) {     this.idempresa = idempresa; } public string getdescripcion() {     return descripcion; } public void setdescripcion(string descripcion) {     this.descripcion = descripcion; } public string getabreviacion() {     return abreviacion; } public void setabreviacion(string abreviacion) {     this.abreviacion = abreviacion; } public string getalterno_id() {     return alterno_id; } public void setalterno_id(string alterno_id) {     this.alterno_id = alterno_id; } public date getfecha_alta() {     return fecha_alta; } public void setfecha_alta(date fecha_alta) {     this.fecha_alta = fecha_alta; } public date getfecha_cambios() {     return fecha_cambios; } public void setfecha_cambios(date fecha_cambios) {     this.fecha_cambios = fecha_cambios; } public date getfecha_baja() {     return fecha_baja; } public void setfecha_baja(date fecha_baja) {     this.fecha_baja = fecha_baja; }    

//struts-action extends struts.xml

    <action name="irsincronizar" class="action.jsontable">         <result name="success" type="json">/prueba.jsp</result>     </action>        

//struts.xml

<constant name="struts.devmode" value="true"/> <constant name="struts.configuration.xml.reload" value="true"/>   <include file="struts-usuario.xml"/>  <include file="struts-navegacion.xml"/>   <package name="struts" extends="struts-default,tiles-default,json-default">  </package> 


Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -