I am new to Jackrabbit. I downloaded the Standalone Server jar. It is
currently up and running. From an browser I enter this URL
http://ieca124.lsb-okc.com:8080/repository/default and login with the admin
user name and default password. It seems to work fine. It shows an empty
default repository.
However, when I try to login programmatically using this code
Repository repository =
JcrUtils.getRepository("http://ieca124.lsb-okc.com:8080/repository");
Session session = repository.login(new SimpleCredentials("admin",
"admin".toCharArray()), "default");
I get an error trying to run the login method. Could someone show me what I am
doing wrong? I haven't change the repository.xml or any other file. I am just
using the defaults from when you run "java -jar
jackrabbit-standalone-2.12.1.jar". Here is the stacktrace I get
log4j:WARN No appenders could be found for logger
(org.apache.jackrabbit.jcr2spi.Jcr2spiRepositoryFactory).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more
info.
Exception in thread "main" javax.jcr.LoginException: Login failed: Unknown
workspace 'default'.
at
org.apache.jackrabbit.spi2dav.RepositoryServiceImpl.obtain(RepositoryServiceImpl.java:804)
at
org.apache.jackrabbit.spi2dav.RepositoryServiceImpl.obtain(RepositoryServiceImpl.java:753)
at
org.apache.jackrabbit.spi2davex.RepositoryServiceImpl.obtain(RepositoryServiceImpl.java:307)
at
org.apache.jackrabbit.jcr2spi.RepositoryImpl.login(RepositoryImpl.java:151)
at com.iecokc.sandbox.SecondHop.main(SecondHop.java:19)