Getting an blank error dialog in client

Hi,

I am getting a blank error dialog when i run client but for the same procedure in debug client there is no error. It runs fine.
When i run the solution in client, a blank error pop up. In server log there is no error, but in java console i am getting the following error message.

ERROR - Debug                      - 
java.lang.NullPointerException
	at com.servoy.j2db.persistence.Relation.isGlobalEx(Relation.java:956)
	at com.servoy.j2db.persistence.Relation.isGlobal(Relation.java:938)
	at com.servoy.j2db.persistence.Solution.getRelations(Solution.java:271)
	at com.servoy.j2db.persistence.Solution.getRelations(Solution.java:242)
	at com.servoy.j2db.FlattenedSolution.getRelations(FlattenedSolution.java:1886)
	at com.servoy.j2db.dataprocessing.FindState.getValidSearchRelations(FindState.java:73)
	at com.servoy.j2db.dataprocessing.FindState.getRelatedFoundSet(FindState.java:503)
	at com.servoy.j2db.smart.dataui.PortalComponent.setRecord(PortalComponent.java:439)
	at com.servoy.j2db.dataprocessing.DataAdapterList.setRecord(DataAdapterList.java:381)
	at com.servoy.j2db.smart.dataui.DataRenderer.refreshRecord(DataRenderer.java:643)
	at com.servoy.j2db.FormController.refreshAllPartRenderers(FormController.java:2226)
	at com.servoy.j2db.FormController.valueChanged(FormController.java:2306)
	at javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source)
	at com.servoy.j2db.util.model.AlwaysRowSelectedSelectionModel.fireValueChanged(AlwaysRowSelectedSelectionModel.java:219)
	at javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source)
	at com.servoy.j2db.util.model.AlwaysRowSelectedSelectionModel.setSelectedRows(AlwaysRowSelectedSelectionModel.java:199)
	at com.servoy.j2db.util.model.AlwaysRowSelectedSelectionModel.setSelectedRow(AlwaysRowSelectedSelectionModel.java:164)
	at com.servoy.j2db.util.model.AlwaysRowSelectedSelectionModel.setSelectedRow(AlwaysRowSelectedSelectionModel.java:131)
	at com.servoy.j2db.util.model.AlwaysRowSelectedSelectionModel.fireValueChanged(AlwaysRowSelectedSelectionModel.java:215)
	at javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source)
	at javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source)
	at javax.swing.DefaultListSelectionModel.insertIndexInterval(Unknown Source)
	at com.servoy.j2db.util.model.AlwaysRowSelectedSelectionModel.insertIndexInterval(AlwaysRowSelectedSelectionModel.java:93)
	at com.servoy.j2db.util.model.AlwaysRowSelectedSelectionModel.intervalAdded(AlwaysRowSelectedSelectionModel.java:262)
	at com.servoy.j2db.dataprocessing.TableAndListEventDelegate.fireIntervalAdded(TableAndListEventDelegate.java:120)
	at com.servoy.j2db.dataprocessing.TableAndListEventDelegate$1.run(TableAndListEventDelegate.java:147)
	at com.servoy.j2db.dataprocessing.TableAndListEventDelegate.fireTableAndListEvent(TableAndListEventDelegate.java:179)
	at com.servoy.j2db.dataprocessing.SwingFoundSet.fireFoundSetEvent(SwingFoundSet.java:147)
	at com.servoy.j2db.dataprocessing.FoundSet.addRecord(FoundSet.java:3706)
	at com.servoy.j2db.dataprocessing.FoundSet.newRecord(FoundSet.java:3656)
	at com.servoy.j2db.dataprocessing.FoundSet.newRecord(FoundSet.java:3614)
	at com.servoy.j2db.dataprocessing.FoundSet.setFindMode(FoundSet.java:3827)
	at com.servoy.j2db.FormController.setMode(FormController.java:3208)
	at com.servoy.j2db.FormController.findImpl(FormController.java:2852)
	at com.servoy.j2db.FormController.access$3(FormController.java:2792)
	at com.servoy.j2db.FormController$JSForm.js_find(FormController.java:733)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:179)
	at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:367)
	at org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:111)
	at org.mozilla.javascript.gen.c29._c0(sub_loadCase:451)
	at org.mozilla.javascript.gen.c29.call(sub_loadCase)
	at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:91)
	at org.mozilla.javascript.gen.c25._c0(bmd_CaseNumAuditAndLoad:58)
	at org.mozilla.javascript.gen.c25.call(bmd_CaseNumAuditAndLoad)
	at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:387)
	at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3134)
	at org.mozilla.javascript.gen.c25.call(bmd_CaseNumAuditAndLoad)
	at com.servoy.j2db.scripting.ScriptEngine.executeFunction(ScriptEngine.java:528)
	at com.servoy.j2db.FormController.executeFunction(FormController.java:4058)
	at com.servoy.j2db.FormController.executeFunction(FormController.java:3937)
	at com.servoy.j2db.FormController.executeFunction(FormController.java:3859)
	at com.servoy.j2db.FormController$ScriptExecuter.executeFunction(FormController.java:3714)
	at com.servoy.j2db.ui.BaseEventExecutor.fireEventCommand(BaseEventExecutor.java:271)
	at com.servoy.j2db.ui.BaseEventExecutor.fireActionCommand(BaseEventExecutor.java:217)
	at com.servoy.j2db.ui.BaseEventExecutor.fireActionCommand(BaseEventExecutor.java:212)
	at com.servoy.j2db.smart.dataui.AbstractScriptButton$2.actionPerformed(AbstractScriptButton.java:670)
	at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
	at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
	at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
	at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
	at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
	at java.awt.Component.processMouseEvent(Unknown Source)
	at javax.swing.JComponent.processMouseEvent(Unknown Source)
	at java.awt.Component.processEvent(Unknown Source)
	at java.awt.Container.processEvent(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
	at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
	at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Window.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)

Does anyone know what could be triggering this error in the java console?

Thanks in advance
S Misra

What Servoy version did you use?

Hi Andrei,

I am using Servoy version 6.0.5 -build 1230.

If I understood correctly, your solution runs fine when running it from developer, but fails to load correctly when (imported and) ran from the application server - smart client.
From the stack trace I can see that a button is pushed, then javascript code ends up executing a controller.find() on a form that contains a portal, and then it crashes because it bumps into a relation that seems invalid (it has a primary dataprovider null in one of the relation’s items - for example <null/nothing> == order_id instead of something like order_id == order_id). The question is: how did that relation become invalid?

Can you find such a relation in your solution? You should get an error marker in “Problems” view (Relation “…” has an item without primary dataprovider.) and not be able to export the solution in this case. But if “Build automatically” from “Project” would be disabled that the marker would not appear and an invalid solution could be exported.

Yes, exactly. It runs fine in developer.

There is no error in the problem marker, but i am getting a message in console “relation xxx_to_yyy cannot be used in a find mode”. The
relation is established between two different server i.e serv1.tab1 to serv2.tab2. Is this causing a problem?

Thanks

I don’t think that console message has anything to do with it… That is just what it says. I guess that relation does have a primary dataprovider set for all ‘items’ (pairs).

What you could try is (make sure you have “Build automatically” enabled) - export the solution again with all modules, delete the solution and all solutions/modules it uses from the application server, and import it again. Clear the java cache. Does it still give the same exception?

If it still gives the same exception then you need to identify the relation that fails. If it’s a small solution you can check each relation…