You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by mathiasconradt <ma...@gmail.com> on 2016/12/17 13:07:03 UTC

oak-standalone with --mongo unable to start repository

Following the README.md at
https://svn.apache.org/repos/asf/jackrabbit/oak/trunk/oak-examples/standalone/README.md,
I try to start the standalone application with Mongo. I just pulled the code
from the trunk as of today and did a 'mvn clean install' without any other
configuration or modifications.
Starting the app with mongo support fails with errors though. (The app works
fine without Mongo but the default SegmentMk/File System though).

I have Mongod running on localhost and default port. After I run

$ java -jar target/oak-standalone-1.6-SNAPSHOT.jar --mongo

and I check in Mongo, I do see that the oak database got created
(oak.mongo.db=oak in application.yml of the standalone sample app), i.e.:

> use oak
switched to db oak
> show tables
journal
nodes
system.indexes
> db.system.indexes.find({})
{ "v" : 1, "key" : { "_id" : 1 }, "name" : "_id_", "ns" : "oak.nodes" }
{ "v" : 1, "key" : { "_modified" : 1, "_id" : 1 }, "name" :
"_modified_1__id_1", "ns" : "oak.nodes" }
{ "v" : 1, "key" : { "_bin" : 1 }, "name" : "_bin_1", "ns" : "oak.nodes",
"sparse" : true }
{ "v" : 1, "key" : { "_deletedOnce" : 1 }, "name" : "_deletedOnce_1", "ns" :
"oak.nodes", "sparse" : true }
{ "v" : 1, "key" : { "_sdType" : 1 }, "name" : "_sdType_1", "ns" :
"oak.nodes", "sparse" : true }
{ "v" : 1, "key" : { "_id" : 1 }, "name" : "_id_", "ns" : "oak.journal" }
{ "v" : 1, "key" : { "_modified" : 1 }, "name" : "_modified_1", "ns" :
"oak.journal" }
> 


However, the application throws the following errors and then halts. Am I
missing something?


SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further
details.

  .   ____          _            __ _ _
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v1.3.0.RELEASE)

java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:483)
	at
org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:53)
	at java.lang.Thread.run(Thread.java:745)
Caused by: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'metricsSupport': Injection of autowired
dependencies failed; nested exception is
org.springframework.beans.factory.BeanCreationException: Could not autowire
field: private org.apache.felix.connect.launch.PojoServiceRegistry
org.apache.jackrabbit.oak.standalone.MetricsSupport.serviceRegistry; nested
exception is org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'repositoryInitializer': Invocation of init method
failed; nested exception is javax.jcr.RepositoryException: Repository could
not be started in 10 seconds
	at
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1214)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
	at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
	at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
	at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
	at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
	at
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772)
	at
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:838)
	at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:537)
	at
org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118)
	at
org.springframework.boot.SpringApplication.refresh(SpringApplication.java:752)
	at
org.springframework.boot.SpringApplication.doRun(SpringApplication.java:347)
	at
org.springframework.boot.SpringApplication.run(SpringApplication.java:295)
	at
org.springframework.boot.SpringApplication.run(SpringApplication.java:1112)
	at
org.springframework.boot.SpringApplication.run(SpringApplication.java:1101)
	at org.apache.jackrabbit.oak.standalone.OakServer.main(OakServer.java:29)
	... 6 more
Caused by: org.springframework.beans.factory.BeanCreationException: Could
not autowire field: private
org.apache.felix.connect.launch.PojoServiceRegistry
org.apache.jackrabbit.oak.standalone.MetricsSupport.serviceRegistry; nested
exception is org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'repositoryInitializer': Invocation of init method
failed; nested exception is javax.jcr.RepositoryException: Repository could
not be started in 10 seconds
	at
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:573)
	at
org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
	at
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:331)
	... 23 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error
creating bean with name 'repositoryInitializer': Invocation of init method
failed; nested exception is javax.jcr.RepositoryException: Repository could
not be started in 10 seconds
	at
org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:136)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:408)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1570)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
	at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
	at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
	at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
	at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
	at
org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:368)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1123)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1018)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510)
	at
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
	at
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
	at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
	at
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
	at
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
	at
org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1192)
	at
org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1116)
	at
org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1014)
	at
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:545)
	... 25 more
