Hi Scott, Changing the code to TurbineSecurity.removeUser(user) worked! Thanks!
Well, I'm happy that it works, but I'm nervous about not knowing why what I was doing before wasn't working because I usually don't get bitten by something only once. I like to keep blithely wandering into the same problems over and over again. So, I'm still interested in pursuing why what I had before didn't work. I'm using the following classes: import org.apache.turbine.services.security.TurbineSecurity; import org.apache.turbine.om.security.peer.TurbineUserPeer; Are these correct? I thought so, but... Ok, well, thanks. Now I can at least get back to work! Regards, Philip ----- Original Message ----- From: "Scott Eade" <[EMAIL PROTECTED]> To: "Turbine Users List" <[EMAIL PROTECTED]> Sent: Thursday, September 11, 2003 7:28 PM Subject: Re: doDelete on TurbineUserPeer causes NullPointerException > Which SecurityService are you using? > > 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.apach e.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(VelocityA ctionEvent.java:174) > > at org.apache.turbine.util.velocity.VelocityActionEvent.perform(VelocityActionE vent.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] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
