You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Christophe Lombart (JIRA)" <ji...@apache.org> on 2008/02/27 09:36:51 UTC

[jira] Created: (JCR-1426) the method call getObject(...) on a previous version throws an IncorrectPersistentClassException

the method call getObject(...) on a previous version throws an IncorrectPersistentClassException
------------------------------------------------------------------------------------------------

                 Key: JCR-1426
                 URL: https://issues.apache.org/jira/browse/JCR-1426
             Project: Jackrabbit
          Issue Type: Bug
          Components: jackrabbit-ocm
    Affects Versions: core 1.4.1, 1.4, 1.4.1, 1.5
            Reporter: Christophe Lombart


The method call getObject(...) on a previous version of an persistent object throws the exepction 
"IncorrectPersistentClassException  : type: nt:unstructured has no descriptor". 

This issue was dectected when a pojo is mapped into the nt:unstructured node type. In this case, the mixin type ocm:discriminator has to be applied but it seems that is not present in the previous version node.

Here is a exemple of a persistent class that can cause this issue : 

@Node(jcrType="nt:unstructured",
       jcrMixinTypes = "mix:versionable,mix:referenceable,mix:lockable")
public class Content {

   /** Node path in the CR */
   @Field(path=true)
   private String path;

   @Field(uuid=true)
   private String uuid;

   @Field(jcrName = "test:lastModified")
   private Calendar lastModified;

   /** content title */
   @Field(jcrName = "test:title")
   private String title = null;

   @Field(jcrName = "test:mimeType")
   private String mimeType;

   @Field(jcrName = "test:data")
   private byte[] data;

   ... getters + setters....
}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (JCR-1426) the method call getObject(...) on a previous version throws an IncorrectPersistentClassException

Posted by "Christophe Lombart (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-1426?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christophe Lombart reassigned JCR-1426:
---------------------------------------

    Assignee: Christophe Lombart

> the method call getObject(...) on a previous version throws an IncorrectPersistentClassException
> ------------------------------------------------------------------------------------------------
>
>                 Key: JCR-1426
>                 URL: https://issues.apache.org/jira/browse/JCR-1426
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-ocm
>    Affects Versions: 1.4, core 1.4.1, 1.4.1, 1.5
>            Reporter: Christophe Lombart
>            Assignee: Christophe Lombart
>
> The method call getObject(...) on a previous version of an persistent object throws the exepction 
> "IncorrectPersistentClassException  : type: nt:unstructured has no descriptor". 
> This issue was dectected when a pojo is mapped into the nt:unstructured node type. In this case, the mixin type ocm:discriminator has to be applied but it seems that is not present in the previous version node.
> Here is a exemple of a persistent class that can cause this issue : 
> @Node(jcrType="nt:unstructured",
>        jcrMixinTypes = "mix:versionable,mix:referenceable,mix:lockable")
> public class Content {
>    /** Node path in the CR */
>    @Field(path=true)
>    private String path;
>    @Field(uuid=true)
>    private String uuid;
>    @Field(jcrName = "test:lastModified")
>    private Calendar lastModified;
>    /** content title */
>    @Field(jcrName = "test:title")
>    private String title = null;
>    @Field(jcrName = "test:mimeType")
>    private String mimeType;
>    @Field(jcrName = "test:data")
>    private byte[] data;
>    ... getters + setters....
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (JCR-1426) the method call getObject(...) on a previous version throws an IncorrectPersistentClassException

Posted by "Christophe Lombart (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/JCR-1426?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christophe Lombart resolved JCR-1426.
-------------------------------------

    Resolution: Won't Fix

the method call getObject(path,versionNum) could not made with a versionNum = jcr:rootVersion because it does not hold any state information (see in the spec 8.2.4, Initializing the Version History).

I reviewed the unit tests used for the version support. 

> the method call getObject(...) on a previous version throws an IncorrectPersistentClassException
> ------------------------------------------------------------------------------------------------
>
>                 Key: JCR-1426
>                 URL: https://issues.apache.org/jira/browse/JCR-1426
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-ocm
>    Affects Versions: 1.4, core 1.4.1, 1.4.1, 1.5
>            Reporter: Christophe Lombart
>            Assignee: Christophe Lombart
>
> The method call getObject(...) on a previous version of an persistent object throws the exepction 
> "IncorrectPersistentClassException  : type: nt:unstructured has no descriptor". 
> This issue was dectected when a pojo is mapped into the nt:unstructured node type. In this case, the mixin type ocm:discriminator has to be applied but it seems that is not present in the previous version node.
> Here is a exemple of a persistent class that can cause this issue : 
> @Node(jcrType="nt:unstructured",
>        jcrMixinTypes = "mix:versionable,mix:referenceable,mix:lockable")
> public class Content {
>    /** Node path in the CR */
>    @Field(path=true)
>    private String path;
>    @Field(uuid=true)
>    private String uuid;
>    @Field(jcrName = "test:lastModified")
>    private Calendar lastModified;
>    /** content title */
>    @Field(jcrName = "test:title")
>    private String title = null;
>    @Field(jcrName = "test:mimeType")
>    private String mimeType;
>    @Field(jcrName = "test:data")
>    private byte[] data;
>    ... getters + setters....
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.