I am trying to develop a basic admin app for myself to get my Turbine skills in 
shape after ignoring the project for a while...  I'm using the "non-supported" 
:) tdka10, so I'm not expecting anything here.  I am trying to delete a group 
(The same thing happens with the permission remove function).  Here's my code:

public void doDeletepermission (RunData data, Context context) throws
Exception
    {
        ParameterParser pp = data.getParameters();
        Permission deletePermission =
TurbineSecurity.getPermission(pp.getString("permissionlist"));
        deletePermission.remove();
        data.setMessage("Permission Deleted!");
    }

permissionlist is obviously the name of the permission.  So, it retrieves the 
right permission.  I've verified this by doing printing the PERMISSION_ID and 
the permission name to the console and they are correct, but I get this error 
while executing the remove function:

java.lang.reflect.InvocationTargetException: java.sql.SQLException: Syntax e  
rror or access violation: You have an error in your SQL syntax near '' at line 
1
        at com.workingdogs.village.DataSet.fetchRecords(DataSet.java:546)
        at com.workingdogs.village.TableDataSet.fetchRecords(TableDataSet.java:183)
        at com.workingdogs.village.TableDataSet.fetchRecords(TableDataSet.java:167)
        at com.workingdogs.village.TableDataSet.fetchRecords(TableDataSet.java:153)
        at org.apache.turbine.om.peer.BasePeer.doDelete(BasePeer.java:542)
        at org.apache.turbine.om.peer.BasePeer.doDelete(BasePeer.java:442)
        at 
org.apache.turbine.services.security.DBSecurityService.removePermission(DBSe  
curityService.java:891)
rethrown as org.apache.turbine.util.security.DataBackendException: 
removePermission(Permission)
        at 
org.apache.turbine.services.security.DBSecurityService.removePermission(DBSe  
curityService.java:898)
        at 
org.apache.turbine.services.security.TurbineSecurity.removePermission(Turbin  
eSecurity.java:692)
        at org.apache.turbine.om.security.Permission.remove(Permission.java:136)
        at 
org.apache.turbine.admin.modules.actions.Permissions.doDeletepermission(Perm  
issions.java:89)
        at java.lang.reflect.Method.invoke(Native Method)

Its also interesting to note that if I do:

deletePermission.rename("newname");

it works.  Hmmm...I would normally run this through jdb, but for some reason it 
keeps crashing...stupid windows.  I wish I was back in my native unix 
environment!  But, no such luck today!  Thanks for any insights you guy scan 
spread, and if anyone thinks this admin app is worth anything to them, I'll 
post it when I'm done.


Dan Diephouse



------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to