14

I just downloaded and started Jackrabbit using:

java -jar jackrabbit-standalone-2.4.0.jar 

When I call the populate.jsp, I get this error:

Error while accessing the repository: LoginModule ignored Credentials 
Check the configuration or use the easy setup wizard. 

When I click easy setup wizard link, I get this:

HTTP ERROR 404 
Problem accessing /admin/. Reason: 
NOT_FOUND 

Is there something wrong with this Jackrabbit build?

Bevo
  • 530
  • 5
  • 17
  • I have the same problem. Also, I was able to connect using WebDAV from windows explorer, but I can't copy any files to it. – neonguru May 08 '12 at 16:28

5 Answers5

10

It appears that the implementation has changed but the documentation hasn't been updated. I got this same error using the "stand alone" server like you.

If you look into the repository.xml file stored in the repository root (jackrabbit by default) you'll see two users defined. One is "anonymous" which I'm guessing is read only and one is "admin".

Just replace new SimpleCredentials("username", "password".toCharArray())) with new SimpleCredentials("admin", "admin".toCharArray())) and it should work.

If you're just working your way through their tutorials (like I am), this should get you moving again.

Also, as a side note, you should supply these same credentials when the web interface asks you to log in.

lycono
  • 1,094
  • 7
  • 10
  • No such line: "new SimpleCredentials..." in my repository.xml file. – neonguru May 08 '12 at 16:21
  • That's not XML, it's Java. The line to change is in the tutorial "First Hops". It's the "SecondHop.java" file. If you're not working your way through the tutorial, this might not be of help. – lycono May 11 '12 at 17:42
  • 3
    He's asking about the stand alone server's "populate.jsp" page, which has nothing to do with "First Hops". And replacing the username and password with credentials your server knows should be obvious. – neonguru May 18 '12 at 20:13
  • 1
    Actually, the credentials are kind of the point and going by the docs alone, it's not obvious. The docs say that you can supply any username and password to the default jackrabbit login mechanism (they use "username" and "password") and get write access. That doesn't appear to be the case anymore. You need to supply the ones specified in repository.xml. I guess I should have been more clear that it applies for web access (like populate.jsp) and the tutorials. Incorrect docs here: http://jackrabbit.apache.org/first-hops.html. It works for me with the admin account. – lycono May 29 '12 at 18:47
  • How can I find that line SimpleCredentials? I just see "jackrabbit-standalone-2.16.1.jar" and a "jackrabbit" folder. – emeraldhieu Apr 05 '18 at 10:25
3

Just modify the repository.xml. Replace the anonymousId's value to "username"(or any thing it used in populate.jsp).

Kenny
  • 31
  • 1
1

UPDATE: After you've followed the advice of previous answers you get to the "populate" page and it asks for a root word. Probably it starts to populate, but the two progress bars will stay a "0%". To fix this got to ..../Jackrabbit-webapp-2.6.3/WebContent/populate.jsp and change the lines:

    Line number 315 "google"->Bing
    Line number 314 "www.google.com"->"www.bing.com"
    Line number 298 "http://www.google.com/?q=" -> "http://www.bing.com/?q="

After this restart the server and it the "populate" should now work.

Fledermaus
  • 11
  • 1
0

With JackRabbit 2.6.5, if you download the jackrabbit standalone jar and try to use it it does not work. You need to download the whole Jackrabbit source, do the changes described in the above answers and then compile.

1) First you need to check the repository.xml, it mentions the user anonymous and admin. So in populate.jsp I first tried using "anonymous", the page loads correctly but then it crashes with a security exception when trying to add a node. So I ended up using admin in the populate jsp:

rep.login(new SimpleCredentials("admin", "admin".toCharArray()));

2) I also had to use Bing instead of Google, as pointed above.

3) I specified penguin as a term and only 10 documents since the files may download quite slowly since they can be big if you are unlucky.

4) I don't know how the search works, using as terms the names of the files it uploaded or some words contained therein returns no results.

Pavitx
  • 81
  • 2
  • 17
0

Make sure to not use a Java version newer than Java 8 as there are not yet supported (still true in 2023). See: https://www.mail-archive.com/users@jackrabbit.apache.org/msg21757.html

Jonathan
  • 517
  • 1
  • 6
  • 12