jackrabbit-standalone-2.4.0.jar Populate does not work

怎甘沉沦 提交于 2019-12-04 02:01:32

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.

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

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.

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.

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