jackrabbit-oak-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Davide Giannella <giannella.dav...@gmail.com>
Subject javax.jcr.nodetype.ConstraintViolationException oak:QueryIndexDefinition in oak-run
Date Fri, 07 Feb 2014 08:51:53 GMT
Good morning,

trying to create some benchmarks in oak-run. I'm defining an index
definition with the following snippet in the beforeTest()

index = indexRoot.addNode("testStandardProperty");
index.setProperty("unique", false);
index.setProperty("reindex", false);
index.setProperty("type","property");
index.setProperty("propertyNames", new String[]{INDEXED_PROPERTY});
index.setProperty("jcr:primaryType",
IndexConstants.INDEX_DEFINITIONS_NODE_TYPE);
session.save();

but when executed getting the exception

javax.jcr.nodetype.ConstraintViolationException: No matching property
definition: jcr:primaryType = oak:QueryIndexDefinition
    at org.apache.jackrabbit.oak.jcr.delegate.NodeDelegate.setProperty(NodeDelegate.java:515)
    at org.apache.jackrabbit.oak.jcr.session.NodeImpl$38.perform(NodeImpl.java:1345)
    at org.apache.jackrabbit.oak.jcr.session.NodeImpl$38.perform(NodeImpl.java:1334)
    at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.perform(SessionDelegate.java:154)
    at org.apache.jackrabbit.oak.jcr.session.ItemImpl.perform(ItemImpl.java:111)
    at org.apache.jackrabbit.oak.jcr.session.NodeImpl.internalSetProperty(NodeImpl.java:1334)
    at org.apache.jackrabbit.oak.jcr.session.NodeImpl.setProperty(NodeImpl.java:428)
    at org.apache.jackrabbit.oak.benchmark.StardardPropertyIndexOrderByInsertTest.beforeTest(StardardPropertyIndexOrderByInsertTest.java:42)
    at org.apache.jackrabbit.oak.benchmark.AbstractTest.execute(AbstractTest.java:271)
    at org.apache.jackrabbit.oak.benchmark.BaseOrderByInsertTest.execute(BaseOrderByInsertTest.java:29)
    at org.apache.jackrabbit.oak.benchmark.AbstractTest.runTest(AbstractTest.java:157)
    at org.apache.jackrabbit.oak.benchmark.AbstractTest.run(AbstractTest.java:138)
    at org.apache.jackrabbit.oak.benchmark.BaseOrderByInsertTest.run(BaseOrderByInsertTest.java:29)
    at org.apache.jackrabbit.oak.benchmark.BenchmarkRunner.main(BenchmarkRunner.java:198)
    at org.apache.jackrabbit.oak.run.Main.main(Main.java:81)

Any hints?

Regards
Davide

Mime
View raw message