raahool_16@rediffmail.com
28 May 2009, 5:40 AM
Hello all,
I need your help in populating a Editable Grid which should be populated with the data fetched from a Database table.
I have already ended up with all the requirements to fetch data from a DB table (i.e. connecting to DB, query etc.). I am using Hibernate to carry out DB querying stuff and I am now trying to display the user record in a Grid and also if I modify something in the Grid the change should be reflect in the database too.
My initial code for doing this looks like this:
private final UserListServiceAsync service = (UserListServiceAsync) GWT.create(UserListService.class);
RpcProxy<BeanModel> proxy = new RpcProxy<BeanModel>(){
@Override
protected void load(Object loadConfig, AsyncCallback callback) {
service.getUsers(callback);
}
};
BeanModelReader reader = new BeanModelReader();
loader = new BaseListLoader(proxy, reader);
store = new ListStore(loader);
List<ColumnConfig> col = new ArrayList<ColumnConfig>();
ColumnConfig column = new ColumnConfig();
column.setId("username");
column.setHeader("User Name");
col.add(column);
column = new ColumnConfig();
column.setId("name");
column.setHeader("User Full Name");
col.add(column);
column = new ColumnConfig();
column.setId("email");
column.setHeader("Email");
column.setAlignment(HorizontalAlignment.CENTER);
col.add(column);
ColumnModel cm = new ColumnModel(col);
EditorGrid<BeanModel> grid = new EditorGrid<BeanModel>(store, cm);
and am ended up with Error like :
Compiling module com.duke.irb.IRBM
Compiling 5 permutations
Worker permutation 1 of 5
[ERROR] Unexpected internal compiler error
java.lang.StackOverflowError
at java.io.ObjectInputStream$PeekInputStream.peek(Unknown Source)
at java.io.ObjectInputStream$BlockDataInputStream.peek(Unknown Source)
at java.io.ObjectInputStream$BlockDataInputStream.peekByte(Unknown Source)
..............................
................................
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
at java.io.ObjectInputStream.readSerialData(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
[ERROR] Unrecoverable exception, shutting down
com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries)
at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.logAndTranslateException(JavaToJavaScriptCompiler.java:610)
at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.compilePermutation(JavaToJavaScriptCompiler.java:207)
at com.google.gwt.dev.CompilePerms.compile(CompilePerms.java:181)
at com.google.gwt.dev.ThreadedPermutationWorkerFactory$ThreadedPermutationWorker.compile(ThreadedPermutationWorkerFactory.java:47)
at com.google.gwt.dev.PermutationWorkerFactory$Manager$WorkerThread.run(PermutationWorkerFactory.java:72)
at java.lang.Thread.run(Unknown Source)
[ERROR] Not all permutation were compiled , completed (1/5)
If any one can put a stepwise hint to make my work done, it will be a great great help.
Thanks in advance.
Raul
I need your help in populating a Editable Grid which should be populated with the data fetched from a Database table.
I have already ended up with all the requirements to fetch data from a DB table (i.e. connecting to DB, query etc.). I am using Hibernate to carry out DB querying stuff and I am now trying to display the user record in a Grid and also if I modify something in the Grid the change should be reflect in the database too.
My initial code for doing this looks like this:
private final UserListServiceAsync service = (UserListServiceAsync) GWT.create(UserListService.class);
RpcProxy<BeanModel> proxy = new RpcProxy<BeanModel>(){
@Override
protected void load(Object loadConfig, AsyncCallback callback) {
service.getUsers(callback);
}
};
BeanModelReader reader = new BeanModelReader();
loader = new BaseListLoader(proxy, reader);
store = new ListStore(loader);
List<ColumnConfig> col = new ArrayList<ColumnConfig>();
ColumnConfig column = new ColumnConfig();
column.setId("username");
column.setHeader("User Name");
col.add(column);
column = new ColumnConfig();
column.setId("name");
column.setHeader("User Full Name");
col.add(column);
column = new ColumnConfig();
column.setId("email");
column.setHeader("Email");
column.setAlignment(HorizontalAlignment.CENTER);
col.add(column);
ColumnModel cm = new ColumnModel(col);
EditorGrid<BeanModel> grid = new EditorGrid<BeanModel>(store, cm);
and am ended up with Error like :
Compiling module com.duke.irb.IRBM
Compiling 5 permutations
Worker permutation 1 of 5
[ERROR] Unexpected internal compiler error
java.lang.StackOverflowError
at java.io.ObjectInputStream$PeekInputStream.peek(Unknown Source)
at java.io.ObjectInputStream$BlockDataInputStream.peek(Unknown Source)
at java.io.ObjectInputStream$BlockDataInputStream.peekByte(Unknown Source)
..............................
................................
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
at java.io.ObjectInputStream.readSerialData(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
[ERROR] Unrecoverable exception, shutting down
com.google.gwt.core.ext.UnableToCompleteException: (see previous log entries)
at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.logAndTranslateException(JavaToJavaScriptCompiler.java:610)
at com.google.gwt.dev.jjs.JavaToJavaScriptCompiler.compilePermutation(JavaToJavaScriptCompiler.java:207)
at com.google.gwt.dev.CompilePerms.compile(CompilePerms.java:181)
at com.google.gwt.dev.ThreadedPermutationWorkerFactory$ThreadedPermutationWorker.compile(ThreadedPermutationWorkerFactory.java:47)
at com.google.gwt.dev.PermutationWorkerFactory$Manager$WorkerThread.run(PermutationWorkerFactory.java:72)
at java.lang.Thread.run(Unknown Source)
[ERROR] Not all permutation were compiled , completed (1/5)
If any one can put a stepwise hint to make my work done, it will be a great great help.
Thanks in advance.
Raul