You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "angela (JIRA)" <ji...@apache.org> on 2008/11/14 16:04:44 UTC

[jira] Created: (JCR-1857) jcr2spi: NPE with SessionImporter#checkIncludesMixReferenceable if NodeInfo doesn't contain mixin names

jcr2spi: NPE with SessionImporter#checkIncludesMixReferenceable if NodeInfo doesn't contain mixin names
-------------------------------------------------------------------------------------------------------

                 Key: JCR-1857
                 URL: https://issues.apache.org/jira/browse/JCR-1857
             Project: Jackrabbit
          Issue Type: Bug
          Components: jackrabbit-jcr2spi
            Reporter: angela


issue reported by tobi:

java.lang.NullPointerException
	at java.util.Arrays$ArrayList.<init>(Arrays.java:2355)
	at java.util.Arrays.asList(Arrays.java:2341)
	at org.apache.jackrabbit.jcr2spi.xml.SessionImporter.checkIncludesMixReferenceable(SessionImporter.java:637)
	at org.apache.jackrabbit.jcr2spi.xml.SessionImporter.startNode(SessionImporter.java:209)

including test case:

    public void testEmptyMixins() throws Exception {
        String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
                "<sv:node xmlns:nt=\"http://www.jcp.org/jcr/nt/1.0\"\n" +
                "         xmlns:sv=\"http://www.jcp.org/jcr/sv/1.0\"\n" +
                "         xmlns:mix=\"http://www.jcp.org/jcr/mix/1.0\"\n" +
                "         xmlns:jcr=\"http://www.jcp.org/jcr/1.0\"\n" +
                "         sv:name=\"testnode1\">\n" +
                "    <sv:property sv:name=\"jcr:primaryType\"
sv:type=\"Name\">\n" +
                "        <sv:value>nt:unstructured</sv:value>\n" +
                "    </sv:property>\n" +
                "    <sv:property sv:name=\"jcr:title\" sv:type=\"String\">\n" +
                "        <sv:value>Test Node</sv:value>\n" +
                "    </sv:property>\n" +
                "    <sv:property sv:name=\"jcr:uuid\" sv:type=\"String\">\n" +
                "        <sv:value>1234</sv:value>\n" +
                "    </sv:property>\n" +
                "</sv:node>";

        InputStream in = new ByteArrayInputStream(xml.getBytes());
        session.importXML("/", in,
ImportUUIDBehavior.IMPORT_UUID_COLLISION_THROW);
        session.save();
    }

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


[jira] Resolved: (JCR-1857) jcr2spi: NPE with SessionImporter#checkIncludesMixReferenceable if NodeInfo doesn't contain mixin names

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

angela resolved JCR-1857.
-------------------------

       Resolution: Fixed
    Fix Version/s: 1.6.0
         Assignee: angela

fixed at rev. 714034
slightly adjusted test to import at testroot node (instead of root) and added second test that uses a node type extending from mix:referenceable  instead of nt:unstructured.

thanks for reporting

