hi marc

just a gut feeling without knowing all the details: to me that looks like an 
issue related to when a particular bundle gets installed when the order 
matters. e.g. trying to register a node type or adding an item with a prefixed 
name but the corresponding namespace is not yet registered.

the second exception
> org.apache.jackrabbit.oak.api.CommitFailedException: OakConstraint0001:
> /oak:index/jcrLanguage/:index[[]]: The primary type null does not exist
>           at
> org.apache.jackrabbit.oak.OakInitializer.initialize(OakInitializer.java:50)
>           at org.apache.jackrabbit.oak.Oak.initialContent(Oak.java:682)
>           at
> org.apache.jackrabbit.oak.Oak.createNewContentRepository(Oak.java:725)

is related to a RepositoryInitializer failing upon commit. in checked for 
'jcrLanguage' in the oak code base and could not find such an index being 
created out of the box. so, that might indicate that you have a custom 
RepositoryInitializer that installs in index definition called 'jcrLanguage'. 
you may want to check that initializer. and just for the sake of it: as far as 
i know the hidden ':index' node must not be created manually... you may want to 
verify this as well.... but i am not too familiar with the query code base to 
know all the details.

kind regards
angela

ps: i would suggest to move this thread to oak-...@jackrabbit.apache.org list 
once you have additional findings.

________________________________________
From: marc.davenp...@oracle.com <marc.davenp...@oracle.com>
Sent: Thursday, February 21, 2019 11:39 PM
To: users@jackrabbit.apache.org
Subject: Re: Occasional failure initializing Oak repository (Oak 1.10 + Sling10)

Angela et all,

Thank you for your reply. I still figured out how to consistently
reproduce this problem. I'm currently deploying my application over and
over until I hit the failure mode. I haven't identified the code that
creates the index to see why it might be failing. I could use some ideas
on where to look next, even if it is just a best guess.

In the failed state I can see that the component
org.apache.sling.jcr.oak.server.internal.OakSlingRepositoryManager is
active according the Felix Webconsole. But there is no cooresponding
service of the type org.apache.sling.jcr.api.SlingRepository.   This may
not be any additional information than can be gleaned from the logs,
just something I noticed trying to compare working and not working
instances.

Any ideas would be helpful at this point.

Thank you,

Marc


