I am trying to access a jackrabbit repository through rmi from karaf container
I developped a camel route which save a file into jackrabbit repository
<bean id="repository"
class="org.apache.jackrabbit.rmi.repository.URLRemoteRepository">
<argument value="http://localhost:8020/rmi" />
</bean>
<camelContext id="blueprintContext" trace="false"
xmlns="http://camel.apache.org/schema/blueprint">
<route id="depotfichiersurjcr">
<from uri="file:/C:/data?recursive=false&noop=true" />
<!-- log message="message1 ${body}"/ -->
<setHeader headerName="CamelJcrNodeName">
<constant>node</constant>
</setHeader>
<setHeader headerName="my.contents.property">
<simple>${bodyAs(String)}</simple>
<!-- constant>content</constant -->
</setHeader>
<setBody>
<constant></constant>
</setBody>
<to uri="jcr://admin:admin@repository/default?deep=true&eventTypes=3&noLocal=false" />
<to uri="direct:a" />
</route>
</camelContext>
the route works fine with mvn camel:run
the same route doesnt work inside the karaf container , i got :
javax.jcr.RepositoryException: Remote repository not found: The resource at http://localhost:8020/rmi could not be retrieved at org.apache.jackrabbit.rmi.repository.URLRemoteRepositoryFactory.getRemoteRepository(URLRemoteRepositoryFactory.java:84)[1626:org.apache.jackrabbit.jackrabbit-jcr-rmi:2.6.2] at org.apache.jackrabbit.rmi.repository.AbstractRemoteRepositoryFactory.getRepository(AbstractRemoteRepositoryFactory.java:57)[1626:org.apache.jackrabbit.jackrabbit-jcr-rmi:2.6.2] at org.apache.jackrabbit.rmi.repository.ProxyRepository.login(ProxyRepository.java:199)[1626:org.apache.jackrabbit.jackrabbit-jcr-rmi:2.6.2] at org.apache.jackrabbit.rmi.repository.ProxyRepository.login(ProxyRepository.java:233)[1626:org.apache.jackrabbit.jackrabbit-jcr-rmi:2.6.2] at com.sagemcom.Content.process(Content.java:21)[1618:content:0.0.1.SNAPSHOT] at org.apache.camel.processor.DelegateSyncProcessor.process(DelegateSyncProcessor.java:63)[171:org.apache.camel.camel-core:2.13.2] at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)[171:org.apache.camel.camel-core:2.13.2] at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)[171:org.apache.camel.camel-core:2.13.2] at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[171:org.apache.camel.camel-core:2.13.2] at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)[171:org.apache.camel.camel-core:2.13.2] at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)[171:org.apache.camel.camel-core:2.13.2] at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[171:org.apache.camel.camel-core:2.13.2] at org.apache.camel.component.timer.TimerConsumer.sendTimerExchange(TimerConsumer.java:157)[171:org.apache.camel.camel-core:2.13.2] at org.apache.camel.component.timer.TimerConsumer$1.run(TimerConsumer.java:68)[171:org.apache.camel.camel-core:2.13.2] at java.util.TimerThread.mainLoop(Timer.java:555)[:1.7.0_75] at java.util.TimerThread.run(Timer.java:505)[:1.7.0_75] Caused by: java.io.IOException: Server returned HTTP response code: 503 for URL: http://localhost:8020/rmi at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1627)[:1.7.0_75] at java.net.URL.openStream(URL.java:1037)[:1.7.0_75] at org.apache.jackrabbit.rmi.repository.URLRemoteRepositoryFactory.getRemoteRepository(URLRemoteRepositoryFactory.java:61)[1626:org.apache.jackrabbit.jackrabbit-jcr-rmi:2.6.2] ... 15 more
is there any specific configurations that should be done to let the karaf container see the jackrabbit url, any suggestion will be welcome , Thanks .