Issue in retrieving data to grid from datalist using load binder

Confluence User - 11 Jul, 2017

Hi,I am having a form in which I want to load data to grid element from another datalist using grid data..It is showing system error while executing .PFB the load binder code I have used.

import org.joget.apps.form.model.*;
import org.joget.apps.form.service.*;
import java.sql.*;
import org.apache.commons.collections.SequencedHashMap;
import java.util.*;

public FormRowSet test() {
FormRowSet f = new FormRowSet();
f.setMultiRow(true);
Class.forName("com.mysql.jdbc.Driver").newInstance();
con = DriverManager.getConnection("jdbc:mysql://localhost:3307/jwdb?characterEncoding=UTF-8", "root","");

if(!con.isClosed()){
String sql = "SELECT * FROM app_fd_testmaster"; 
PreparedStatement stmt = con.prepareStatement(sql);
ResultSet rs = stmt.executeQuery();
  while (rs.next()) {
        FormRow r1 = new FormRow();
           
            r1.put("HIGH_RANGE", rs.getObject(6));
            r1.put("UNITS", rs.getObject(7));
            r1.put("TEST_NAME", rs.getObject(8));
              r1.put("LOW_RANGE", rs.getObject(11));
           
f.add(r1);
          // System.out.println(r1);
       }

}
return f;
}
return test();

 

 

 

 

 

This is the "System Error",I am getting.

formgrid

2


12 Jul, 2017
confluenceUser
confluenceUser

Hi, the code looks ok but there isn't enough info to help. The tomcat and joget logs should display the actual error. If I were to guess it will most likely be DB related, either a database connection, invalid query or resultset retrieval issue.

12 Jul, 2017
confluenceUser
confluenceUser

hi.I am attaching the console screenshots of this error

.

 

RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print