Hi, I have gone through many links and was not able to create users via
jackrabbit. Right now i am using jackrabbit-standalone-2.6.5.jar.
I have tried the below steps and was not able to create users until now ,
please help me what am i missing here:
Line1: Repository repository =
JcrUtils.getRepository("http://localhost:9090/server/");
Line2: Session session = repository.login(new SimpleCredentials("admin",
"admin".toCharArray()));
Line3: UserManager um = ((JackrabbitSession) session).getUserManager();
Line4: User user = um.createUser("john", "doe");
It throws an error at line no: 3.
The error is: java.lang.ClassCastException:
org.apache.jackrabbit.jcr2spi.SessionImpl cannot be cast to
org.apache.jackrabbit.api.JackrabbitSession at
com.sample.SampleJackrabbit.main(SampleJackrabbit.java:23)
Can someone provide me the steps i.e. best way to create user
programmatically?
--
View this message in context:
http://jackrabbit.510166.n4.nabble.com/How-to-create-users-using-jackrabbit-tp4660409.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.