You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by "Funk, Lori K." <lf...@petroleumplace.com> on 2002/05/21 18:04:38 UTC
Problems with Group methods
Hi,
I have incorporated Turbine (2.2dev) into an application I am writing. I am having trouble with some of the methods to manage groups - they aren't working. For instance, I have a jsp page that looks like this
<%@page language="java" errorPage="/error.jsp" %>
<%@page import="org.apache.turbine.services.security.TurbineSecurity" %>
<%@page import="org.apache.turbine.om.security.TurbineGroup" %>
<%
String oldName = "My Group";
TurbineGroup group = (TurbineGroup)TurbineSecurity.getGroup(oldName);
String newName = oldName+" test";
System.out.println("about to change the group name from "+oldName+" to "+newName);
TurbineSecurity.renameGroup(group, newName);
%>
<html>
<body>
Changed group <%= oldName %> to <%= newName %>
</body>
</html>
My page runs fine and I get no errors anywhere (turbine.log, tomcat console, etc.) but when I look in the database, the group name has not changed.
Has anyone else seen this problem?
The other problem I have seen is when trying to use the TurbineSecurity.getGroups(Criteria) method. When I try this method (GroupSet gs = TurbineSecurity.getGroups(new Criteria().add("group_name",oldName));) I get an error:
org.apache.turbine.util.security.DataBackendException: getGroups(Criteria) failed: Incorrect syntax near the keyword 'WHERE'.
When I capture the sql that is being issued to the database it looks like this:
SELECT TURBINE_GROUP.GROUP_ID, TURBINE_GROUP.GROUP_NAME, TURBINE_GROUP.OBJECTDATA FROM TURBINE_GROUP, WHERE (.group_name='My Group') ORDER BY TURBINE_GROUP.GROUP_NAME ASC
notice the '.group_name' where the table name is missing?
Thanks in advance for any help or wisdom you can provide.
Lori
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Problems with Group methods
Posted by Eric Dobbs <er...@dobbse.net>.
On Tuesday, May 21, 2002, at 10:04 AM, Funk, Lori K. wrote:
> I have incorporated Turbine (2.2dev) into an application I am writing.
> I am having trouble with some of the methods to manage groups - they
> aren't working.
Have you tired the same things with Turbine 2.1?
There are some known conflicts between the
Turbine 2.2dev and Torque and Fulcrum -- one of
those is in the security service. It's possible
that your problem is related to some of those
conflicts.
Hope that helps.
-Eric
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>