[ https://issues.apache.org/jira/browse/JCR-3929?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15098022#comment-15098022 ]
Anton P. commented on JCR-3929: ------------------------------- Hi, Julian, I can reproduce it for jackrabbit-core 2.10.1 too. org.apache.jackrabbit.core.persistence.bundle.ConsistencyCheckerImpl:246 Will produce same NPE as Kamil reported. So this ticket is still valid for repositories with no nodes (newly created). > Can not create new repository > ----------------------------- > > Key: JCR-3929 > URL: https://issues.apache.org/jira/browse/JCR-3929 > Project: Jackrabbit Content Repository > Issue Type: Bug > Affects Versions: 2.7.1 > Reporter: Kamil > > Creation of fresh repository doesn't work with versions >= 2.7.1 > When I use version 2.6.5 or 2.7.0, remove old repository folder > (D:\jackrabbitdocuments), drop/recreate journal database and start the server > - everything work correctly. > When I switch from 2.7.0 to 2.7.1, remove old repository folder > (D:\jackrabbitdocuments), drop/recreate journal database and start the server > I obtain following exception: > {noformat} > 2015-11-03 13:16:42.568 INFO [localhost-startStop-1] RepositoryImpl.java:257 > Starting repository... > 2015-11-03 13:16:42.578 INFO [localhost-startStop-1] > LocalFileSystem.java:164 LocalFileSystem initialized at path > D:\jackrabbitdocuments\repository > 2015-11-03 13:16:42.696 INFO [localhost-startStop-1] > NodeTypeRegistry.java:870 no custom node type definitions found > 2015-11-03 13:16:42.974 INFO [localhost-startStop-1] > DatabaseJournal.java:375 Initialized local revision to 0 > 2015-11-03 13:16:42.975 INFO [localhost-startStop-1] > DatabaseJournal.java:384 Cluster revision janitor thread not started > 2015-11-03 13:16:42.976 INFO [localhost-startStop-1] > DatabaseJournal.java:280 DatabaseJournal initialized. > 2015-11-03 13:16:42.979 INFO [localhost-startStop-1] > LocalFileSystem.java:164 LocalFileSystem initialized at path > D:\jackrabbitdocuments\version > 2015-11-03 13:16:43.122 ERROR [localhost-startStop-1] RepositoryImpl.java:367 > failed to start Repository: Cannot instantiate persistence manager > org.apache.jackrabbit.core.persistence.pool.PostgreSQLPersistenceManager > javax.jcr.RepositoryException: Cannot instantiate persistence manager > org.apache.jackrabbit.core.persistence.pool.PostgreSQLPersistenceManager > at > org.apache.jackrabbit.core.RepositoryImpl.createPersistenceManager(RepositoryImpl.java:1354) > [jackrabbit-core-2.7.1.jar:2.7.1] > at > org.apache.jackrabbit.core.RepositoryImpl.createVersionManager(RepositoryImpl.java:487) > [jackrabbit-core-2.7.1.jar:2.7.1] > at > org.apache.jackrabbit.core.RepositoryImpl.<init>(RepositoryImpl.java:312) > [jackrabbit-core-2.7.1.jar:2.7.1] > at > org.apache.jackrabbit.core.RepositoryImpl.create(RepositoryImpl.java:590) > [jackrabbit-core-2.7.1.jar:2.7.1] > at > org.apache.jackrabbit.jca.JCARepositoryManager.createNonTransientRepository(JCARepositoryManager.java:124) > [jackrabbit-jca-2.7.1.jar:2.7.1] > at > org.apache.jackrabbit.jca.JCARepositoryManager.createRepository(JCARepositoryManager.java:79) > [jackrabbit-jca-2.7.1.jar:2.7.1] > at > org.apache.jackrabbit.jca.JCAManagedConnectionFactory.createRepository(JCAManagedConnectionFactory.java:216) > [jackrabbit-jca-2.7.1.jar:2.7.1] > at > org.apache.jackrabbit.jca.JCAManagedConnectionFactory.createConnectionFactory(JCAManagedConnectionFactory.java:153) > [jackrabbit-jca-2.7.1.jar:2.7.1] > at > org.springframework.jca.support.LocalConnectionFactoryBean.afterPropertiesSet(LocalConnectionFactoryBean.java:118) > [spring-tx-4.2.0.RELEASE.jar:4.2.0.RELEASE] > at > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1637) > [spring-beans-4.2.0.RELEASE.jar:4.2.0.RELEASE] > at > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1574) > [spring-beans-4.2.0.RELEASE.jar:4.2.0.RELEASE] > at > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545) > [spring-beans-4.2.0.RELEASE.jar:4.2.0.RELEASE] > at > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) > [spring-beans-4.2.0.RELEASE.jar:4.2.0.RELEASE] > at > org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:305) > [spring-beans-4.2.0.RELEASE.jar:4.2.0.RELEASE] > at > org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) > [spring-beans-4.2.0.RELEASE.jar:4.2.0.RELEASE] > at > org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:301) > [spring-beans-4.2.0.RELEASE.jar:4.2.0.RELEASE] > at > org.springframework.beans.factory.support.AbstractBeanFactory.getTypeForFactoryBean(AbstractBeanFactory.java:1468) > [spring-beans-4.2.0.RELEASE.jar:4.2.0.RELEASE] > at > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryBean(AbstractAutowireCapableBeanFactory.java:808) > [spring-beans-4.2.0.RELEASE.jar:4.2.0.RELEASE] > at > org.springframework.beans.factory.support.AbstractBeanFactory.isTypeMatch(AbstractBeanFactory.java:543) > [spring-beans-4.2.0.RELEASE.jar:4.2.0.RELEASE] > at > org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:447) > [spring-beans-4.2.0.RELEASE.jar:4.2.0.RELEASE] > at > org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:423) > [spring-beans-4.2.0.RELEASE.jar:4.2.0.RELEASE] > at > org.springframework.beans.factory.BeanFactoryUtils.beanNamesForTypeIncludingAncestors(BeanFactoryUtils.java:220) > [spring-beans-4.2.0.RELEASE.jar:4.2.0.RELEASE] > at > org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1130) > [spring-beans-4.2.0.RELEASE.jar:4.2.0.RELEASE] > at > org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1069) > [spring-beans-4.2.0.RELEASE.jar:4.2.0.RELEASE] > at > org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:967) > [spring-beans-4.2.0.RELEASE.jar:4.2.0.RELEASE] > at > org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.autowireResource(CommonAnnotationBeanPostProcessor.java:508) > [spring-context-4.2.0.RELEASE.jar:4.2.0.RELEASE] > at > org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.getResource(CommonAnnotationBeanPostProcessor.java:486) > [spring-context-4.2.0.RELEASE.jar:4.2.0.RELEASE] > at > org.springframework.context.annotation.CommonAnnotationBeanPostProcessor$ResourceElement.getResourceToInject(CommonAnnotationBeanPostProcessor.java:615) > [spring-context-4.2.0.RELEASE.jar:4.2.0.RELEASE] > at > org.springframework.beans.factory.annotation.InjectionMetadata$InjectedElement.inject(InjectionMetadata.java:169) > [spring-beans-4.2.0.RELEASE.jar:4.2.0.RELEASE] > at > org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88) > [spring-beans-4.2.0.RELEASE.jar:4.2.0.RELEASE] > at > org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessPropertyValues(CommonAnnotationBeanPostProcessor.java:308) > [spring-context-4.2.0.RELEASE.jar:4.2.0.RELEASE] > at > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1214) > [spring-beans-4.2.0.RELEASE.jar:4.2.0.RELEASE] > at > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543) > [spring-beans-4.2.0.RELEASE.jar:4.2.0.RELEASE] > at > org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) > [spring-beans-4.2.0.RELEASE.jar:4.2.0.RELEASE] > at > org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:305) > [spring-beans-4.2.0.RELEASE.jar:4.2.0.RELEASE] > at > org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) > [spring-beans-4.2.0.RELEASE.jar:4.2.0.RELEASE] > at > org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:301) > [spring-beans-4.2.0.RELEASE.jar:4.2.0.RELEASE] > at > org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:196) > [spring-beans-4.2.0.RELEASE.jar:4.2.0.RELEASE] > at > org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772) > [spring-beans-4.2.0.RELEASE.jar:4.2.0.RELEASE] > at > org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:834) > [spring-context-4.2.0.RELEASE.jar:4.2.0.RELEASE] > at > org.springframework.context.support.AbstractApplicationContext.__refresh(AbstractApplicationContext.java:537) > [spring-context-4.2.0.RELEASE.jar:4.2.0.RELEASE] > at > org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java) > [spring-context-4.2.0.RELEASE.jar:4.2.0.RELEASE] > at > org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:446) > [spring-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] > at > org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:328) > [spring-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] > at > org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107) > [spring-web-4.2.0.RELEASE.jar:4.2.0.RELEASE] > at > org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:5016) > [catalina.jar:7.0.59] > at > org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5524) > [catalina.jar:7.0.59] > at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) > [catalina.jar:7.0.59] > at > org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1575) > [catalina.jar:7.0.59] > at > org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1565) > [catalina.jar:7.0.59] > at java.util.concurrent.FutureTask.run(FutureTask.java:266) > [na:1.8.0_51] > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) > [na:1.8.0_51] > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) > [na:1.8.0_51] > at java.lang.Thread.run(Thread.java:745) [na:1.8.0_51] > Caused by: java.lang.NullPointerException: null > at > org.apache.jackrabbit.core.cache.ConcurrentCache.getSegment(ConcurrentCache.java:98) > ~[jackrabbit-core-2.7.1.jar:2.7.1] > at > org.apache.jackrabbit.core.cache.ConcurrentCache.get(ConcurrentCache.java:124) > ~[jackrabbit-core-2.7.1.jar:2.7.1] > at > org.apache.jackrabbit.core.persistence.bundle.AbstractBundlePersistenceManager.getBundle(AbstractBundlePersistenceManager.java:743) > ~[jackrabbit-core-2.7.1.jar:2.7.1] > at > org.apache.jackrabbit.core.persistence.bundle.AbstractBundlePersistenceManager.exists(AbstractBundlePersistenceManager.java:563) > ~[jackrabbit-core-2.7.1.jar:2.7.1] > at > org.apache.jackrabbit.core.persistence.bundle.ConsistencyCheckerImpl.internalCheckConsistency(ConsistencyCheckerImpl.java:246) > ~[jackrabbit-core-2.7.1.jar:2.7.1] > at > org.apache.jackrabbit.core.persistence.bundle.ConsistencyCheckerImpl.check(ConsistencyCheckerImpl.java:99) > ~[jackrabbit-core-2.7.1.jar:2.7.1] > at > org.apache.jackrabbit.core.persistence.bundle.AbstractBundlePersistenceManager.checkConsistency(AbstractBundlePersistenceManager.java:824) > ~[jackrabbit-core-2.7.1.jar:2.7.1] > at > org.apache.jackrabbit.core.persistence.pool.BundleDbPersistenceManager.init(BundleDbPersistenceManager.java:562) > ~[jackrabbit-core-2.7.1.jar:2.7.1] > at > org.apache.jackrabbit.core.persistence.pool.PostgreSQLPersistenceManager.init(PostgreSQLPersistenceManager.java:57) > ~[jackrabbit-core-2.7.1.jar:2.7.1] > at > org.apache.jackrabbit.core.RepositoryImpl.createPersistenceManager(RepositoryImpl.java:1350) > [jackrabbit-core-2.7.1.jar:2.7.1] > ... 53 common frames omitted > 2015-11-03 13:16:43.123 INFO [localhost-startStop-1] > RepositoryImpl.java:1061 Shutting down repository... > 2015-11-03 13:16:43.138 INFO [localhost-startStop-1] > RepositoryImpl.java:1166 Repository has been shutdown > {noformat} > My repository.xml: > {noformat} > <?xml version="1.0"?> > <!DOCTYPE Repository > PUBLIC "-//The Apache Software Foundation//DTD Jackrabbit 2.0//EN" > "http://jackrabbit.apache.org/dtd/repository-2.0.dtd"> > <Repository> > <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem"> > <param name="path" value="${rep.home}/repository"/> > </FileSystem> > <DataStore class="org.apache.jackrabbit.core.data.FileDataStore"> > <param name="path" value="${repository.common}/datastore" /> > <param name="minRecordLength" value="100" /> > </DataStore> > <Security appName="Jackrabbit"> > <SecurityManager > class="org.apache.jackrabbit.core.DefaultSecurityManager" > workspaceName="security"> > <WorkspaceAccessManager > class="org.apache.jackrabbit.core.security.simple.SimpleWorkspaceAccessManager" > /> > </SecurityManager> > <AccessManager > class="org.apache.jackrabbit.core.security.DefaultAccessManager" /> > <LoginModule > class="org.apache.jackrabbit.core.security.authentication.DefaultLoginModule"> > <param name="adminId" value="${repository.user}" /> > <param name="anonymousId" value="anonymous" /> > </LoginModule> > </Security> > <Workspaces rootPath="${rep.home}/workspaces" defaultWorkspace="default"/> > <Workspace name="${wsp.name}"> > <FileSystem > class="org.apache.jackrabbit.core.fs.local.LocalFileSystem"> > <param name="path" value="${wsp.home}"/> > </FileSystem> > <PersistenceManager > class="org.apache.jackrabbit.core.persistence.pool.PostgreSQLPersistenceManager"> > <param name="driver" value="${repository.driver}" /> > <param name="url" value="${repository.url}" /> > <param name="user" value="${repository.user}" /> > <param name="password" value="${repository.password}" /> > <param name="schemaObjectPrefix" value="storage_" /> > <param name="schema" value="${repository.ddl}" /> > <param name="bundleCacheSize" value="8" /> > <param name="minBlobSize" value="16384" /> > <param name="consistencyCheck" value="true" /> > <param name="consistencyFix" value="true" /> > </PersistenceManager> > <SearchIndex > class="org.apache.jackrabbit.core.query.lucene.SearchIndex"> > <param name="path" value="${wsp.home}/index"/> > <param name="supportHighlighting" value="true"/> > </SearchIndex> > > <WorkspaceSecurity> > <AccessControlProvider > class="org.apache.jackrabbit.core.security.authorization.principalbased.ACLProvider"> > <param name="omit-default-permission" value="true" /> > </AccessControlProvider> > </WorkspaceSecurity> > </Workspace> > <Versioning rootPath="${rep.home}/version"> > <FileSystem > class="org.apache.jackrabbit.core.fs.local.LocalFileSystem"> > <param name="path" value="${rep.home}/version" /> > </FileSystem> > <PersistenceManager > class="org.apache.jackrabbit.core.persistence.pool.PostgreSQLPersistenceManager"> > <param name="driver" value="${repository.driver}" /> > <param name="url" value="${repository.url}" /> > <param name="user" value="${repository.user}" /> > <param name="password" value="${repository.password}" /> > <param name="schemaObjectPrefix" value="version_" /> > <param name="schema" value="${repository.ddl}" /> > <param name="bundleCacheSize" value="8" /> > <param name="minBlobSize" value="16384" /> > <param name="consistencyCheck" value="true" /> > <param name="consistencyFix" value="true" /> > </PersistenceManager> > </Versioning> > <SearchIndex class="org.apache.jackrabbit.core.query.lucene.SearchIndex"> > <param name="path" value="${rep.home}/repository/index"/> > <param name="supportHighlighting" value="true"/> > <param name="enableConsistencyCheck" value="true" /> > <param name="forceConsistencyCheck" value="true" /> > <param name="autoRepair" value="true" /> > </SearchIndex> > > <Cluster id="node-${tomcat.instance.name}" syncDelay="2000"> > <Journal class="org.apache.jackrabbit.core.journal.DatabaseJournal"> > <param name="driver" value="${repository.driver}"/> > <param name="url" value="${repository.url}"/> > <param name="schema" value="${repository.ddl}"/> > <param name="schemaObjectPrefix" value="jrnl_"/> > <param name="user" value="${repository.user}" /> > <param name="password" value="${repository.password}" /> > </Journal> > </Cluster> > </Repository> > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)