Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » scout » Eclipse Scout TableField NullpointerException on AbstractProposalColumn
Eclipse Scout TableField NullpointerException on AbstractProposalColumn [message #1770395] Thu, 10 August 2017 16:38 Go to next message
Corrado Parisi is currently offline Corrado ParisiFriend
Messages: 30
Registered: September 2016
Member
I have a Scout Form containing a TableField with 3 AbstractStringColumns and one AbstractProposalColumn<String>. All four fields are configured editable and mandatory. With a menu I can add an empty row and then fill data with the provided cell editors. When entering in the proposal column I get the proposals and select one. Now, when I try to leave this cell (either with tab, or clicking on s.th. else) I get a ProcessingError on the client and a NullPointerException on the server.

The StringColumns don't produce this error. Only on exit of the proposal field the exceptions occur.

Here is a working example with github source code:
https://scout.bsi-software.com/widgets/?dl=widget-tablefield

Github source:
https://github.com/BSI-Business-Systems-Integration-AG/org.eclipse.scout.docs/blob/14be0edea91c5cd8af2d60e72c5fb33362a583b0/code/widgets/org.eclipse.scout.widgets.client/src/main/java/org/eclipse/scout/widgets/client/ui/forms/TableFieldForm.java

I currently don't see what I am doing different. Maybe it is the listener? In the example they always use the "AbstractProposalField2", I don't know why.

Server trace:

2017-08-10 18:26:52,551 ERROR [qtp1168019749-17] org.eclipse.scout.rt.platform.exception.ExceptionHandler.handleThrowable(ExceptionHandler.java:121) - NullPointerException:n/a - MDC[principal=paco, cid=vg4fa9Re6tn/16]
java.lang.NullPointerException: null
	at java.util.ArrayList.<init>(ArrayList.java:177)
	at org.eclipse.scout.rt.server.services.lookup.BatchLookupService.getBatchDataByKey(BatchLookupService.java:40)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.scout.rt.shared.servicetunnel.ServiceUtility.invoke(ServiceUtility.java:54)
	at org.eclipse.scout.rt.server.ServiceOperationInvoker.invokeInternal(ServiceOperationInvoker.java:101)
	at org.eclipse.scout.rt.server.ServiceOperationInvoker$1.call(ServiceOperationInvoker.java:62)
	at org.eclipse.scout.rt.server.ServiceOperationInvoker$1.call(ServiceOperationInvoker.java:1)
	at org.eclipse.scout.rt.platform.chain.callable.CallableChain$Chain.continueChain(CallableChain.java:185)
	at org.eclipse.scout.rt.server.context.TransactionProcessor.runTxRequiresNew(TransactionProcessor.java:80)
	at org.eclipse.scout.rt.server.context.TransactionProcessor.intercept(TransactionProcessor.java:55)
	at org.eclipse.scout.rt.platform.chain.callable.CallableChain$Chain.continueChain(CallableChain.java:180)
	at org.eclipse.scout.rt.platform.chain.callable.CallableChain.call(CallableChain.java:135)
	at org.eclipse.scout.rt.platform.context.RunContext.call(RunContext.java:121)
	at org.eclipse.scout.rt.server.ServiceOperationInvoker.invoke(ServiceOperationInvoker.java:58)
	at org.eclipse.scout.rt.server.ServiceTunnelServlet.invokeService(ServiceTunnelServlet.java:202)
	at org.eclipse.scout.rt.server.ServiceTunnelServlet.doPost(ServiceTunnelServlet.java:158)
	at org.eclipse.scout.rt.server.ServiceTunnelServlet$2.run(ServiceTunnelServlet.java:118)
	at org.eclipse.scout.rt.platform.util.concurrent.Callables$1.call(Callables.java:37)
	at org.eclipse.scout.rt.platform.util.concurrent.Callables$1.call(Callables.java:1)
	at org.eclipse.scout.rt.platform.chain.callable.CallableChain$Chain.continueChain(CallableChain.java:185)
	at org.eclipse.scout.rt.platform.chain.callable.CallableChain.call(CallableChain.java:135)
	at org.eclipse.scout.rt.platform.context.RunContext.call(RunContext.java:121)
	at org.eclipse.scout.rt.platform.context.RunContext.run(RunContext.java:87)
	at org.eclipse.scout.rt.server.ServiceTunnelServlet.doPost(ServiceTunnelServlet.java:114)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:808)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
	at org.eclipse.scout.rt.server.commons.authentication.ServletFilterHelper$1.run(ServletFilterHelper.java:161)
	at java.security.AccessController.doPrivileged(Native Method)
	at javax.security.auth.Subject.doAs(Subject.java:422)
	at org.eclipse.scout.rt.server.commons.authentication.ServletFilterHelper.continueChainAsSubject(ServletFilterHelper.java:155)
	at org.eclipse.scout.rt.server.commons.authentication.ServiceTunnelAccessTokenAccessController.handle(ServiceTunnelAccessTokenAccessController.java:90)
	at com.company.application.scout.server.ServerServletFilter.doFilter(ServerServletFilter.java:50)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
	at org.eclipse.jetty.server.Server.handle(Server.java:499)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
	at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
	at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
	at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
	at java.lang.Thread.run(Thread.java:745)



