jackrabbit-standalone-2.4.0.jar Populate does not work

雨燕双飞 提交于 2019-12-21 07:14:18

问题


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?


回答1:


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.




回答2:


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




回答3:


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.




回答4:


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.



来源:https://stackoverflow.com/questions/9978866/jackrabbit-standalone-2-4-0-jar-populate-does-not-work

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!