Caused by: javax.jcr.RepositoryException: Repository could not be started in
10 seconds
	at
org.apache.jackrabbit.oak.run.osgi.OakOSGiRepositoryFactory.getRepository(OakOSGiRepositoryFactory.java:213)
	at
org.apache.jackrabbit.oak.standalone.RepositoryInitializer.createRepository(RepositoryInitializer.java:132)
	at
org.apache.jackrabbit.oak.standalone.RepositoryInitializer.initRepository(RepositoryInitializer.java:111)
	at
org.apache.jackrabbit.oak.standalone.RepositoryInitializer.initialize(RepositoryInitializer.java:83)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:483)
	at
org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:354)
	at
org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:305)
	at
org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:133)
	... 46 more
Caused by: java.util.concurrent.TimeoutException: Timeout waiting for task.
	at
com.google.common.util.concurrent.AbstractFuture$Sync.get(AbstractFuture.java:269)
	at
com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:96)
	at
org.apache.jackrabbit.oak.run.osgi.OakOSGiRepositoryFactory.getRepository(OakOSGiRepositoryFactory.java:195)
	... 56 more


Thanks for any hints.

Environment:
Mac OS X El Capitano
java version "1.8.0_31"
Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)

- Mathias



--
View this message in context: http://jackrabbit.510166.n4.nabble.com/oak-standalone-with-mongo-unable-to-start-repository-tp4665855.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

Re: oak-standalone with --mongo unable to start repository

Posted by mathiasconradt <ma...@gmail.com>.
btw: I can start the app and the repository just fine via: java -jar
target/oak-standalone-1.6-SNAPSHOT.jar (without the --mongo option),
therefore I thought it's related to Mongo. I will do some further debugging
in the code itself now.

I think it's related to OakOSGiRepositoryFactory().getRepository(config) in
the standalone app.

In general, I can start and create an Oak server with Mongo support with my
own code (non-OSGi) or also when I run your meta64 project, I have no
problems; just with the Oak standalone example app.



--
View this message in context: http://jackrabbit.510166.n4.nabble.com/oak-standalone-with-mongo-unable-to-start-repository-tp4665855p4665859.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

Re: oak-standalone with --mongo unable to start repository

Posted by mathiasconradt <ma...@gmail.com>.
Hi Chetan,

thanks, I just did a pull from the trunk and it's working now :)

Another note: when starting up the app, it now throws an error regarding
devex. However, it doesn't not  influence the rest of the functionality
(server, repository and webdav support is working fine so far).


2016-12-17 17:55:43.138 ERROR 13448 --- [           main]
o.a.j.s.r.davex.ProtectedRemoveManager   :
remoting/protectedHandlersConfig.xml

java.lang.ClassNotFoundException: remoting/protectedHandlersConfig.xml
	at java.lang.Class.forName0(Native Method) ~[na:1.8.0_31]
	at java.lang.Class.forName(Class.java:260) ~[na:1.8.0_31]
	at
org.apache.jackrabbit.server.remoting.davex.ProtectedRemoveManager.createHandler(ProtectedRemoveManager.java:92)
[jackrabbit-jcr-server-2.13.6.jar!/:na]
	at
org.apache.jackrabbit.server.remoting.davex.ProtectedRemoveManager.<init>(ProtectedRemoveManager.java:59)
[jackrabbit-jcr-server-2.13.6.jar!/:na]
	at
org.apache.jackrabbit.server.remoting.davex.JcrRemotingServlet.init(JcrRemotingServlet.java:284)
[jackrabbit-jcr-server-2.13.6.jar!/:na]
	at javax.servlet.GenericServlet.init(GenericServlet.java:244)
[javax.servlet-api-3.1.0.jar!/:3.1.0]
	at
org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:616)
[jetty-servlet-9.2.14.v20151106.jar!/:9.2.14.v20151106]
	at
org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:396)
[jetty-servlet-9.2.14.v20151106.jar!/:9.2.14.v20151106]
	at
org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:871)
[jetty-servlet-9.2.14.v20151106.jar!/:9.2.14.v20151106]
	at
org.springframework.boot.context.embedded.jetty.JettyEmbeddedWebAppContext$JettyEmbeddedServletHandler.deferredInitialize(JettyEmbeddedWebAppContext.java:46)
[spring-boot-1.3.0.RELEASE.jar!/:1.3.0.RELEASE]
	at
