[overlord-issues] [JBoss JIRA] (SRAMP-552) Support relationships with no target

Brett Meyer (JIRA) issues at jboss.org
Wed Nov 12 15:54:29 EST 2014


    [ https://issues.jboss.org/browse/SRAMP-552?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13019549#comment-13019549 ] 

Brett Meyer commented on SRAMP-552:
-----------------------------------

Hold off on this one.  Asking the TC about removing no-target relationships.  Unless I'm missing something, the use cases are completely covered by simple classifiers.

> Support relationships with no target
> ------------------------------------
>
>                 Key: SRAMP-552
>                 URL: https://issues.jboss.org/browse/SRAMP-552
>             Project: S-RAMP
>          Issue Type: Sub-task
>            Reporter: Brett Meyer
>            Assignee: Brett Meyer
>
> 2.1.2
> "It is possible for a relationship of a given Relationship Type not to have a target, which is termed a "relationship with no targets".  In this case there is only one relationship instance with that Relationship Type for a given Source.  Such relationships have a target cardinality of "0".  If there is a relationship instance with a given Relationship Type that does have a target, then there CANNOT also be a relationship instance with that Relationship Type which has no target."
> Currently, this causes:
> {code}
> Caused by: javax.jcr.PathNotFoundException: No item exists at path sramp:relationshipType relative to /s-ramp/artifacts/4a/97/7b/bd-ab9b-4f00-b7b5-25f62f04eb45/sramp-relationships:null in workspace "default"
> 	at org.modeshape.jcr.AbstractJcrNode.getProperty(AbstractJcrNode.java:346)
> 	at org.modeshape.jcr.AbstractJcrNode.getProperty(AbstractJcrNode.java:108)
> 	at org.overlord.sramp.repository.jcr.mapper.ArtifactToJCRNodeVisitor.updateGenericRelationships(ArtifactToJCRNodeVisitor.java:267)
> 	at org.overlord.sramp.repository.jcr.mapper.ArtifactToJCRNodeVisitor.visitBase(ArtifactToJCRNodeVisitor.java:128)
> 	at org.overlord.sramp.common.visitors.HierarchicalArtifactVisitorAdapter.visit(HierarchicalArtifactVisitorAdapter.java:209)
> 	at org.overlord.sramp.repository.jcr.mapper.ArtifactToJCRNodeVisitor.visit(ArtifactToJCRNodeVisitor.java:310)
> 	at sun.reflect.GeneratedMethodAccessor104.invoke(Unknown Source)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:606)
> 	at org.overlord.sramp.common.visitors.ArtifactVisitorHelper.visitArtifact(ArtifactVisitorHelper.java:41)
> 	at org.overlord.sramp.repository.jcr.JCRArtifactPersister.persistArtifactPhase1(JCRArtifactPersister.java:138)
> 	at org.overlord.sramp.repository.jcr.JCRPersistence.persistArtifact(JCRPersistence.java:177)
> 	... 47 more
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.8#6338)


More information about the overlord-issues mailing list