What package is the TurbineUserPeer class declared as in its import statement?
Have you tried retrieving the user and then TurbineSecurity.removeUser(user)?
Scott
-- Scott Eade Backstage Technologies Pty. Ltd. http://www.backstagetech.com.au
Philip Wachtel wrote:
Hi all,
I'm using: Torque 3.1 Turbine 2.3
I'm getting a NullPointerException (see exception below) when I run the following code:
Criteria criteria = new Criteria().add(TurbineUser.USERNAME, "existingUserNameHere"); TurbineUserPeer.doDelete(criteria);
I get the following exception: ERROR [HttpProcessor[8081][4]] (VelocityActionEvent.java:191) - Invokation of public void us.wachtel.turbine.modules.actions.security.UserAdmin.doRemoveuser(org.apache.turbine.util.RunData,org.apache.velocity.context.Context) java.lang.NullPointerException at org.apache.torque.util.BasePeer.doDelete(Unknown Source) at org.apache.torque.util.BasePeer.doDelete(Unknown Source) at us.wachtel.turbine.modules.actions.security.UserAdmin.doRemoveuser(Unknown Source) 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:324) at org.apache.turbine.util.velocity.VelocityActionEvent.executeEvents(VelocityActionEvent.java:174) at org.apache.turbine.util.velocity.VelocityActionEvent.perform(VelocityActionEvent.java:116) ....
I've been looking around for days, trying to find out where this problem comes from. I've been looking through the BasePeer source and near as I can tell, the error happens because the criterion in BasePeer.doDelete() method returns an invalid table name which chokes up the line 530:
530: ColumnMap[] columnMaps = dbMap.getTable(tab).getColumns();
because dbMap.getTable(tab) doesn't return an object.
I upgraded from older versions of torque and turbine because I was out of ideas. Didn't help!
Any help would be greatly (really really greatly) appreciated.
Thanks,
Philip
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
