Insert/Delete Error in Smart not in Web client

Hi

I have something that is really confusing me. I’m probably just missing something painfully obvious but I can’t seem to figure it out and not sure it is some bug. I have a form with a tabpanel of related records. I have three user groups: admin, lab_admin and lab_users. The first two can do adds/deletes but not lab_users. I have scripted adds and deletes for records in the related tab panel. These go fine in Developer on both Web and Smart Client when I log in as a admin or lab_admin user. When I am running this off the server version using Web client it is also running fine with no errors for both adds and deletes. However when I run it in Smart Client for an admin user I get these messages: On adding “You don’t have access to create data” and on deleting “You don’t have access to delete this data”. There is no database error message. There is a console error message in smart client which I’ve copied below. (The function and line number mentioned are when the ‘controller.deleteRecord’ command is given). The ‘add’ by the way goes ahead despite the error message but the delete does not happen.

As far as I can tell the version running on developer and on the server are the same. I don’t have any obvious security settings on either the tables or the forms for these records in the tab panel. It is possible that perhaps in development at one point I might have had slightly different settings for security for the two groups, admin and lab_admin, but now for those two tables they are the same for everything that I can see. Any thoughts gratefully received… My apologies if I have overlooked something stupid. Here is the console message when deleting:

Mar 26, 2012 9:25:47 PM com.servoy.j2db.util.Debug error
SEVERE: You don’t have access to delete this data
org.mozilla.javascript.WrappedException: Wrapped com.servoy.j2db.ApplicationException: You don’t have access to delete this data (onActionDeleteSample#177)
at org.mozilla.javascript.Context.throwAsScriptRuntimeEx(Context.java:1828)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:199)
at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:367)
at org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:111)
at org.mozilla.javascript.gen.c17._c0(onActionDeleteSample:177)
at org.mozilla.javascript.gen.c17.call(onActionDeleteSample)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:387)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3134)
at org.mozilla.javascript.gen.c17.call(onActionDeleteSample)
at com.servoy.j2db.scripting.ScriptEngine.executeFunction(ScriptEngine.java:528)
at com.servoy.j2db.FormController.executeFunction(FormController.java:4063)
at com.servoy.j2db.FormController.executeFunction(FormController.java:3942)
at com.servoy.j2db.FormController.executeFunction(FormController.java:3864)
at com.servoy.j2db.FormController$ScriptExecuter.executeFunction(FormController.java:3719)
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(AbstractButton.java:2028)
at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2351)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
at java.awt.Component.processMouseEvent(Component.java:6373)
at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)
at java.awt.Component.processEvent(Component.java:6138)
at java.awt.Container.processEvent(Container.java:2085)
at java.awt.Component.dispatchEventImpl(Component.java:4735)
at java.awt.Container.dispatchEventImpl(Container.java:2143)
at java.awt.Component.dispatchEvent(Component.java:4565)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4621)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4282)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4212)
at java.awt.Container.dispatchEventImpl(Container.java:2129)
at java.awt.Window.dispatchEventImpl(Window.java:2478)
at java.awt.Component.dispatchEvent(Component.java:4565)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:679)
at java.awt.EventQueue.access$000(EventQueue.java:85)
at java.awt.EventQueue$1.run(EventQueue.java:638)
at java.awt.EventQueue$1.run(EventQueue.java:636)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98)
at java.awt.EventQueue$2.run(EventQueue.java:652)
at java.awt.EventQueue$2.run(EventQueue.java:650)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:649)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Caused by: com.servoy.j2db.ApplicationException: You don’t have access to delete this data
at com.servoy.j2db.dataprocessing.FoundSet.deleteAllInternal(FoundSet.java:3048)
at com.servoy.j2db.dataprocessing.FoundSet.deleteRecord(FoundSet.java:3234)
at com.servoy.j2db.dataprocessing.FoundSet.deleteRecord(FoundSet.java:3153)
at com.servoy.j2db.FormController.deleteRecordImpl(FormController.java:2610)
at com.servoy.j2db.FormController.access$5(FormController.java:2597)
at com.servoy.j2db.FormController$JSForm.js_deleteRecord(FormController.java:905)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:179)
… 52 more

somehow there is some security that prevents the delete.
Is hard to see where this then comes from.