org.springframework.boot.context.embedded.jetty.JettyEmbeddedWebAppContext.deferredInitialize(JettyEmbeddedWebAppContext.java:36)
[spring-boot-1.3.0.RELEASE.jar!/:1.3.0.RELEASE]
	at
org.springframework.boot.context.embedded.jetty.JettyEmbeddedServletContainer.handleDeferredInitialize(JettyEmbeddedServletContainer.java:166)
[spring-boot-1.3.0.RELEASE.jar!/:1.3.0.RELEASE]
	at
org.springframework.boot.context.embedded.jetty.JettyEmbeddedServletContainer.start(JettyEmbeddedServletContainer.java:113)
[spring-boot-1.3.0.RELEASE.jar!/:1.3.0.RELEASE]
	at
org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.startEmbeddedServletContainer(EmbeddedWebApplicationContext.java:290)
[spring-boot-1.3.0.RELEASE.jar!/:1.3.0.RELEASE]
	at
org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.finishRefresh(EmbeddedWebApplicationContext.java:141)
[spring-boot-1.3.0.RELEASE.jar!/:1.3.0.RELEASE]
	at
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:540)
[spring-context-4.2.3.RELEASE.jar!/:4.2.3.RELEASE]
	at
org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118)
[spring-boot-1.3.0.RELEASE.jar!/:1.3.0.RELEASE]
	at
org.springframework.boot.SpringApplication.refresh(SpringApplication.java:752)
[spring-boot-1.3.0.RELEASE.jar!/:1.3.0.RELEASE]
	at
org.springframework.boot.SpringApplication.doRun(SpringApplication.java:347)
[spring-boot-1.3.0.RELEASE.jar!/:1.3.0.RELEASE]
	at
org.springframework.boot.SpringApplication.run(SpringApplication.java:295)
[spring-boot-1.3.0.RELEASE.jar!/:1.3.0.RELEASE]
	at
org.springframework.boot.SpringApplication.run(SpringApplication.java:1112)
[spring-boot-1.3.0.RELEASE.jar!/:1.3.0.RELEASE]
	at
org.springframework.boot.SpringApplication.run(SpringApplication.java:1101)
[spring-boot-1.3.0.RELEASE.jar!/:1.3.0.RELEASE]
	at org.apache.jackrabbit.oak.standalone.OakServer.main(OakServer.java:29)
[oak-standalone-1.6-SNAPSHOT.jar!/:1.6-SNAPSHOT]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
~[na:1.8.0_31]
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
~[na:1.8.0_31]
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
~[na:1.8.0_31]
	at java.lang.reflect.Method.invoke(Method.java:483) ~[na:1.8.0_31]
	at
org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:53)
[oak-standalone-1.6-SNAPSHOT.jar!/:1.6-SNAPSHOT]
	at java.lang.Thread.run(Thread.java:745) [na:1.8.0_31]

- Mathias



--
View this message in context: http://jackrabbit.510166.n4.nabble.com/oak-standalone-with-mongo-unable-to-start-repository-tp4665855p4665861.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

Re: oak-standalone with --mongo unable to start repository

Posted by Chetan Mehrotra <ch...@gmail.com>.
Hi Mathias,

Thanks for reporting it. Fixed the issue as part of OAK-5333. Can you
try out the build from latest trunk again?
Chetan Mehrotra


