• Problem accessing OpenKM WebDAV via Jackrabbit Application

  • OpenKM has many interesting features, but requires some configuration process to show its full potential.
OpenKM has many interesting features, but requires some configuration process to show its full potential.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #9294  by Zerga
 
Hey guys!

I have set up the OpenKM-5.0.2_JBoss-4.2.3.GA standalone server and now i started my own application (in this case in the same jboss) which uses Jackrabbit. What i want to do is have the jackrabbit in my application use the repository of OpenKM - and my idea was to do that via WebDAV.

I can access the OpenKM WebDAV via Firefox and WebDAV clients on windows, but i have problems to access it with JcrUtils.getRepository(uri), where uri is either http://localhost:8080/OpenKM/repository/default or http://localhost:8080/OpenKM/repository ... t/okm:root - since it seems the getRepository method is not providing any way to include credentials... (correct me if i am wrong):
Code: Select all
The following RepositoryFactory classes were consulted:
    org.apache.jackrabbit.core.RepositoryFactoryImpl: declined
    org.apache.jackrabbit.commons.JndiRepositoryFactory: declined
    org.apache.jackrabbit.rmi.repository.RmiRepositoryFactory: failed
        because of RepositoryException: Failed to read the resource at URL http://localhost:8080/OpenKM/repository/default/okm:root
        because of IOException: Server returned HTTP response code: 401 for URL: http://localhost:8080/OpenKM/repository/defeault/okm:root
    org.apache.jackrabbit.jcr2dav.Jcr2davRepositoryFactory: declined
    org.apache.jackrabbit.jcr2spi.Jcr2spiRepositoryFactory: declined
Now my questions:
Can you tell me how to switch off Authentication on the OpenKM WebDAV and let anyone in (at least as a first step in my search for a solution)?

Or maybe someone already tried what i am doing and can give me a hint on how else i should do it... maybe JNDI or RMI? Is there a way to expose the OpenKM repository via JNDI or RMI without recompiling the source, i mean: in the config? Example code is always welcome :)

Sorry, i am a total noob on that whole jackrabbit/jcr thing...

Thanks for your help!!
 #9348  by Zerga
 
Thank you pavila for the answer... could you tell me if its possible though to expose your jackrabbit to other applications via small code changes (for example registering the repository on creation in JNDI). Could you tell me where (in which class) the OpenKM Repository is initialized so i can register it to JNDI? Or better yet: Please tell me the JNDI Name under which it registers - in case it does already...

As a side-note, i found out that changing the web.xml at the Webdav Servlet settings from
Code: Select all
<param-name>x-missing-auth-mapping</param-name>
to
Code: Select all
<param-name>missing-auth-mapping</param-name>
disables the http basic authentication.

It did not help accessing the webdav though as i now get the following error message (from my jackrabbit):
Code: Select all
The following RepositoryFactory classes were consulted:
    org.apache.jackrabbit.core.RepositoryFactoryImpl: declined
    org.apache.jackrabbit.client.RepositoryFactoryImpl: declined
    org.apache.jackrabbit.commons.JndiRepositoryFactory: declined
    org.apache.jackrabbit.rmi.repository.RmiRepositoryFactory: failed
        because of RepositoryException: Failed to read the resource at URL http://***:8080/OpenKM/repository/default/okm:root
        because of StreamCorruptedException: invalid stream header: 3C21444F
    org.apache.jackrabbit.jcr2dav.Jcr2davRepositoryFactory: declined
    org.apache.jackrabbit.jcr2spi.Jcr2spiRepositoryFactory: declined
Perhaps the repository you are trying to access is not available at the moment.
 #9378  by pavila
 
In model 1 there is no JNDI repository registration. OpenKM jackrabbit repository only can be accessed from OpenKM. If you want to access the repository you can use OpenKM API exposed via WebServices or modify OpenKM to use a model 2 architecture.

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.