> jcr2spi: NPE with SessionImporter#checkIncludesMixReferenceable if NodeInfo doesn't contain mixin names
> -------------------------------------------------------------------------------------------------------
>
>                 Key: JCR-1857
>                 URL: https://issues.apache.org/jira/browse/JCR-1857
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-jcr2spi
>            Reporter: angela
>            Assignee: angela
>             Fix For: 1.6.0
>
>
> issue reported by tobi:
> java.lang.NullPointerException
> 	at java.util.Arrays$ArrayList.<init>(Arrays.java:2355)
> 	at java.util.Arrays.asList(Arrays.java:2341)
> 	at org.apache.jackrabbit.jcr2spi.xml.SessionImporter.checkIncludesMixReferenceable(SessionImporter.java:637)
> 	at org.apache.jackrabbit.jcr2spi.xml.SessionImporter.startNode(SessionImporter.java:209)
> including test case:
>     public void testEmptyMixins() throws Exception {
>         String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
>                 "<sv:node xmlns:nt=\"http://www.jcp.org/jcr/nt/1.0\"\n" +
>                 "         xmlns:sv=\"http://www.jcp.org/jcr/sv/1.0\"\n" +
>                 "         xmlns:mix=\"http://www.jcp.org/jcr/mix/1.0\"\n" +
>                 "         xmlns:jcr=\"http://www.jcp.org/jcr/1.0\"\n" +
>                 "         sv:name=\"testnode1\">\n" +
>                 "    <sv:property sv:name=\"jcr:primaryType\"
> sv:type=\"Name\">\n" +
>                 "        <sv:value>nt:unstructured</sv:value>\n" +
>                 "    </sv:property>\n" +
>                 "    <sv:property sv:name=\"jcr:title\" sv:type=\"String\">\n" +
>                 "        <sv:value>Test Node</sv:value>\n" +
>                 "    </sv:property>\n" +
>                 "    <sv:property sv:name=\"jcr:uuid\" sv:type=\"String\">\n" +
>                 "        <sv:value>1234</sv:value>\n" +
>                 "    </sv:property>\n" +
>                 "</sv:node>";
>         InputStream in = new ByteArrayInputStream(xml.getBytes());
>         session.importXML("/", in,
> ImportUUIDBehavior.IMPORT_UUID_COLLISION_THROW);
>         session.save();
>     }

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


[jira] Updated: (JCR-1857) jcr2spi: NPE with SessionImporter#checkIncludesMixReferenceable if NodeInfo doesn't contain mixin names

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

angela updated JCR-1857:
------------------------

        Fix Version/s:     (was: 1.6.0)
                       1.5.0
    Affects Version/s: 1.4

> jcr2spi: NPE with SessionImporter#checkIncludesMixReferenceable if NodeInfo doesn't contain mixin names
> -------------------------------------------------------------------------------------------------------
>
>                 Key: JCR-1857
>                 URL: https://issues.apache.org/jira/browse/JCR-1857
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: jackrabbit-jcr2spi
>    Affects Versions: 1.4
>            Reporter: angela
>            Assignee: angela
>             Fix For: 1.5.0
>
>
> issue reported by tobi:
> java.lang.NullPointerException
> 	at java.util.Arrays$ArrayList.<init>(Arrays.java:2355)
> 	at java.util.Arrays.asList(Arrays.java:2341)
> 	at org.apache.jackrabbit.jcr2spi.xml.SessionImporter.checkIncludesMixReferenceable(SessionImporter.java:637)
> 	at org.apache.jackrabbit.jcr2spi.xml.SessionImporter.startNode(SessionImporter.java:209)
> including test case:
>     public void testEmptyMixins() throws Exception {
>         String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
>                 "<sv:node xmlns:nt=\"http://www.jcp.org/jcr/nt/1.0\"\n" +
>                 "         xmlns:sv=\"http://www.jcp.org/jcr/sv/1.0\"\n" +
>                 "         xmlns:mix=\"http://www.jcp.org/jcr/mix/1.0\"\n" +
>                 "         xmlns:jcr=\"http://www.jcp.org/jcr/1.0\"\n" +
>                 "         sv:name=\"testnode1\">\n" +
>                 "    <sv:property sv:name=\"jcr:primaryType\"
> sv:type=\"Name\">\n" +
>                 "        <sv:value>nt:unstructured</sv:value>\n" +
>                 "    </sv:property>\n" +
>                 "    <sv:property sv:name=\"jcr:title\" sv:type=\"String\">\n" +
>                 "        <sv:value>Test Node</sv:value>\n" +
>                 "    </sv:property>\n" +
>                 "    <sv:property sv:name=\"jcr:uuid\" sv:type=\"String\">\n" +
>                 "        <sv:value>1234</sv:value>\n" +
>                 "    </sv:property>\n" +
>                 "</sv:node>";
>         InputStream in = new ByteArrayInputStream(xml.getBytes());
>         session.importXML("/", in,
> ImportUUIDBehavior.IMPORT_UUID_COLLISION_THROW);
>         session.save();
>     }

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