Client (UI) trace:

2017-08-10 18:26:52,591 ERROR [scout-model-thread-20 Processing JSON request] org.eclipse.scout.rt.platform.exception.ExceptionHandler -  - MDC[principal=paco, httpUri=/json, uiSession=1:ov8437us13v8p47mbm81ugnlr5, clientSession=1e54ec53-5f20-4e33-86c2-559553db2861, jobName=Processing JSON request, cid=vg4fa9Re6tn/16]
org.eclipse.scout.rt.platform.exception.ProcessingException: Processing error [severity=ERROR, user=paco, remote-service.name=org.eclipse.scout.rt.shared.services.lookup.IServerBatchLookupService, remote-service.operation=getBatchDataByKey]
	at org.eclipse.scout.rt.shared.servicetunnel.AbstractServiceTunnel.invokeService(AbstractServiceTunnel.java:68)
	at org.eclipse.scout.rt.shared.servicetunnel.AbstractServiceTunnel.invokeService(AbstractServiceTunnel.java:44)
	at org.eclipse.scout.rt.shared.servicetunnel.http.HttpServiceTunnel.invokeService(HttpServiceTunnel.java:208)
	at org.eclipse.scout.rt.shared.servicetunnel.ServiceTunnelProxyProducer.invoke(ServiceTunnelProxyProducer.java:43)
	at org.eclipse.scout.rt.platform.interceptor.DecoratingProxy.invokeImpl(DecoratingProxy.java:134)
	at org.eclipse.scout.rt.platform.interceptor.DecoratingProxy$P_InvocationHandler.invoke(DecoratingProxy.java:172)
	at com.sun.proxy.$Proxy40.getBatchDataByKey(Unknown Source)
	at org.eclipse.scout.rt.client.services.lookup.BatchLookupServiceClientProxy.getBatchDataByKey(BatchLookupServiceClientProxy.java:59)
	at org.eclipse.scout.rt.client.ui.basic.table.columns.AbstractContentAssistColumn.updateDisplayTexts(AbstractContentAssistColumn.java:282)
	at org.eclipse.scout.rt.client.ui.basic.table.AbstractTable.applyRowValueChanges(AbstractTable.java:3687)
	at org.eclipse.scout.rt.client.ui.basic.table.AbstractTable.processDecorationBuffer(AbstractTable.java:3650)
	at org.eclipse.scout.rt.client.ui.basic.table.AbstractTable.setTableChanging(AbstractTable.java:1609)
	at org.eclipse.scout.rt.client.ui.basic.table.AbstractTable.updateRows(AbstractTable.java:2197)
	at org.eclipse.scout.rt.client.ui.basic.table.AbstractTable.updateRow(AbstractTable.java:2137)
	at org.eclipse.scout.rt.client.ui.basic.table.internal.InternalTableRow.setRowChanging(InternalTableRow.java:242)
	at org.eclipse.scout.rt.client.ui.basic.table.internal.InternalTableRow.cellChanged(InternalTableRow.java:458)
	at org.eclipse.scout.rt.client.ui.basic.cell.Cell.notifyObserver(Cell.java:405)
	at org.eclipse.scout.rt.client.ui.basic.cell.Cell.setValue(Cell.java:125)
	at org.eclipse.scout.rt.client.ui.basic.table.internal.InternalTableRow.setCellValue(InternalTableRow.java:261)
	at org.eclipse.scout.rt.client.ui.basic.table.columns.AbstractColumn.setValue(AbstractColumn.java:1134)
	at org.eclipse.scout.rt.client.ui.basic.table.columns.AbstractColumn.parseValueAndSet(AbstractColumn.java:1471)
	at org.eclipse.scout.rt.client.ui.basic.table.columns.AbstractColumn.editorValueToCell(AbstractColumn.java:697)
	at org.eclipse.scout.rt.client.ui.basic.table.columns.AbstractColumn.execCompleteEdit(AbstractColumn.java:671)
	at org.eclipse.scout.rt.client.ui.basic.table.columns.AbstractColumn$LocalColumnExtension.execCompleteEdit(AbstractColumn.java:1951)
	at org.eclipse.scout.rt.client.extension.ui.basic.table.columns.ColumnChains$ColumnCompleteEditChain$1.callMethod(ColumnChains.java:44)
	at org.eclipse.scout.rt.client.extension.ui.basic.table.columns.ColumnChains$ColumnCompleteEditChain$1.callMethod(ColumnChains.java:1)
	at org.eclipse.scout.rt.shared.extension.AbstractExtensionChain.callChain(AbstractExtensionChain.java:121)
	at org.eclipse.scout.rt.client.extension.ui.basic.table.columns.ColumnChains$ColumnCompleteEditChain.execCompleteEdit(ColumnChains.java:47)
	at org.eclipse.scout.rt.client.ui.basic.table.columns.AbstractColumn.interceptCompleteEdit(AbstractColumn.java:1994)
	at org.eclipse.scout.rt.client.ui.basic.table.columns.AbstractColumn.completeEdit(AbstractColumn.java:1590)
	at org.eclipse.scout.rt.client.ui.basic.table.AbstractTable$P_TableUIFacade.completeCellEditFromUI(AbstractTable.java:4622)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.scout.rt.client.ModelContextProxy$1$1.call(ModelContextProxy.java:60)
	at org.eclipse.scout.rt.platform.chain.callable.CallableChain$Chain.continueChain(CallableChain.java:185)
	at org.eclipse.scout.rt.platform.chain.callable.CallableChain.call(CallableChain.java:135)
	at org.eclipse.scout.rt.platform.context.RunContext.call(RunContext.java:121)
	at org.eclipse.scout.rt.client.ModelContextProxy$1.invoke(ModelContextProxy.java:56)
	at com.sun.proxy.$Proxy23.completeCellEditFromUI(Unknown Source)
	at org.eclipse.scout.rt.ui.html.json.table.JsonTable.handleUiCompleteCellEdit(JsonTable.java:745)
	at org.eclipse.scout.rt.ui.html.json.table.JsonTable.handleUiEvent(JsonTable.java:503)
	at org.eclipse.scout.rt.ui.html.json.JsonEventProcessor.processEvent(JsonEventProcessor.java:52)
	at org.eclipse.scout.rt.ui.html.json.JsonEventProcessor.processEvents(JsonEventProcessor.java:37)
	at org.eclipse.scout.rt.ui.html.UiSession.processJsonRequestInternal(UiSession.java:666)
	at org.eclipse.scout.rt.ui.html.UiSession$4.run(UiSession.java:597)
	at org.eclipse.scout.rt.platform.util.concurrent.Callables$1.call(Callables.java:37)
	at org.eclipse.scout.rt.platform.util.concurrent.Callables$1.call(Callables.java:1)
	at org.eclipse.scout.rt.platform.chain.callable.CallableChain$Chain.continueChain(CallableChain.java:185)
	at org.eclipse.scout.rt.platform.job.internal.ExceptionProcessor.intercept(ExceptionProcessor.java:41)
	at org.eclipse.scout.rt.platform.chain.callable.CallableChain$Chain.continueChain(CallableChain.java:180)
	at org.eclipse.scout.rt.platform.context.RunContextRunner$1.call(RunContextRunner.java:42)
	at org.eclipse.scout.rt.platform.chain.callable.CallableChain$Chain.continueChain(CallableChain.java:185)
	at org.eclipse.scout.rt.platform.chain.callable.CallableChain.call(CallableChain.java:135)
	at org.eclipse.scout.rt.platform.context.RunContext.call(RunContext.java:121)
	at org.eclipse.scout.rt.platform.context.RunContextRunner.intercept(RunContextRunner.java:38)
	at org.eclipse.scout.rt.platform.chain.callable.CallableChain$Chain.continueChain(CallableChain.java:180)
	at org.eclipse.scout.rt.platform.chain.callable.CallableChain.call(CallableChain.java:135)
	at org.eclipse.scout.rt.platform.job.internal.JobFutureTask$1.call(JobFutureTask.java:100)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at org.eclipse.scout.rt.platform.job.internal.JobFutureTask.run(JobFutureTask.java:160)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
	at org.eclipse.scout.rt.platform.job.internal.NamedThreadFactory$1.run(NamedThreadFactory.java:54)