On 2/15/19 8:36 AM, Angela Schreiber wrote:
> hi marc
>
>
> i don't know why it would only fail every other time.
>
> but from the error messages you posted there seem to be the following 2 
> issues:
>
>
> a) you get a CommitFailedException pointing to a missing primary type at
>
>     /oak:index/jcrLanguage/:index[[]], which is raised by
>
>     TypeEditor.createEffectiveType.
>
>
>
>     that sounds a bit odd to me, because the index node is hidden and afaik
>
>     autocreated by the index machinery. maybe someone familiar with the query
>     code base in Oak can help with that.
>
>
> b) you get warnings during the initial repository start up because the 
> following 2
>
>     namespace prefixes have not been registered.
>
>     - sling
>
>     - slingevent
>
>
>     the warning prints the both registered prefixes and the one that is not
>
>     registered. see NameValidator.checkPrefix (line 117 ff):
>
> private void checkPrefix(String prefix) throws CommitFailedException {
>      if (prefix.isEmpty() || !contains(prefixes, namespaces, prefix)) {
>          String msg = "Invalid namespace prefix(" + prefixes + "): " + prefix;
>          if (initPhase && !strictInitialNSChecks) {
>              LOG.warn(msg);
>              return;
>          }
>          throw new CommitFailedException(CommitFailedException.NAME, 1, msg);
>      }
> }
>
> kind regards
> angela
>
>
>
>
>
> ________________________________________
> From: marc.davenp...@oracle.com <marc.davenp...@oracle.com>
> Sent: Thursday, February 14, 2019 9:49 PM
> To: users@jackrabbit.apache.org
> Subject: Occasional failure initializing Oak repository (Oak 1.10 + Sling10)
>
> Hello all,
>
> I previously wrote about an encryption issue which could be resolved by
> moving from Oak 1.6.8 to 1.10.0.  I was surprisingly able to convince my
> team to make this move now. I've been moderately successful. However,
> about 1/2 the time, our application will fail to deploy. I can not parse
> if this is a Oak failure or a sling10 failure or a configuration issue,
> but I'm looking for any insight as to what this might be.
>
> Here is what I believe to be the relevant  error messages:
>
> 14.02.2019 12:28:29.190 *WARN*[CM Event Dispatcher (Fire
> ConfigurationEvent:
> pid=org.apache.jackrabbit.oak.segment.SegmentNodeStoreService)]
> org.apache.sling.commons.scheduler.impl.QuartzSchedu
> ler Scheduler job requested thread pool with name oak but this thread
> pool is not in the list of allowed pools.
> 14.02.2019 12:28:29.453 *WARN*[Apache Sling Repository Startup Thread]
> org.apache.jackrabbit.oak.plugins.name.NameValidator Invalid namespace
> prefix([, sv, nt, xml, jcr, oak, rep, mix]): slinge
> vent
> 14.02.2019 12:28:29.454 *WARN*[Apache Sling Repository Startup Thread]
> org.apache.jackrabbit.oak.plugins.name.NameValidator Invalid namespace
> prefix([, sv, nt, xml, jcr, oak, rep, mix]): sling
> 14.02.2019 12:28:29.455 *WARN*[Apache Sling Repository Startup Thread]
> org.apache.jackrabbit.oak.plugins.name.NameValidator Invalid namespace
> prefix([, sv, nt, xml, jcr, oak, rep, mix]): sling
> 14.02.2019 12:28:29.455 *WARN*[Apache Sling Repository Startup Thread]
> org.apache.jackrabbit.oak.plugins.name.NameValidator Invalid namespace
> prefix([, sv, nt, xml, jcr, oak, rep, mix]): sling
> 14.02.2019 12:28:29.456 *WARN*[Apache Sling Repository Startup Thread]
> org.apache.jackrabbit.oak.plugins.name.NameValidator Invalid namespace
> prefix([, sv, nt, xml, jcr, oak, rep, mix]): sling
> 14.02.2019 12:28:29.904 *ERROR*[Apache Sling Repository Startup Thread]
> org.apache.sling.jcr.oak.server.internal.OakSlingRepositoryManager
> start: Uncaught Throwable trying to access Repository, calling
> stopRepository()
> java.lang.RuntimeException:
> org.apache.jackrabbit.oak.api.CommitFailedException: OakConstraint0001:
> /oak:index/jcrLanguage/:index[[]]: The primary type null does not exist
>           at
> org.apache.jackrabbit.oak.OakInitializer.initialize(OakInitializer.java:50)
>           at org.apache.jackrabbit.oak.Oak.initialContent(Oak.java:682)
>           at
> org.apache.jackrabbit.oak.Oak.createNewContentRepository(Oak.java:725)
>           at
> org.apache.jackrabbit.oak.Oak.createContentRepository(Oak.java:670)
>           at
> org.apache.jackrabbit.oak.jcr.Jcr.createContentRepository(Jcr.java:376)
>           at
> org.apache.sling.jcr.oak.server.internal.OakSlingRepositoryManager.acquireRepository(OakSlingRepositoryManager.java:152)
>           at
> org.apache.sling.jcr.base.AbstractSlingRepositoryManager.initializeAndRegisterRepositoryService(AbstractSlingRepositoryManager.java:471)
>           at
> org.apache.sling.jcr.base.AbstractSlingRepositoryManager.access$300(AbstractSlingRepositoryManager.java:85)
>           at
> org.apache.sling.jcr.base.AbstractSlingRepositoryManager$4.run(AbstractSlingRepositoryManager.java:455)
> Caused by: org.apache.jackrabbit.oak.api.CommitFailedException:
> OakConstraint0001: /oak:index/jcrLanguage/:index[[]]: The primary type
> null does not exist
>
> Any help or pointing in the right direction would be much appreciated.
>
> Marc
>
>

Reply via email to