我是骆驼世界的新手,我在与jcr组件建立连接方面遇到了问题.看看我的测试代码:
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.jcr.JcrConstants;
import org.apache.camel.test.junit4.CamelTestSupport;
import org.junit.Test;
public class ObjectToJCRRouteTest extends CamelTestSupport {
@Override
protected RouteBuilder createRouteBuilder() throws Exception {
return new RouteBuilder() {
@Override
public void configure() throws Exception {
from("direct:a")
.setProperty(JcrConstants.JCR_NODE_NAME,
constant("node"))
.setProperty("my.contents.property", body())
.to("jcr://admin:admin@localhost:8080/home/test");
}
};
}
@Test
public void putJCRNode() throws Exception {
template.sendBodyAndHeader("direct:a", null, null, null);
Thread.sleep(1000);
}
}
Run Code Online (Sandbox Code Playgroud)
我试过了jcr:// admin:admin @ localhost/home/test","jcr:// admin:admin @ localhost:8080/home/test","jcr:// admin:admin @ localhost:8080/repository /家/测试"
我使用rmi使用存储库资源管理器(http://www.subshell.com/en/toromiro/index.html)测试了jackrabbit 并且连接成功了
在任何帮助下提前感谢!
我的jackrabit服务器是:
jmartinez @ jmartinez:〜/ software/jackrabbit $ java -jar …