Re: Eclipse Scout TableField NullpointerException on AbstractProposalColumn [message #1770741 is a reply to message #1770395] Wed, 16 August 2017 15:59 Go to previous message
Paolo Bazzi is currently offline Paolo BazziFriend
Messages: 17
Registered: January 2017
Junior Member
Hi Corrado

Could you post a snippet of your form causing this exception?

Corrado Parisi wrote on Thu, 10 August 2017 16:38
I currently don't see what I am doing different. Maybe it is the listener? In the example they always use the "AbstractProposalField2", I don't know why.


The SmartField and Proposal Field was re-implemented with the latest Scout 7.0.100 build. With 7.0 both the old- and new implementation is available in the code, in future we will remove the old implementation and rename the new field to SmartField.
See release notes for details: https://eclipsescout.github.io/7.0/release-notes.html#new-smart-field-ismartfield2-since-7-0-100
At the moment we suggest to use the old SmartField and ProposalField implementations until the new implementation is completely finalized and bugs are fixed ;)

Regards,
Paolo

[Updated on: Wed, 16 August 2017 16:01]

Report message to a moderator

Previous Topic:How to preload a Scout TablePage?
Next Topic:Having a "frozen" column in a table
Goto Forum:
  


Current Time: Mon Jul 23 11:56:43 GMT 2018

Powered by FUDForum. Page generated in 0.01826 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top