You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by "McIntyre, Kevin" <Ke...@intuit.com> on 2018/03/05 23:27:56 UTC
Spring Boot Pointers for 1.8.2 - RootNode not created.
Hello – I’m trying to get up and running with Spring Boot. I’m getting stuck seemingly after everything launches correctly.
Steps to getting going:
1. Copy org.apache.jackrabbit.j2ee classes from oak-examples/webapp/ into my project
2. Add @WebServlet annotations to following:
* RepositoryStartupServlet
* RepositoryAccessServlet
* JCRWebdavServerServlet
* SimpleWebdavServlet
3. Create Spring Boot Class
@SpringBootApplication(exclude = { DispatcherServletAutoConfiguration.class })
@ServletComponentScan("org.apache.jackrabbit.j2ee")
@Slf4j
public class OakBoot {
public static void main(String[] args) throws Exception {
SpringApplication.run(OakBoot.class, args);
}
@Bean
public ServletListenerRegistrationBean<ServletContextListener> listenerRegistrationBean() {
log.info("Start felix proxy listener");
ServletListenerRegistrationBean<ServletContextListener> bean = new ServletListenerRegistrationBean<ServletContextListener>();
bean.setListener(new ProxyListener());
return bean;
}
@Bean
public ServletRegistrationBean rmiRegistrationBean() {
log.info("Start rmi servlet");
ServletRegistrationBean bean = new ServletRegistrationBean(new RemoteBindingServlet(), "/rmi");
return bean;
}
@Bean
public ServletRegistrationBean proxyRegistrationBean() {
log.info("Start osgi servlet");
ServletRegistrationBean bean = new ServletRegistrationBean(new ProxyServlet(), "/osgi/*");
return bean;
}
}
These are the steps to mimic web.xml from oak-examples/webapp. Everything starts fine…but (there’s always a but), when I try to
getRootNode via webdav client I get the following exception.
org.apache.jackrabbit.webdav.DavException: Unable to retrieve NodeInfo for http://localhost:8081/server/default/jcr%3aroot/
Is there some servlet or listener I’m missing to that creates the jcr:root?
Thanks in advance,
--
Kevin McIntyre | Software Developer | SBG – WWSUI
kevin_mcintyre@intuit.com