On Sat, Dec 17, 2016 at 9:26 PM, mathiasconradt
<ma...@gmail.com> wrote:
> Clay, thanks for your reply.
>
> Dependencies look good. Maven states this dependency (as below):
> org.apache.felix:org.apache.felix.connect:jar:0.1.0:compile
>
> and when I look inside my spring-app-jar, I see the
> org.apache.felix.connect-0.1.0.jar in the lib-folder there.
>
>
> $ mvn dependency:tree -Dverbose
> -Dincludes=org.apache.felix:org.apache.felix.connect
> [INFO] Scanning for projects...
> [INFO]
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Building Oak Standalone Example 1.6-SNAPSHOT
> [INFO]
> ------------------------------------------------------------------------
> [INFO]
> [INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ oak-standalone
> ---
> [INFO] org.apache.jackrabbit:oak-standalone:jar:1.6-SNAPSHOT
> [INFO] \- org.apache.jackrabbit:oak-pojosr:jar:1.6-SNAPSHOT:compile
> [INFO]    \- org.apache.felix:org.apache.felix.connect:jar:0.1.0:compile
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 2.700 s
> [INFO] Finished at: 2016-12-17T17:06:15+01:00
> [INFO] Final Memory: 29M/703M
> [INFO]
> ------------------------------------------------------------------------
>
>
>
>
> --
> View this message in context: http://jackrabbit.510166.n4.nabble.com/oak-standalone-with-mongo-unable-to-start-repository-tp4665855p4665857.html
> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

Re: oak-standalone with --mongo unable to start repository

Posted by mathiasconradt <ma...@gmail.com>.
Clay, thanks for your reply.

Dependencies look good. Maven states this dependency (as below):
org.apache.felix:org.apache.felix.connect:jar:0.1.0:compile

and when I look inside my spring-app-jar, I see the
org.apache.felix.connect-0.1.0.jar in the lib-folder there.


$ mvn dependency:tree -Dverbose
-Dincludes=org.apache.felix:org.apache.felix.connect
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO]
------------------------------------------------------------------------
[INFO] Building Oak Standalone Example 1.6-SNAPSHOT
[INFO]
------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ oak-standalone
---
[INFO] org.apache.jackrabbit:oak-standalone:jar:1.6-SNAPSHOT
[INFO] \- org.apache.jackrabbit:oak-pojosr:jar:1.6-SNAPSHOT:compile
[INFO]    \- org.apache.felix:org.apache.felix.connect:jar:0.1.0:compile
[INFO]
------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 2.700 s
[INFO] Finished at: 2016-12-17T17:06:15+01:00
[INFO] Final Memory: 29M/703M
[INFO]
------------------------------------------------------------------------




--
View this message in context: http://jackrabbit.510166.n4.nabble.com/oak-standalone-with-mongo-unable-to-start-repository-tp4665855p4665857.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

Re: oak-standalone with --mongo unable to start repository

Posted by Clay Ferguson <wc...@gmail.com>.
Mathias,
I think it may be that the mongo error is not the real root cause but it
might be just a classpath problem because of "Could not autowire
field: private org.apache.felix.connect.launch.PojoServiceRegistry
​"​. Use that maven command line switch that dumps out the dependency tree
and verify that this particular felix class is on the classpath and that
it's the correct one on the classpath. Something in the springboot may be
overriding it on the classpath with a version-incompatible situation, or it
may be missing from the classpath entirely.

Best regards,
Clay Ferguson
wclayf@gmail.com


On Sat, Dec 17, 2016 at 7:07 AM, mathiasconradt <ma...@gmail.com>
wrote:

