Hi Rafal,

Without trying to sound too monotonous.......


I've been stepping through the code and I understand what you're saying
regarding the default values in the securityservice file. However....

The code I had yesterday was not initialising the init(RunData ) method in
DBSecurityService.
After adding the extra code you see below the init(RunData) method is
accessed. In that method a call is done to BaseService.getProperties().

This method returns a null. Afterwhich an exception is thrown

The code below is basically all I'm using, perhaps there's something obvious
missing??

Perhaps everything would work if I was to use it through a servlet but this
way I can get a better feeling of how it all works.


        try
        {
          TurbineConfig  config = new
TurbineConfig(".","./conf/TurbineResources.properties");
           Turbine turbine = new Turbine();
          turbine.init(config);

<new code today>
          RunData rData = new RunData();
          rData.setServletConfig(config);
          DBSecurityService dbS = new DBSecurityService();
          dbS.init(rData);
</new code today>

       TurbineUser user = (TurbineUser)TurbineSecurity.getAnonymousUser();
       user.setUserName("collie");
       user.setFirstName("colin");
       user.setLastName("chalmers");

       TurbineSecurity.addUser(user, "password");
        }
        catch ( Exception e )
        {
             e.printStackTrace();
        }





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