Hello,
I get a ClassCastException with this code:
ds.xml:
Error:
Using 6.0p power 06.04.16
I get a ClassCastException with this code:
Code:
public void onModuleLoad() { VLayout vlayout = new VLayout(); final ListGrid countryGrid = new ListGrid() { @Override protected Canvas getExpansionComponent(final ListGridRecord record) { HLayout hlayout = new HLayout(); LayoutSpacer space = new LayoutSpacer(); space.setHeight(100); hlayout.addMember(space); VLayout layout = new VLayout(5); layout.setPadding(10); hlayout.addMember(layout); return hlayout; } }; countryGrid.setWidth(500); countryGrid.setHeight(300); countryGrid.setDataSource("schueler_table"); final ListGridField nameField = new ListGridField("f_name", "name", 50); final ListGridField vornameField = new ListGridField("f_vorname", "vorname"); final ListGridField gebDatumField = new ListGridField("f_geb_datum", "geb datum"); countryGrid.setFields(nameField, vornameField, gebDatumField); countryGrid.setAutoFetchData(false); final DSRequest prop = new DSRequest(DSOperationType.FETCH); prop.setOutputs("f_name,f_vorname,f_geb_datum,f_schueler_id"); countryGrid.setShowAllRecords(false); countryGrid.setShowFilterEditor(true); countryGrid.setCanEdit(false); countryGrid.setFilterOnKeypress(false); countryGrid.setCanExpandRecords(true); countryGrid.setCanExpandMultipleRecords(false); countryGrid.setWrapCells(true); countryGrid.setFixedRecordHeights(false); countryGrid.setCanHover(true); countryGrid.fetchData(null, null, prop); vlayout.addMember(countryGrid); IButton but = new IButton("filter"); but.addClickHandler(new ClickHandler() { @Override public void onClick(ClickEvent event) { countryGrid.setData(new ListGridRecord[]{}); //countryGrid.setDataSource("schueler_table"); //countryGrid.setFields(nameField, vornameField, gebDatumField); //countryGrid.setShowAllRecords(false); AdvancedCriteria ac = new AdvancedCriteria(OperatorId.AND, new Criterion[] { new Criterion("f_name", OperatorId.STARTS_WITH, "A") }); countryGrid.fetchData(ac, null, prop); } }); vlayout.addMember(but); vlayout.draw(); }
Code:
DataSource ID="schueler_table" serverType="sql" tableName="t_schueler"> <fields> <field name="f_name" type="ntext" /> <field name="f_vorname" type="ntext" /> <field name="f_geb_datum" type="date" /> </fields> </DataSource>
Code:
=== 2016-04-11 12:19:59,590 [c-10] DEBUG ISCKeyedObjectPool - Borrowing object for 'transaction' === 2016-04-11 12:19:59,590 [c-10] DEBUG PoolableDataSourceFactory - Tried to create DataSource of type 'transaction' but null was returned === 2016-04-11 12:19:59,590 [c-10] DEBUG PoolableDataSourceFactory - Created DataSource null of type 'transaction' in the pooling flow === 2016-04-11 12:19:59,590 [c-10] DEBUG ISCKeyedObjectPool - Borrowing object for 'Object' === 2016-04-11 12:19:59,590 [c-10] DEBUG PoolableDataSourceFactory - Created DataSource 661 of type 'Object' and assigned it to thread http-nio-8080-exec-10 === 2016-04-11 12:19:59,590 [c-10] DEBUG PoolableDataSourceFactory - Created DataSource 661 of type 'Object' in the pooling flow === 2016-04-11 12:19:59,590 [c-10] DEBUG PoolableDataSourceFactory - Activated DataSource 661 of type 'Object' === 2016-04-11 12:19:59,591 [c-10] DEBUG ISCKeyedObjectPool - Borrowing object for 'List' === 2016-04-11 12:19:59,591 [c-10] DEBUG PoolableDataSourceFactory - Created DataSource 662 of type 'List' and assigned it to thread http-nio-8080-exec-10 === 2016-04-11 12:19:59,591 [c-10] DEBUG PoolableDataSourceFactory - Created DataSource 662 of type 'List' in the pooling flow === 2016-04-11 12:19:59,591 [c-10] DEBUG PoolableDataSourceFactory - Activated DataSource 662 of type 'List' === 2016-04-11 12:19:59,591 [c-10] DEBUG ISCKeyedObjectPool - Borrowing object for 'elem' === 2016-04-11 12:19:59,591 [c-10] DEBUG PoolableDataSourceFactory - Tried to create DataSource of type 'elem' but null was returned === 2016-04-11 12:19:59,591 [c-10] DEBUG PoolableDataSourceFactory - Created DataSource null of type 'elem' in the pooling flow === 2016-04-11 12:19:59,591 [c-10] DEBUG RPCManager - Processing 1 requests. === 2016-04-11 12:19:59,592 [c-10] ERROR IDACall - Key[type=com.isomorphic.servlet.IDACall, annotation=[none]] - com.isomorphic.servlet.IDACall top-level exception java.lang.ClassCastException: org.apache.commons.collections.map.LinkedMap cannot be cast to java.lang.String at com.isomorphic.datasource.DSRequest.getOperation(DSRequest.java:856) at com.isomorphic.datasource.DSRequest.<init>(DSRequest.java:468) at com.isomorphic.datasource.DSRequest.<init>(DSRequest.java:661) at com.isomorphic.rpc.RPCManager.parseRequest(RPCManager.java:2308) at com.isomorphic.rpc.RPCManager.<init>(RPCManager.java:369) at com.isomorphic.rpc.RPCManager.<init>(RPCManager.java:349) at com.isomorphic.servlet.IDACall.processRequest(IDACall.java:147) at com.isomorphic.servlet.IDACall._processRequest(IDACall.java:119) at com.isomorphic.servlet.IDACall.doPost(IDACall.java:79) at javax.servlet.http.HttpServlet.service(HttpServlet.java:648) at com.isomorphic.servlet.BaseServlet.service(BaseServlet.java:162) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:263) at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:178) at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:62) at de.mks_infofabrik.kids.server.filter.GWTCacheControlFilter.doFilter(GWTCacheControlFilter.java:50) at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) at com.isomorphic.servlet.CompressionFilter._doFilter(CompressionFilter.java:260) at com.isomorphic.servlet.BaseFilter.doFilter(BaseFilter.java:88) at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118) at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:217) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1091) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:673) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745)
Comment