turbine-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tony Oslund" <to...@lifeinnovations.com>
Subject RE: [Fwd: NoSuchMethodException for GroupPeerManager.getNewGroup]
Date Tue, 07 Aug 2007 12:59:11 GMT
Just a thought....

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

-----Original Message-----
From: David Wynter [mailto:david@roamware.co.uk] 
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: user-unsubscribe@turbine.apache.org
For additional commands, e-mail: user-help@turbine.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@turbine.apache.org
For additional commands, e-mail: user-help@turbine.apache.org


Mime
View raw message