Hi,

I do not follow you? Nowhere do I specify anything to do with changing the Group from the std default class. This is the standard framework behaving like this. The only changes I have made are to do with replacing TurbineUser with my own extended class. How many people have attempted to extend from TurbineUser based on those instructions?

I now understand a little more. I cannot work out how this ever worked to tell you the truth. This reflection work here

           g = (Group) groupWrapperClass
               .getConstructor(clazz)
               .newInstance(params);

Is expecting to find a constructor that takes this

Class [] clazz = new Class [] { Persistent.class };

as a argument, and the class Turbine Security service is using, "org.apache.turbine.om.security.TurbineGroup" simply does not have that constructor. But then again neither does the class the documentation tells me it should be using, "org.apache.turbine.services.security.torque.om.TurbineGroup" have that constructor, so how can this ever work? Am I misinterpreting the constructor signature required?

David



Tony Oslund wrote:
Just a thought....

Instead of specifying just Group, try explicitly specifying the full
path to Group.

-----Original Message-----
From: David Wynter [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 07, 2007 4:27 AM
To: Turbine-User
Subject: [Fwd: NoSuchMethodException for GroupPeerManager.getNewGroup]

Sorry, sent the last one for an email not on the list.

Hi,

I have followed the instructions here. Using 2.3.1

http://turbine.apache.org/turbine/turbine-2.3.1/services/torque-security
-service.html

To use an extended user class. But I am getting a NoSuchMethodException on line 656 of GroupPeerManager.java

The method looks like this

    public static Group getNewGroup(Persistent p)
    {
        Group g = null;
        try
        {
            Class groupWrapperClass = TurbineSecurity.getGroupClass();

            Class [] clazz = new Class [] { Persistent.class };
            Object [] params = new Object [] { p };

            g = (Group) groupWrapperClass
                .getConstructor(clazz)
                .newInstance(params);
        }
        catch (Exception e)
        {
log.error("Could not instantiate a new group from supplied persistent: ", e);
        }

        return g;
    }

Reading the instructions on torque-security-service.html page it says

Group Implementation org.apache.turbine.services.security.torque.TorqueGroup
Peer    org.apache.turbine.services.security.torque.om.TurbineGroupPeer
Persistent object org.apache.turbine.services.security.torque.om.TurbineGroup



I am only using my own TurbineUser substitute, not any of the other security classes, so I expect from this " Turbine uses the following configuration for accessing the Torque schema. If you just want to use the default Peers, you don't need any of

the following configuration, these are the defaults:" That it will use the default stated above, so I am surprised to see it using "class org.apache.turbine.om.security.TurbineGroup"

But the class being used is in fact sub class of BaseObject and therefore does have an empty constructor, so I cannot work out why it is throwing this exception anyway?

here are the relevant sections of my TurbineResources.properties

services.SecurityService.classname = org.apache.turbine.services.security.torque.TorqueSecurityService
...
# This is the Peer class used to access the user peer (org.apache.turbine.services.security.torque.om.TurbineUserPeer) services.SecurityService.user.manager = org.apache.turbine.services.security.torque.TorqueUserManager services.SecurityService.torque.userPeer.class = com.stpenable.se.om.ExtendedUserPeer services.SecurityService.user.class = com.stpenable.se.security.ExtendedUserImpl database.maps.builder = com.stpenable.se.util.db.map.TurbineMapBuilderAdapter
# This is the class that implements the ACL interface.
services.SecurityService.acl.class = org.apache.turbine.util.security.TurbineAccessControlList


Is there some configuration the article does not mention?

thanks

David


---------------------------------------------------------------------
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]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to