Announcement Announcement Module

Spring Modules forum decommissioned in favor of Spring Extensions

As the Spring Modules project has been replaced by the Spring Extensions ( project, this forum has been decommissioned in favour of Spring Extensions one at:

Please see the Spring Extensions home page for a complete list of current projects in Java, .NET and ActionScript. You can also propose one if you want.

Costin Leau
SpringSource - Spring Training, Consulting, and Support - "From the Source"
See more
See less
syntax for creating remote repository Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • syntax for creating remote repository

    I am trying to configure a Spring app to talk to a Jackrabbit deployed as a webapp in a different tomcat instance on the same machine. (I do not have control over deploying jacrabbit in the same tomcat instance as my spring app).

    I managed to connect OK with the following snippit of test code:

    jcrRepository = new URLRemoteRepository("http://localhost:8180/jackrabbit-webapp-1.5.5/rmi");
            Session session = jcrRepository.login(new SimpleCredentials("admin", "adminId".toCharArray()));
    However, I have not been able to create the connection witn spring config and I cannot find any documentation that covers this case (seems to be plenty of examples using direct filesystem access, jndi). I have tried the following:

    <bean id="rmiClientFactory" class="org.apache.jackrabbit.rmi.client.ClientRepositoryFactory"/>
    <bean id="jcrRepository" factory-bean="rmiClientFactory" factory-method="getRepository">
        <constructor-arg value="http://localhost:8180/jackrabbit-webapp-1.5.5/rmi"/>
    but I get the following exception:

    org.apache.jackrabbit.rmi.client.RemoteRepositoryException: Malformed URL: http://localhost:8180/jackrabbit-webapp-1.5.5/rmi; nested exception is: invalid URL scheme: http://localhost:8180/jackrabbit-webapp-1.5.5/rmi: Malformed URL: http://localhost:8180/jackrabbit-webapp-1.5.5/rmi; nested exception is: invalid URL scheme: http://localhost:8180/jackrabbit-webapp-1.5.5/rmi
    	at org.apache.jackrabbit.rmi.client.SafeClientRepository.remoteLogin(
    	at org.apache.jackrabbit.rmi.client.SafeClientRepository.login(
    	at org.apache.jackrabbit.rmi.client.SafeClientRepository.login(
    	at JcrTest.test(
    - looks like the ClientRepositoryFactory requires URL scheme to be "rmi".

    Can anyone suggest what I am doing wrong here, or if connecting to this type of URL is possible with spring-modules jcr ?


  • #2
    spring-modules-jcr: connecting to remote jackrabbit with &quot;http&quot; url scheme

    OK, guess not. I'll revert to standard spring bean definition:

    <bean id="jcrRepository" class="org.apache.jackrabbit.rmi.repository.URLRem oteRepository">
    <constructor-arg value="http://localhost:8180/jackrabbit-webapp-1.5.5/rmi"/>