More Security bug in 2.1beta4

I’ve found more bugs in the security dialog in beta4 running the repository in Oracle9i.

To get to the exception do the following:

  1. Open the security dialog.
  2. Click on the Administrator group (the only one created in my example)
  3. Click on the Forms tab to see the forms (I have 4 forms in my example)
  4. Click on the first form
  5. Click on the checkbox viewable to uncheck or check it.
  6. Click on the update button
  7. Click on the next form name
    8 ) Click on the previous form name

When you do setp 8 the following exception appears on the log:

Apache Tomcat/4.0.1
Exception occurred during event dispatching:
java.lang.ClassCastException
        at com.servoy.j2db.develop.h.h.valueChanged(Unknown Source)
        at javax.swing.JTree.fireValueChanged(Unknown Source)
        at javax.swing.JTree$TreeSelectionRedirector.valueChanged(Unknown Source)
        at javax.swing.tree.DefaultTreeSelectionModel.fireValueChanged(Unknown Source)
        at javax.swing.tree.DefaultTreeSelectionModel.notifyPathChange(Unknown Source)
        at javax.swing.tree.DefaultTreeSelectionModel.setSelectionPaths(Unknown Source)
        at javax.swing.tree.DefaultTreeSelectionModel.setSelectionPath(Unknown Source)
        at javax.swing.JTree.setSelectionPath(Unknown Source)
        at javax.swing.plaf.basic.BasicTreeUI.selectPathForEvent(Unknown Source)
        at javax.swing.plaf.basic.BasicTreeUI$MouseHandler.handleSelection(Unknown Source)
        at javax.swing.plaf.basic.BasicTreeUI$MouseHandler.mousePressed(Unknown Source)
        at java.awt.AWTEventMulticaster.mousePressed(Unknown Source)
        at java.awt.Component.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.pumpOneEventForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
        at java.awt.Dialog$1.run(Unknown Source)
        at java.awt.Dialog.show(Unknown Source)
        at java.awt.Component.show(Unknown Source)
        at java.awt.Component.setVisible(Unknown Source)
        at com.servoy.j2db.util.b.setVisible(Unknown Source)
        at com.servoy.j2db.develop.h.e.H(Unknown Source)
        at com.servoy.j2db.develop.c.a2.doIt(Unknown Source)
        at com.servoy.j2db.cmd.b$2.run(Unknown Source)
        at java.awt.event.InvocationEvent.dispatch(Unknown Source)
        at java.awt.EventQueue.dispatchEvent(Unknown Source)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(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)

do you have that everytime you repeat the above steps?
i am not able to reproduce it following exactly youre steps.

Yes. every time with Oracle9i as repository.

the repository type really shouldn’t matter for that piece of code.
If you have that exact same solution imported on a ohter repository database. Don’t you have that error?

I’m testing it. By the way during the testing I sometimes get this error when starting servoy:

Using RMI registry on port 1099
Error occured retrieving server plugins, error: null
java.lang.NullPointerException
java.lang.NullPointerException
        at com.servoy.j2db.plugins.a.a(Unknown Source)
        at com.servoy.j2db.server.ApplicationServer.startDataServer(Unknown Source)
        at com.servoy.j2db.develop.J2DBDeveloper.dataBaseInit(Unknown Source)
        at com.servoy.j2db.develop.J2DBDeveloper.main(Unknown Source)
        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 com.servoy.j2db.startup.Bootstrap.main(Bootstrap.java:119)
        at Servoy.main(Servoy.java:27)

On the dialog it says: Fatal init, could not start data service. There is nothing is details.

I don’t know if this is relevant or not, or a consequence of a previous error before stopping servoy.

I could not import the solution into another repository because of some table dependency but I’ve created a repository in MySQL and created a solution there. I could not reproduce the bug.

Then I went back to the Oracle9i repository and cretead another solution with 2 empty forms and there I can reproduce the bug.