Search & Find

I get the following error when performing find & search.

Search Failed…try show all

java.lang.NullPointerException

This error only happens in certain situations that I can replicate. I have made sure that the there are not outstanding changes to the db. Below is my error log from the app server.

java.lang.NullPointerException
at com.servoy.j2db.dataui.Zee.setValidationEnabled(Zee.java:326)
at com.servoy.j2db.dataprocessing.Zib.setFindMode(Zib.java:138)
at com.servoy.j2db.dataprocessing.Zfb.Za(Zfb.java:244)
at com.servoy.j2db.FormController.propagateFindMode(FormController.java:1003)
at com.servoy.j2db.FormController.foundSetChanged(FormController.java:805)
at com.servoy.j2db.dataprocessing.FoundSet.Zf(FoundSet.java:628)
at com.servoy.j2db.dataprocessing.FoundSet.setFindMode(FoundSet.java:617)
at com.servoy.j2db.FormController.setMode(FormController.java:683)
at com.servoy.j2db.FormManager.Za(FormManager.java:451)
at com.servoy.j2db.SwingFormManager.Za(SwingFormManager.java:229)
at com.servoy.j2db.FormManager.propertyChange(FormManager.java:114)
at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
at javax.swing.event.SwingPropertyChangeSupport.firePropertyChange(Unknown Source)
at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
at com.servoy.j2db.J2DBGlobals.firePropertyChange(J2DBGlobals.java:28)
at com.servoy.j2db.ModeManager.setMode(ModeManager.java:33)
at com.servoy.j2db.FormController.Zc(FormController.java:515)
at com.servoy.j2db.FormController.find(FormController.java:943)
at com.servoy.j2db.cmd.Zt.doIt(Zt.java:8)
at com.servoy.j2db.cmd.Zc.run(Zc.java:5)
at java.awt.event.InvocationEvent.dispatch(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)

What version are you using?

Rob

Version: 4.1.2 - build 663

The find problem occurred after I accessed data that had a foreign key relationship to the dataprovider value I was trying to search on. I finally came up with this work around to get my search and find to work. This problem was locking up clients. If this is not safe please let me know. All I know is if I don’t use controller.showRecords(); before my find in certain situations it will lock up the client. The function below is my form onFinCmd.

function Find()
{
  controller.showRecords();//need this code or find will not work
  controller.find();
  controller.focusFirstField();   
}

Thanks for any and all help

After inserting the controller.showRecords() we have discoverd that the extended search function will not work. However, I have come across a fix that my be the solution. I have set this form to use a separate foundset. This seems to correct all of my issues. However, I don’t want to create more issues with data not being updated to the db or not being displayed to the users due to separate foundsets. I would appreciate any and all advice.

Thanks

if you have a sample that goes wrong on 4.1.3 then please attach that to a case.

Resolved this issue by checking the useseparatefoundset option in the properties.