> Following the README.md at
> https://svn.apache.org/repos/asf/jackrabbit/oak/trunk/oak-
> examples/standalone/README.md,
> I try to start the standalone application with Mongo. I just pulled the
> code
> from the trunk as of today and did a 'mvn clean install' without any other
> configuration or modifications.
> Starting the app with mongo support fails with errors though. (The app
> works
> fine without Mongo but the default SegmentMk/File System though).
>
> I have Mongod running on localhost and default port. After I run
>
> $ java -jar target/oak-standalone-1.6-SNAPSHOT.jar --mongo
>
> and I check in Mongo, I do see that the oak database got created
> (oak.mongo.db=oak in application.yml of the standalone sample app), i.e.:
>
> > use oak
> switched to db oak
> > show tables
> journal
> nodes
> system.indexes
> > db.system.indexes.find({})
> { "v" : 1, "key" : { "_id" : 1 }, "name" : "_id_", "ns" : "oak.nodes" }
> { "v" : 1, "key" : { "_modified" : 1, "_id" : 1 }, "name" :
> "_modified_1__id_1", "ns" : "oak.nodes" }
> { "v" : 1, "key" : { "_bin" : 1 }, "name" : "_bin_1", "ns" : "oak.nodes",
> "sparse" : true }
> { "v" : 1, "key" : { "_deletedOnce" : 1 }, "name" : "_deletedOnce_1", "ns"
> :
> "oak.nodes", "sparse" : true }
> { "v" : 1, "key" : { "_sdType" : 1 }, "name" : "_sdType_1", "ns" :
> "oak.nodes", "sparse" : true }
> { "v" : 1, "key" : { "_id" : 1 }, "name" : "_id_", "ns" : "oak.journal" }
> { "v" : 1, "key" : { "_modified" : 1 }, "name" : "_modified_1", "ns" :
> "oak.journal" }
> >
>
>
> However, the application throws the following errors and then halts. Am I
> missing something?
>
>
> SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
> SLF4J: Defaulting to no-operation (NOP) logger implementation
> SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further
> details.
>
>   .   ____          _            __ _ _
>  /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
> ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
>  \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
>   '  |____| .__|_| |_|_| |_\__, | / / / /
>  =========|_|==============|___/=/_/_/_/
>  :: Spring Boot ::        (v1.3.0.RELEASE)
>
> java.lang.reflect.InvocationTargetException
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
> 62)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:483)
>         at
> org.springframework.boot.loader.MainMethodRunner.run(
> MainMethodRunner.java:53)
>         at java.lang.Thread.run(Thread.java:745)
> Caused by: org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'metricsSupport': Injection of autowired
> dependencies failed; nested exception is
> org.springframework.beans.factory.BeanCreationException: Could not
> autowire
> field: private org.apache.felix.connect.launch.PojoServiceRegistry
> org.apache.jackrabbit.oak.standalone.MetricsSupport.serviceRegistry;
> nested
> exception is org.springframework.beans.factory.BeanCreationException:
> Error
> creating bean with name 'repositoryInitializer': Invocation of init method
> failed; nested exception is javax.jcr.RepositoryException: Repository could
> not be started in 10 seconds
>         at
> org.springframework.beans.factory.annotation.
> AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(
> AutowiredAnnotationBeanPostProcessor.java:334)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> tory.populateBean(AbstractAutowireCapableBeanFactory.java:1214)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> tory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> tory.createBean(AbstractAutowireCapableBeanFactory.java:482)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.
> getObject(AbstractBeanFactory.java:306)
>         at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.
> getSingleton(DefaultSingletonBeanRegistry.java:230)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(
> AbstractBeanFactory.java:302)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(
> AbstractBeanFactory.java:197)
>         at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.
> preInstantiateSingletons(DefaultListableBeanFactory.java:772)
>         at
> org.springframework.context.support.AbstractApplicationContext.
> finishBeanFactoryInitialization(AbstractApplicationContext.java:838)
>         at
> org.springframework.context.support.AbstractApplicationContext.refresh(
> AbstractApplicationContext.java:537)
>         at
> org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.
> refresh(EmbeddedWebApplicationContext.java:118)
>         at
> org.springframework.boot.SpringApplication.refresh(
> SpringApplication.java:752)
>         at
> org.springframework.boot.SpringApplication.doRun(
> SpringApplication.java:347)
>         at
> org.springframework.boot.SpringApplication.run(SpringApplication.java:295)
>         at
> org.springframework.boot.SpringApplication.run(
> SpringApplication.java:1112)
>         at
> org.springframework.boot.SpringApplication.run(
> SpringApplication.java:1101)
>         at org.apache.jackrabbit.oak.standalone.OakServer.main(
> OakServer.java:29)
>         ... 6 more
> Caused by: org.springframework.beans.factory.BeanCreationException: Could
> not autowire field: private
> org.apache.felix.connect.launch.PojoServiceRegistry
> org.apache.jackrabbit.oak.standalone.MetricsSupport.serviceRegistry;
> nested
> exception is org.springframework.beans.factory.BeanCreationException:
> Error
> creating bean with name 'repositoryInitializer': Invocation of init method
> failed; nested exception is javax.jcr.RepositoryException: Repository could
> not be started in 10 seconds
>         at
> org.springframework.beans.factory.annotation.
> AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(
> AutowiredAnnotationBeanPostProcessor.java:573)
>         at
> org.springframework.beans.factory.annotation.InjectionMetadata.inject(
> InjectionMetadata.java:88)
>         at
> org.springframework.beans.factory.annotation.
> AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(
> AutowiredAnnotationBeanPostProcessor.java:331)
>         ... 23 more
> Caused by: org.springframework.beans.factory.BeanCreationException: Error
> creating bean with name 'repositoryInitializer': Invocation of init method
> failed; nested exception is javax.jcr.RepositoryException: Repository could
> not be started in 10 seconds
>         at
> org.springframework.beans.factory.annotation.
> InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(
> InitDestroyAnnotationBeanPostProcessor.java:136)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> tory.applyBeanPostProcessorsBeforeInitialization(
> AbstractAutowireCapableBeanFactory.java:408)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> tory.initializeBean(AbstractAutowireCapableBeanFactory.java:1570)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> tory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> tory.createBean(AbstractAutowireCapableBeanFactory.java:482)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.
> getObject(AbstractBeanFactory.java:306)
>         at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.
> getSingleton(DefaultSingletonBeanRegistry.java:230)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(
> AbstractBeanFactory.java:302)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(
> AbstractBeanFactory.java:197)
>         at
> org.springframework.beans.factory.support.ConstructorResolver.
> instantiateUsingFactoryMethod(ConstructorResolver.java:368)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> tory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFac
> tory.java:1123)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> tory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1018)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> tory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510)
>         at
> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFac
> tory.createBean(AbstractAutowireCapableBeanFactory.java:482)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory$1.
> getObject(AbstractBeanFactory.java:306)
>         at
> org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.
> getSingleton(DefaultSingletonBeanRegistry.java:230)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(
> AbstractBeanFactory.java:302)
>         at
> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(
> AbstractBeanFactory.java:197)
>         at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.
> findAutowireCandidates(DefaultListableBeanFactory.java:1192)
>         at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.
> doResolveDependency(DefaultListableBeanFactory.java:1116)
>         at
> org.springframework.beans.factory.support.DefaultListableBeanFactory.
> resolveDependency(DefaultListableBeanFactory.java:1014)
>         at
> org.springframework.beans.factory.annotation.
> AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(
> AutowiredAnnotationBeanPostProcessor.java:545)
>         ... 25 more
> Caused by: javax.jcr.RepositoryException: Repository could not be started
> in
> 10 seconds
>         at
> org.apache.jackrabbit.oak.run.osgi.OakOSGiRepositoryFactory.getRepository(
> OakOSGiRepositoryFactory.java:213)
>         at
> org.apache.jackrabbit.oak.standalone.RepositoryInitializer.
> createRepository(RepositoryInitializer.java:132)
>         at
> org.apache.jackrabbit.oak.standalone.RepositoryInitializer.initRepository(
> RepositoryInitializer.java:111)
>         at
> org.apache.jackrabbit.oak.standalone.RepositoryInitializer.initialize(
> RepositoryInitializer.java:83)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
> 62)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43)
>         at java.lang.reflect.Method.invoke(Method.java:483)
>         at
> org.springframework.beans.factory.annotation.
> InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(
> InitDestroyAnnotationBeanPostProcessor.java:354)
>         at
> org.springframework.beans.factory.annotation.
> InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.
> invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:305)
>         at
> org.springframework.beans.factory.annotation.
> InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(
> InitDestroyAnnotationBeanPostProcessor.java:133)
>         ... 46 more
> Caused by: java.util.concurrent.TimeoutException: Timeout waiting for
> task.
>         at
> com.google.common.util.concurrent.AbstractFuture$
> Sync.get(AbstractFuture.java:269)
>         at
> com.google.common.util.concurrent.AbstractFuture.get(
> AbstractFuture.java:96)
>         at
> org.apache.jackrabbit.oak.run.osgi.OakOSGiRepositoryFactory.getRepository(
> OakOSGiRepositoryFactory.java:195)
>         ... 56 more
>
>
> Thanks for any hints.
>
> Environment:
> Mac OS X El Capitano
> java version "1.8.0_31"
> Java(TM) SE Runtime Environment (build 1.8.0_31-b13)
> Java HotSpot(TM) 64-Bit Server VM (build 25.31-b07, mixed mode)
>
> - Mathias
>
>
>
> --
> View this message in context: http://jackrabbit.510166.n4.
> nabble.com/oak-standalone-with-mongo-unable-to-start-
> repository-tp4665855.html
> Sent from the Jackrabbit - Users mailing list archive at Nabble.com.
>