[jira] [Reopened] (OAK-7428) LdapIdentityProvider doesn't support creating external ids from custom attributes
[ https://issues.apache.org/jira/browse/OAK-7428?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Julian Reschke reopened OAK-7428: - Javadoc errors: {noformat} [ERROR] Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:3.0.0-M1:jar (default-cli) on project oak-auth-ldap: MavenReportException: Error while generating Javadoc: [ERROR] Exit code: 1 - C:\projects\apache\oak\trunk\oak-auth-ldap\src\main\java\org\apache\jackrabbit\oak\security\authentication\ldap\impl\LdapProviderConfig.java:414: error: reference not found [ERROR] * @see #getExtIdAttribute() [ERROR] ^ [ERROR] C:\projects\apache\oak\trunk\oak-auth-ldap\src\main\java\org\apache\jackrabbit\oak\security\authentication\ldap\impl\LdapProviderConfig.java:421: warning - Tag @see: can't find getExtIdAttribute() in org.apache.jackrabbit.oak.security.authentication.ldap.impl.LdapProviderConfig [ERROR] C:\projects\apache\oak\trunk\oak-auth-ldap\src\main\java\org\apache\jackrabbit\oak\security\authentication\ldap\impl\LdapProviderConfig.java:409: error: reference not found [ERROR] * @see #getExtIdAttribute() [ERROR] ^ [ERROR] C:\projects\apache\oak\trunk\oak-auth-ldap\src\main\java\org\apache\jackrabbit\oak\security\authentication\ldap\impl\LdapProviderConfig.java:411: warning - Tag @see: can't find getExtIdAttribute() in org.apache.jackrabbit.oak.security.authentication.ldap.impl.LdapProviderConfig [ERROR] C:\projects\apache\oak\trunk\oak-auth-ldap\src\main\java\org\apache\jackrabbit\oak\security\authentication\ldap\impl\LdapProviderConfig.java:653: warning: no @param for maxActive [ERROR] public PoolConfig setMaxActive(int maxActive) { [ERROR] ^ [ERROR] C:\projects\apache\oak\trunk\oak-auth-ldap\src\main\java\org\apache\jackrabbit\oak\security\authentication\ldap\impl\LdapProviderConfig.java:676: warning: no @param for lookupOnValidate [ERROR] public PoolConfig setLookupOnValidate(boolean lookupOnValidate) { [ERROR] ^ {noformat} > LdapIdentityProvider doesn't support creating external ids from custom > attributes > - > > Key: OAK-7428 > URL: https://issues.apache.org/jira/browse/OAK-7428 > Project: Jackrabbit Oak > Issue Type: Bug > Components: auth-ldap >Reporter: Manfred Baedke >Assignee: Manfred Baedke >Priority: Major > Fix For: 1.10 > > Attachments: oak-7428.patch > > > The LdapIdentityProvider always uses the value of an authorizable's DN to > create external ids. But DNs may change over time, while the external id of > an authorizable has to be stable because the property rep:externalId is > protected. > Therefore we need to add the option to use the value of a configurable LDAP > attribute to create external ids from it. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (OAK-7428) LdapIdentityProvider doesn't support creating external ids from custom attributes
[ https://issues.apache.org/jira/browse/OAK-7428?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Julian Reschke updated OAK-7428: Fix Version/s: (was: 1.9.1) > LdapIdentityProvider doesn't support creating external ids from custom > attributes > - > > Key: OAK-7428 > URL: https://issues.apache.org/jira/browse/OAK-7428 > Project: Jackrabbit Oak > Issue Type: Bug > Components: auth-ldap >Reporter: Manfred Baedke >Assignee: Manfred Baedke >Priority: Major > Fix For: 1.10 > > Attachments: oak-7428.patch > > > The LdapIdentityProvider always uses the value of an authorizable's DN to > create external ids. But DNs may change over time, while the external id of > an authorizable has to be stable because the property rep:externalId is > protected. > Therefore we need to add the option to use the value of a configurable LDAP > attribute to create external ids from it. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (OAK-4818) Version and Version History nodes don't implement the proper interfaces when found via Node.getNodes()
[ https://issues.apache.org/jira/browse/OAK-4818?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16466337#comment-16466337 ] Csaba Varga commented on OAK-4818: -- I've created a pull request to help with the progress on this ticket: [https://github.com/apache/jackrabbit-oak/pull/87] The only difference compared to the patch attached here is that the code is throwing an IllegalStateException when an error occurs instead of falling back to the old behavior. Throwing an error when unexpected things happen is a lot cleaner than trying to continue with an incorrect solution. Please let me know if I should provide backport PRs for the 1.8 and 1.6 branches as well. > Version and Version History nodes don't implement the proper interfaces when > found via Node.getNodes() > -- > > Key: OAK-4818 > URL: https://issues.apache.org/jira/browse/OAK-4818 > Project: Jackrabbit Oak > Issue Type: Bug > Components: jcr >Affects Versions: 1.0.33, 1.2.19, 1.5.10, 1.6.0 >Reporter: Csaba Varga >Priority: Minor > Attachments: version-traversal-issue.patch > > > The JCR spec says in section 15.6: > When an nt:versionHistory or nt:version node is acquired through a query or > directly through a getNode, the actual Java type of the returned object must > be VersionHistory (in the case nt:versionHistory nodes) or Version (in the > case of nt:version nodes). > While this doesn't explicitly mention the getNodes() method, I believe it's a > reasonable expectation that this method should work the same way, i.e. make > the actual Java type of the returned child object Version or VersionHistory > where applicable. Oak currently doesn't work this way; the iterator returned > by either getNodes() overload will always yield NodeImpl instances. > I will attach a suggested patch to fix this, including addition to the unit > tests to catch any regressions in the future. The patch is against the latest > trunk, but the same behavior seems to be present in all past versions as > well, so if it's not a big problem, could you also backport this to older > stable versions as well? (My employer is using AEM 6.1 currently, so we would > be interested in getting this backported to 1.2 at least.) -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (OAK-6490) Pre-Extraction support fails for empty binaries
[ https://issues.apache.org/jira/browse/OAK-6490?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Vikas Saurabh updated OAK-6490: --- Labels: (was: candidate_oak_1_6) > Pre-Extraction support fails for empty binaries > --- > > Key: OAK-6490 > URL: https://issues.apache.org/jira/browse/OAK-6490 > Project: Jackrabbit Oak > Issue Type: Bug > Components: core >Reporter: Chetan Mehrotra >Assignee: Chetan Mehrotra >Priority: Minor > Fix For: 1.7.5, 1.8.0, 1.6.12 > > > If text pre-extraction is configured then for empty blobs following exception > is seen > {noformat} > 2017-07-19 11:14:49,584 ERROR [main] o.a.j.oak.index.IndexCommand - Error > occurred while performing index tasks > java.lang.StringIndexOutOfBoundsException: String index out of range: 4 > at java.lang.String.substring(String.java:1963) ~[na:1.8.0_102] > at > org.apache.jackrabbit.oak.plugins.index.datastore.DataStoreTextWriter.getFile(DataStoreTextWriter.java:187) > ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT] > at > org.apache.jackrabbit.oak.plugins.index.datastore.DataStoreTextWriter.getText(DataStoreTextWriter.java:104) > ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT] > at > org.apache.jackrabbit.oak.plugins.index.lucene.ExtractedTextCache.get(ExtractedTextCache.java:90) > ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT] > at > org.apache.jackrabbit.oak.plugins.index.lucene.binary.BinaryTextExtractor.parseStringValue(BinaryTextExtractor.java:127) > ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT] > at > org.apache.jackrabbit.oak.plugins.index.lucene.binary.BinaryTextExtractor.newBinary(BinaryTextExtractor.java:112) > ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT] > at > org.apache.jackrabbit.oak.plugins.index.lucene.LuceneDocumentMaker.newBinary(LuceneDocumentMaker.java:398) > ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT] > at > org.apache.jackrabbit.oak.plugins.index.lucene.LuceneDocumentMaker.indexProperty(LuceneDocumentMaker.java:257) > ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT] > at > org.apache.jackrabbit.oak.plugins.index.lucene.LuceneDocumentMaker.makeDocument(LuceneDocumentMaker.java:128) > ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT] > at > org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexEditor.makeDocument(LuceneIndexEditor.java:268) > ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT] > at > org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexEditor.addOrUpdate(LuceneIndexEditor.java:244) > ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT] > at > org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexEditor.leave(LuceneIndexEditor.java:140) > ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT] > {noformat} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (OAK-6490) Pre-Extraction support fails for empty binaries
[ https://issues.apache.org/jira/browse/OAK-6490?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Vikas Saurabh updated OAK-6490: --- Fix Version/s: 1.6.12 > Pre-Extraction support fails for empty binaries > --- > > Key: OAK-6490 > URL: https://issues.apache.org/jira/browse/OAK-6490 > Project: Jackrabbit Oak > Issue Type: Bug > Components: core >Reporter: Chetan Mehrotra >Assignee: Chetan Mehrotra >Priority: Minor > Fix For: 1.7.5, 1.8.0, 1.6.12 > > > If text pre-extraction is configured then for empty blobs following exception > is seen > {noformat} > 2017-07-19 11:14:49,584 ERROR [main] o.a.j.oak.index.IndexCommand - Error > occurred while performing index tasks > java.lang.StringIndexOutOfBoundsException: String index out of range: 4 > at java.lang.String.substring(String.java:1963) ~[na:1.8.0_102] > at > org.apache.jackrabbit.oak.plugins.index.datastore.DataStoreTextWriter.getFile(DataStoreTextWriter.java:187) > ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT] > at > org.apache.jackrabbit.oak.plugins.index.datastore.DataStoreTextWriter.getText(DataStoreTextWriter.java:104) > ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT] > at > org.apache.jackrabbit.oak.plugins.index.lucene.ExtractedTextCache.get(ExtractedTextCache.java:90) > ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT] > at > org.apache.jackrabbit.oak.plugins.index.lucene.binary.BinaryTextExtractor.parseStringValue(BinaryTextExtractor.java:127) > ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT] > at > org.apache.jackrabbit.oak.plugins.index.lucene.binary.BinaryTextExtractor.newBinary(BinaryTextExtractor.java:112) > ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT] > at > org.apache.jackrabbit.oak.plugins.index.lucene.LuceneDocumentMaker.newBinary(LuceneDocumentMaker.java:398) > ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT] > at > org.apache.jackrabbit.oak.plugins.index.lucene.LuceneDocumentMaker.indexProperty(LuceneDocumentMaker.java:257) > ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT] > at > org.apache.jackrabbit.oak.plugins.index.lucene.LuceneDocumentMaker.makeDocument(LuceneDocumentMaker.java:128) > ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT] > at > org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexEditor.makeDocument(LuceneIndexEditor.java:268) > ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT] > at > org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexEditor.addOrUpdate(LuceneIndexEditor.java:244) > ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT] > at > org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexEditor.leave(LuceneIndexEditor.java:140) > ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT] > {noformat} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (OAK-6490) Pre-Extraction support fails for empty binaries
[ https://issues.apache.org/jira/browse/OAK-6490?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16466039#comment-16466039 ] Vikas Saurabh commented on OAK-6490: Backported [r1802905|https://svn.apache.org/r1802905] from trunk to 1.6 at [r1831105|https://svn.apache.org/r1831105]. > Pre-Extraction support fails for empty binaries > --- > > Key: OAK-6490 > URL: https://issues.apache.org/jira/browse/OAK-6490 > Project: Jackrabbit Oak > Issue Type: Bug > Components: core >Reporter: Chetan Mehrotra >Assignee: Chetan Mehrotra >Priority: Minor > Labels: candidate_oak_1_6 > Fix For: 1.7.5, 1.8.0 > > > If text pre-extraction is configured then for empty blobs following exception > is seen > {noformat} > 2017-07-19 11:14:49,584 ERROR [main] o.a.j.oak.index.IndexCommand - Error > occurred while performing index tasks > java.lang.StringIndexOutOfBoundsException: String index out of range: 4 > at java.lang.String.substring(String.java:1963) ~[na:1.8.0_102] > at > org.apache.jackrabbit.oak.plugins.index.datastore.DataStoreTextWriter.getFile(DataStoreTextWriter.java:187) > ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT] > at > org.apache.jackrabbit.oak.plugins.index.datastore.DataStoreTextWriter.getText(DataStoreTextWriter.java:104) > ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT] > at > org.apache.jackrabbit.oak.plugins.index.lucene.ExtractedTextCache.get(ExtractedTextCache.java:90) > ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT] > at > org.apache.jackrabbit.oak.plugins.index.lucene.binary.BinaryTextExtractor.parseStringValue(BinaryTextExtractor.java:127) > ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT] > at > org.apache.jackrabbit.oak.plugins.index.lucene.binary.BinaryTextExtractor.newBinary(BinaryTextExtractor.java:112) > ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT] > at > org.apache.jackrabbit.oak.plugins.index.lucene.LuceneDocumentMaker.newBinary(LuceneDocumentMaker.java:398) > ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT] > at > org.apache.jackrabbit.oak.plugins.index.lucene.LuceneDocumentMaker.indexProperty(LuceneDocumentMaker.java:257) > ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT] > at > org.apache.jackrabbit.oak.plugins.index.lucene.LuceneDocumentMaker.makeDocument(LuceneDocumentMaker.java:128) > ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT] > at > org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexEditor.makeDocument(LuceneIndexEditor.java:268) > ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT] > at > org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexEditor.addOrUpdate(LuceneIndexEditor.java:244) > ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT] > at > org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexEditor.leave(LuceneIndexEditor.java:140) > ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT] > {noformat} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (OAK-7480) Build Jackrabbit Oak #1428 failed
[ https://issues.apache.org/jira/browse/OAK-7480?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16465926#comment-16465926 ] Hudson commented on OAK-7480: - Build is still failing. Failed run: [Jackrabbit Oak #1431|https://builds.apache.org/job/Jackrabbit%20Oak/1431/] [console log|https://builds.apache.org/job/Jackrabbit%20Oak/1431/console] > Build Jackrabbit Oak #1428 failed > - > > Key: OAK-7480 > URL: https://issues.apache.org/jira/browse/OAK-7480 > Project: Jackrabbit Oak > Issue Type: Bug > Components: continuous integration >Reporter: Hudson >Priority: Major > > No description is provided > The build Jackrabbit Oak #1428 has failed. > First failed run: [Jackrabbit Oak > #1428|https://builds.apache.org/job/Jackrabbit%20Oak/1428/] [console > log|https://builds.apache.org/job/Jackrabbit%20Oak/1428/console] -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (OAK-6490) Pre-Extraction support fails for empty binaries
[ https://issues.apache.org/jira/browse/OAK-6490?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Vikas Saurabh updated OAK-6490: --- Labels: candidate_oak_1_6 (was: ) > Pre-Extraction support fails for empty binaries > --- > > Key: OAK-6490 > URL: https://issues.apache.org/jira/browse/OAK-6490 > Project: Jackrabbit Oak > Issue Type: Bug > Components: core >Reporter: Chetan Mehrotra >Assignee: Chetan Mehrotra >Priority: Minor > Labels: candidate_oak_1_6 > Fix For: 1.7.5, 1.8.0 > > > If text pre-extraction is configured then for empty blobs following exception > is seen > {noformat} > 2017-07-19 11:14:49,584 ERROR [main] o.a.j.oak.index.IndexCommand - Error > occurred while performing index tasks > java.lang.StringIndexOutOfBoundsException: String index out of range: 4 > at java.lang.String.substring(String.java:1963) ~[na:1.8.0_102] > at > org.apache.jackrabbit.oak.plugins.index.datastore.DataStoreTextWriter.getFile(DataStoreTextWriter.java:187) > ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT] > at > org.apache.jackrabbit.oak.plugins.index.datastore.DataStoreTextWriter.getText(DataStoreTextWriter.java:104) > ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT] > at > org.apache.jackrabbit.oak.plugins.index.lucene.ExtractedTextCache.get(ExtractedTextCache.java:90) > ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT] > at > org.apache.jackrabbit.oak.plugins.index.lucene.binary.BinaryTextExtractor.parseStringValue(BinaryTextExtractor.java:127) > ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT] > at > org.apache.jackrabbit.oak.plugins.index.lucene.binary.BinaryTextExtractor.newBinary(BinaryTextExtractor.java:112) > ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT] > at > org.apache.jackrabbit.oak.plugins.index.lucene.LuceneDocumentMaker.newBinary(LuceneDocumentMaker.java:398) > ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT] > at > org.apache.jackrabbit.oak.plugins.index.lucene.LuceneDocumentMaker.indexProperty(LuceneDocumentMaker.java:257) > ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT] > at > org.apache.jackrabbit.oak.plugins.index.lucene.LuceneDocumentMaker.makeDocument(LuceneDocumentMaker.java:128) > ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT] > at > org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexEditor.makeDocument(LuceneIndexEditor.java:268) > ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT] > at > org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexEditor.addOrUpdate(LuceneIndexEditor.java:244) > ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT] > at > org.apache.jackrabbit.oak.plugins.index.lucene.LuceneIndexEditor.leave(LuceneIndexEditor.java:140) > ~[oak-run-1.8-SNAPSHOT.jar:1.8-SNAPSHOT] > {noformat} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (OAK-5655) TarMK: Analyse locality of reference
[ https://issues.apache.org/jira/browse/OAK-5655?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16465829#comment-16465829 ] Michael Dürig commented on OAK-5655: At [http://svn.apache.org/viewvc?rev=1831089&view=rev] I added the {{RandomAccessTrace}} for collected random access traces. > TarMK: Analyse locality of reference > - > > Key: OAK-5655 > URL: https://issues.apache.org/jira/browse/OAK-5655 > Project: Jackrabbit Oak > Issue Type: Task > Components: segment-tar >Reporter: Michael Dürig >Priority: Major > Labels: scalability > Fix For: 1.10 > > Attachments: compaction-time-vs-reposize.m, > compaction-time-vs.reposize.png, data00053a.tar-reads.png, offrc.jfr, > segment-per-path-compacted-nocache.png, > segment-per-path-compacted-nostringcache.png, segment-per-path-compacted.png, > segment-per-path.png, segment-reads.png > > > We need to better understand the locality aspects of content stored in TarMK: > * How is related content spread over segments? > * What content do we consider related? > * How does locality of related content develop over time when changes are > applied? > * What changes do we consider typical? > * What is the impact of compaction on locality? > * What is the impact of the deduplication caches on locality (during normal > operation and during compaction)? > * How good are checkpoints deduplicated? Can we monitor this online? > * ... -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (OAK-7481) onParentVersion IGNORE is respected also for unstructured nodes
Marco Piovesana created OAK-7481: Summary: onParentVersion IGNORE is respected also for unstructured nodes Key: OAK-7481 URL: https://issues.apache.org/jira/browse/OAK-7481 Project: Jackrabbit Oak Issue Type: Bug Components: core Affects Versions: 1.8.1 Reporter: Marco Piovesana When versioning an unstructured node, a property with onParentVersion=IGNORE is not copied in the frozen node: {code:java} NodeTypeManager nodeTypeManager = session.getWorkspace().getNodeTypeManager(); NodeTypeTemplate nt = nodeTypeManager.createNodeTypeTemplate(); nt.setName("custom:runtime"); nt.setMixin(true); PropertyDefinitionTemplate opt = nodeTypeManager.createPropertyDefinitionTemplate(); opt.setMandatory(false); opt.setName("custom:runtimeTest"); opt.setRequiredType(PropertyType.LONG); opt.setOnParentVersion(OnParentVersionAction.IGNORE); List pdt = nt.getPropertyDefinitionTemplates(); pdt.add(opt); nodeTypeManager.registerNodeType(nt, true); session.save(); Node mynode = JcrUtils.getOrAddNode(session.getRootNode(), "mynode"); mynode.addMixin(JcrConstants.MIX_VERSIONABLE); mynode.addMixin("custom:runtime"); session.save(); mynode.setProperty("custom:runtimeTest", "my test value"); session.save(); session.save(); VersionManager versionManager = session.getWorkspace().getVersionManager(); versionManager.checkout(mynode.getPath()); Version version = versionManager.checkin(mynode.getPath()); {code} the frozen node connected to the created version does not contain the property "custom:runtimeTest" -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (OAK-7479) custom property does not respect type
[ https://issues.apache.org/jira/browse/OAK-7479?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16465640#comment-16465640 ] Marco Piovesana commented on OAK-7479: -- Sure, so is not possible to have version-independent properties in unstructured nodes? > custom property does not respect type > -- > > Key: OAK-7479 > URL: https://issues.apache.org/jira/browse/OAK-7479 > Project: Jackrabbit Oak > Issue Type: Bug > Components: core >Affects Versions: 1.6.1, 1.8.1 > Environment: The repository is file system based: > {code:java} > File driveFile = new File(directory, "oakrepo"); > File repositoryFile = new File(driveFile, "repository"); > File dataStoreFile = new File(driveFile, "datastore"); > BlobStore blobStore = new FileBlobStore(dataStoreFile.getAbsolutePath()); > fileStore = > FileStoreBuilder.fileStoreBuilder(repositoryFile).withBlobStore(blobStore).build(); > nodeStore = SegmentNodeStoreBuilders.builder(fileStore).build(); > Jcr jcr = new Jcr(nodeStore); > repository = jcr.createRepository(); > {code} >Reporter: Marco Piovesana >Priority: Major > Attachments: oakRunImage.png > > > I've defined a custom mixin with s single *long* property. When I add that > mixin to a node I can set a value of a different type (e.g. *string*) without > any error. Same behaviour if I define the mixin using the {{customCND}} or > using the {{NodeTypeTemplate.}} > Here the code example: > {code:java} > NodeTypeManager nodeTypeManager = session.getWorkspace().getNodeTypeManager(); > NodeTypeTemplate nt = nodeTypeManager.createNodeTypeTemplate(); > nt.setName("custom:runtime"); > nt.setMixin(true); > PropertyDefinitionTemplate opt = > nodeTypeManager.createPropertyDefinitionTemplate(); > opt.setMandatory(false); > opt.setName("custom:runtimeTest"); > opt.setRequiredType(PropertyType.LONG); > opt.setOnParentVersion(OnParentVersionAction.COPY); > List pdt = nt.getPropertyDefinitionTemplates(); > pdt.add(opt); > nodeTypeManager.registerNodeType(nt, true); > session.save(); > Node mynode = JcrUtils.getOrAddNode(session.getRootNode(), "mynode"); > mynode.addMixin("custom:runtime"); > session.save(); > mynode.setProperty("custom:runtimeTest", "my test value"); > session.save();{code} > If I open the repository using oak-run the property {{custom:runtimeTest}} > has type STRING and not LONG (attached image) -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (OAK-7479) custom property does not respect type
[ https://issues.apache.org/jira/browse/OAK-7479?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16465618#comment-16465618 ] Marcel Reutegger commented on OAK-7479: --- I'd say that's a violation of the spec and should be fixed. Can you please report a new issue about the wrong OPV behaviour? Thanks. > custom property does not respect type > -- > > Key: OAK-7479 > URL: https://issues.apache.org/jira/browse/OAK-7479 > Project: Jackrabbit Oak > Issue Type: Bug > Components: core >Affects Versions: 1.6.1, 1.8.1 > Environment: The repository is file system based: > {code:java} > File driveFile = new File(directory, "oakrepo"); > File repositoryFile = new File(driveFile, "repository"); > File dataStoreFile = new File(driveFile, "datastore"); > BlobStore blobStore = new FileBlobStore(dataStoreFile.getAbsolutePath()); > fileStore = > FileStoreBuilder.fileStoreBuilder(repositoryFile).withBlobStore(blobStore).build(); > nodeStore = SegmentNodeStoreBuilders.builder(fileStore).build(); > Jcr jcr = new Jcr(nodeStore); > repository = jcr.createRepository(); > {code} >Reporter: Marco Piovesana >Priority: Major > Attachments: oakRunImage.png > > > I've defined a custom mixin with s single *long* property. When I add that > mixin to a node I can set a value of a different type (e.g. *string*) without > any error. Same behaviour if I define the mixin using the {{customCND}} or > using the {{NodeTypeTemplate.}} > Here the code example: > {code:java} > NodeTypeManager nodeTypeManager = session.getWorkspace().getNodeTypeManager(); > NodeTypeTemplate nt = nodeTypeManager.createNodeTypeTemplate(); > nt.setName("custom:runtime"); > nt.setMixin(true); > PropertyDefinitionTemplate opt = > nodeTypeManager.createPropertyDefinitionTemplate(); > opt.setMandatory(false); > opt.setName("custom:runtimeTest"); > opt.setRequiredType(PropertyType.LONG); > opt.setOnParentVersion(OnParentVersionAction.COPY); > List pdt = nt.getPropertyDefinitionTemplates(); > pdt.add(opt); > nodeTypeManager.registerNodeType(nt, true); > session.save(); > Node mynode = JcrUtils.getOrAddNode(session.getRootNode(), "mynode"); > mynode.addMixin("custom:runtime"); > session.save(); > mynode.setProperty("custom:runtimeTest", "my test value"); > session.save();{code} > If I open the repository using oak-run the property {{custom:runtimeTest}} > has type STRING and not LONG (attached image) -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (OAK-7479) custom property does not respect type
[ https://issues.apache.org/jira/browse/OAK-7479?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16465567#comment-16465567 ] Marco Piovesana commented on OAK-7479: -- Hi Marcel, thanks for the clarification, but then I have another question: if I set the "onParentVersion" to IGNORE the property is not copied in the frozen node, why it does respect that constraint but not the type? > custom property does not respect type > -- > > Key: OAK-7479 > URL: https://issues.apache.org/jira/browse/OAK-7479 > Project: Jackrabbit Oak > Issue Type: Bug > Components: core >Affects Versions: 1.6.1, 1.8.1 > Environment: The repository is file system based: > {code:java} > File driveFile = new File(directory, "oakrepo"); > File repositoryFile = new File(driveFile, "repository"); > File dataStoreFile = new File(driveFile, "datastore"); > BlobStore blobStore = new FileBlobStore(dataStoreFile.getAbsolutePath()); > fileStore = > FileStoreBuilder.fileStoreBuilder(repositoryFile).withBlobStore(blobStore).build(); > nodeStore = SegmentNodeStoreBuilders.builder(fileStore).build(); > Jcr jcr = new Jcr(nodeStore); > repository = jcr.createRepository(); > {code} >Reporter: Marco Piovesana >Priority: Major > Attachments: oakRunImage.png > > > I've defined a custom mixin with s single *long* property. When I add that > mixin to a node I can set a value of a different type (e.g. *string*) without > any error. Same behaviour if I define the mixin using the {{customCND}} or > using the {{NodeTypeTemplate.}} > Here the code example: > {code:java} > NodeTypeManager nodeTypeManager = session.getWorkspace().getNodeTypeManager(); > NodeTypeTemplate nt = nodeTypeManager.createNodeTypeTemplate(); > nt.setName("custom:runtime"); > nt.setMixin(true); > PropertyDefinitionTemplate opt = > nodeTypeManager.createPropertyDefinitionTemplate(); > opt.setMandatory(false); > opt.setName("custom:runtimeTest"); > opt.setRequiredType(PropertyType.LONG); > opt.setOnParentVersion(OnParentVersionAction.COPY); > List pdt = nt.getPropertyDefinitionTemplates(); > pdt.add(opt); > nodeTypeManager.registerNodeType(nt, true); > session.save(); > Node mynode = JcrUtils.getOrAddNode(session.getRootNode(), "mynode"); > mynode.addMixin("custom:runtime"); > session.save(); > mynode.setProperty("custom:runtimeTest", "my test value"); > session.save();{code} > If I open the repository using oak-run the property {{custom:runtimeTest}} > has type STRING and not LONG (attached image) -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Resolved] (OAK-7479) custom property does not respect type
[ https://issues.apache.org/jira/browse/OAK-7479?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Marcel Reutegger resolved OAK-7479. --- Resolution: Invalid > custom property does not respect type > -- > > Key: OAK-7479 > URL: https://issues.apache.org/jira/browse/OAK-7479 > Project: Jackrabbit Oak > Issue Type: Bug > Components: core >Affects Versions: 1.6.1, 1.8.1 > Environment: The repository is file system based: > {code:java} > File driveFile = new File(directory, "oakrepo"); > File repositoryFile = new File(driveFile, "repository"); > File dataStoreFile = new File(driveFile, "datastore"); > BlobStore blobStore = new FileBlobStore(dataStoreFile.getAbsolutePath()); > fileStore = > FileStoreBuilder.fileStoreBuilder(repositoryFile).withBlobStore(blobStore).build(); > nodeStore = SegmentNodeStoreBuilders.builder(fileStore).build(); > Jcr jcr = new Jcr(nodeStore); > repository = jcr.createRepository(); > {code} >Reporter: Marco Piovesana >Priority: Major > Attachments: oakRunImage.png > > > I've defined a custom mixin with s single *long* property. When I add that > mixin to a node I can set a value of a different type (e.g. *string*) without > any error. Same behaviour if I define the mixin using the {{customCND}} or > using the {{NodeTypeTemplate.}} > Here the code example: > {code:java} > NodeTypeManager nodeTypeManager = session.getWorkspace().getNodeTypeManager(); > NodeTypeTemplate nt = nodeTypeManager.createNodeTypeTemplate(); > nt.setName("custom:runtime"); > nt.setMixin(true); > PropertyDefinitionTemplate opt = > nodeTypeManager.createPropertyDefinitionTemplate(); > opt.setMandatory(false); > opt.setName("custom:runtimeTest"); > opt.setRequiredType(PropertyType.LONG); > opt.setOnParentVersion(OnParentVersionAction.COPY); > List pdt = nt.getPropertyDefinitionTemplates(); > pdt.add(opt); > nodeTypeManager.registerNodeType(nt, true); > session.save(); > Node mynode = JcrUtils.getOrAddNode(session.getRootNode(), "mynode"); > mynode.addMixin("custom:runtime"); > session.save(); > mynode.setProperty("custom:runtimeTest", "my test value"); > session.save();{code} > If I open the repository using oak-run the property {{custom:runtimeTest}} > has type STRING and not LONG (attached image) -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (OAK-7479) custom property does not respect type
[ https://issues.apache.org/jira/browse/OAK-7479?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16465554#comment-16465554 ] Marcel Reutegger commented on OAK-7479: --- Oh, now I see the attached image. The node you created *is* of type nt:unstructured ;) > custom property does not respect type > -- > > Key: OAK-7479 > URL: https://issues.apache.org/jira/browse/OAK-7479 > Project: Jackrabbit Oak > Issue Type: Bug > Components: core >Affects Versions: 1.6.1, 1.8.1 > Environment: The repository is file system based: > {code:java} > File driveFile = new File(directory, "oakrepo"); > File repositoryFile = new File(driveFile, "repository"); > File dataStoreFile = new File(driveFile, "datastore"); > BlobStore blobStore = new FileBlobStore(dataStoreFile.getAbsolutePath()); > fileStore = > FileStoreBuilder.fileStoreBuilder(repositoryFile).withBlobStore(blobStore).build(); > nodeStore = SegmentNodeStoreBuilders.builder(fileStore).build(); > Jcr jcr = new Jcr(nodeStore); > repository = jcr.createRepository(); > {code} >Reporter: Marco Piovesana >Priority: Major > Attachments: oakRunImage.png > > > I've defined a custom mixin with s single *long* property. When I add that > mixin to a node I can set a value of a different type (e.g. *string*) without > any error. Same behaviour if I define the mixin using the {{customCND}} or > using the {{NodeTypeTemplate.}} > Here the code example: > {code:java} > NodeTypeManager nodeTypeManager = session.getWorkspace().getNodeTypeManager(); > NodeTypeTemplate nt = nodeTypeManager.createNodeTypeTemplate(); > nt.setName("custom:runtime"); > nt.setMixin(true); > PropertyDefinitionTemplate opt = > nodeTypeManager.createPropertyDefinitionTemplate(); > opt.setMandatory(false); > opt.setName("custom:runtimeTest"); > opt.setRequiredType(PropertyType.LONG); > opt.setOnParentVersion(OnParentVersionAction.COPY); > List pdt = nt.getPropertyDefinitionTemplates(); > pdt.add(opt); > nodeTypeManager.registerNodeType(nt, true); > session.save(); > Node mynode = JcrUtils.getOrAddNode(session.getRootNode(), "mynode"); > mynode.addMixin("custom:runtime"); > session.save(); > mynode.setProperty("custom:runtimeTest", "my test value"); > session.save();{code} > If I open the repository using oak-run the property {{custom:runtimeTest}} > has type STRING and not LONG (attached image) -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (OAK-7479) custom property does not respect type
[ https://issues.apache.org/jira/browse/OAK-7479?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16465553#comment-16465553 ] Marcel Reutegger commented on OAK-7479: --- You are not creating {{mynode}} with an explicit node type. The created node most likely has a primary node type with a residual property definition that allows all kind of properties. E.g. nt:unstructured or oak:Unstructured. > custom property does not respect type > -- > > Key: OAK-7479 > URL: https://issues.apache.org/jira/browse/OAK-7479 > Project: Jackrabbit Oak > Issue Type: Bug > Components: core >Affects Versions: 1.6.1, 1.8.1 > Environment: The repository is file system based: > {code:java} > File driveFile = new File(directory, "oakrepo"); > File repositoryFile = new File(driveFile, "repository"); > File dataStoreFile = new File(driveFile, "datastore"); > BlobStore blobStore = new FileBlobStore(dataStoreFile.getAbsolutePath()); > fileStore = > FileStoreBuilder.fileStoreBuilder(repositoryFile).withBlobStore(blobStore).build(); > nodeStore = SegmentNodeStoreBuilders.builder(fileStore).build(); > Jcr jcr = new Jcr(nodeStore); > repository = jcr.createRepository(); > {code} >Reporter: Marco Piovesana >Priority: Major > Attachments: oakRunImage.png > > > I've defined a custom mixin with s single *long* property. When I add that > mixin to a node I can set a value of a different type (e.g. *string*) without > any error. Same behaviour if I define the mixin using the {{customCND}} or > using the {{NodeTypeTemplate.}} > Here the code example: > {code:java} > NodeTypeManager nodeTypeManager = session.getWorkspace().getNodeTypeManager(); > NodeTypeTemplate nt = nodeTypeManager.createNodeTypeTemplate(); > nt.setName("custom:runtime"); > nt.setMixin(true); > PropertyDefinitionTemplate opt = > nodeTypeManager.createPropertyDefinitionTemplate(); > opt.setMandatory(false); > opt.setName("custom:runtimeTest"); > opt.setRequiredType(PropertyType.LONG); > opt.setOnParentVersion(OnParentVersionAction.COPY); > List pdt = nt.getPropertyDefinitionTemplates(); > pdt.add(opt); > nodeTypeManager.registerNodeType(nt, true); > session.save(); > Node mynode = JcrUtils.getOrAddNode(session.getRootNode(), "mynode"); > mynode.addMixin("custom:runtime"); > session.save(); > mynode.setProperty("custom:runtimeTest", "my test value"); > session.save();{code} > If I open the repository using oak-run the property {{custom:runtimeTest}} > has type STRING and not LONG (attached image) -- This message was sent by Atlassian JIRA (v7.6.3#76005)