[JIRA] Created: (DSY-738) document.getLastVersion() should not return null for saved documents.

View: New views
14 Messages — Rating Filter:   Alert me  

[JIRA] Created: (DSY-738) document.getLastVersion() should not return null for saved documents.

by JIRA issues@cocoondev.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

document.getLastVersion() should not return null for saved documents.
---------------------------------------------------------------------

         Key: DSY-738
         URL: http://issues.cocoondev.org//browse/DSY-738
     Project: Daisy
        Type: Bug
    Versions: 2.4    
 Reporter: Bart Van den Abeele


> I am switching from daisy 2.0.1 to 2.4.  I have used the api intensively.
> I notice that document.getLastVersion() returns null after i  execute
> myDoc.save(validate); for a new document.  In 2.0.1 i used this function to
> get the creation date.  Because this returns null now, i get a
> null-pointer-exception (document.getLastVersion().getCreated()).  Is this
> supposed to return null?  Why has the behaviour changed?  Am i safe to use
> "document.getCreated()" instead?

Kabouter Wesley ;-)

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.cocoondev.org//secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

_______________________________________________
daisy community mailing list
Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
mail to: daisy@...
list information: http://lists.cocoondev.org/mailman/listinfo/daisy

[JIRA] Commented: (DSY-738) document.getLastVersion() should not return null for saved documents.

by JIRA issues@cocoondev.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

    [ http://issues.cocoondev.org//browse/DSY-738?page=comments#action_13832 ]

Karel Vervaeke commented on DSY-738:
------------------------------------

I can't reproduce it - getLastVersion() doesn't return null for me.

To test it, I added this to AbstractDocumentTestCase (after line 156)
assertNotNull("document.getLastVersion() should not be null after saving", document1.getLastVersion());

(the test now essentially reads:
doc = repo.createDocument(...)
doc.setField(...)
doc.setPart(....)
doc.save();
assertNotNull(..., doc.getLastVersion());

The local and remote implementations both work fine.
Are there any factors that might give another result on your environment?  Can you run the tests (with the added line) or create a daisy-js file in which you demonstrate that the problem occurs?

> document.getLastVersion() should not return null for saved documents.
> ---------------------------------------------------------------------
>
>          Key: DSY-738
>          URL: http://issues.cocoondev.org//browse/DSY-738
>      Project: Daisy
>         Type: Bug
>     Versions: 2.4
>     Reporter: Bart Van den Abeele

>
> > I am switching from daisy 2.0.1 to 2.4.  I have used the api intensively.
> > I notice that document.getLastVersion() returns null after i  execute
> > myDoc.save(validate); for a new document.  In 2.0.1 i used this function to
> > get the creation date.  Because this returns null now, i get a
> > null-pointer-exception (document.getLastVersion().getCreated()).  Is this
> > supposed to return null?  Why has the behaviour changed?  Am i safe to use
> > "document.getCreated()" instead?
> Kabouter Wesley ;-)

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.cocoondev.org//secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

_______________________________________________
daisy community mailing list
Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
mail to: daisy@...
list information: http://lists.cocoondev.org/mailman/listinfo/daisy

[JIRA] Commented: (DSY-738) document.getLastVersion() should not return null for saved documents.

by JIRA issues@cocoondev.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

    [ http://issues.cocoondev.org//browse/DSY-738?page=comments#action_13833 ]

Karel Vervaeke commented on DSY-738:
------------------------------------

It's probably nothing but I'm pointing it out to make sure:
in your original problem description your variable is called "document" except for just once ("myDoc").
This wouldn't be the problem in your actual code would it? :)

> document.getLastVersion() should not return null for saved documents.
> ---------------------------------------------------------------------
>
>          Key: DSY-738
>          URL: http://issues.cocoondev.org//browse/DSY-738
>      Project: Daisy
>         Type: Bug
>     Versions: 2.4
>     Reporter: Bart Van den Abeele

>
> > I am switching from daisy 2.0.1 to 2.4.  I have used the api intensively.
> > I notice that document.getLastVersion() returns null after i  execute
> > myDoc.save(validate); for a new document.  In 2.0.1 i used this function to
> > get the creation date.  Because this returns null now, i get a
> > null-pointer-exception (document.getLastVersion().getCreated()).  Is this
> > supposed to return null?  Why has the behaviour changed?  Am i safe to use
> > "document.getCreated()" instead?
> Kabouter Wesley ;-)

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.cocoondev.org//secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

_______________________________________________
daisy community mailing list
Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
mail to: daisy@...
list information: http://lists.cocoondev.org/mailman/listinfo/daisy

[JIRA] Commented: (DSY-738) document.getLastVersion() should not return null for saved documents.

by JIRA issues@cocoondev.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

    [ http://issues.cocoondev.org//browse/DSY-738?page=comments#action_13834 ]

Bart Van den Abeele commented on DSY-738:
-----------------------------------------

I have series of tests.  With the previous version of daisy (2.0.1) this test succeded. When i upgraded the test failes. So i'm sure it's not a problem in our code.  I'll look up the exact code and will post what happens.  We use daisy-2.4-dev-r5342.

> document.getLastVersion() should not return null for saved documents.
> ---------------------------------------------------------------------
>
>          Key: DSY-738
>          URL: http://issues.cocoondev.org//browse/DSY-738
>      Project: Daisy
>         Type: Bug
>     Versions: 2.4
>     Reporter: Bart Van den Abeele

>
> > I am switching from daisy 2.0.1 to 2.4.  I have used the api intensively.
> > I notice that document.getLastVersion() returns null after i  execute
> > myDoc.save(validate); for a new document.  In 2.0.1 i used this function to
> > get the creation date.  Because this returns null now, i get a
> > null-pointer-exception (document.getLastVersion().getCreated()).  Is this
> > supposed to return null?  Why has the behaviour changed?  Am i safe to use
> > "document.getCreated()" instead?
> Kabouter Wesley ;-)

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.cocoondev.org//secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

_______________________________________________
daisy community mailing list
Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
mail to: daisy@...
list information: http://lists.cocoondev.org/mailman/listinfo/daisy

[JIRA] Commented: (DSY-738) document.getLastVersion() should not return null for saved documents.

by JIRA issues@cocoondev.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

    [ http://issues.cocoondev.org//browse/DSY-738?page=comments#action_13835 ]

Bart Van den Abeele commented on DSY-738:
-----------------------------------------

We have written our own framework around the daisy-api to avoid boiler-plate.  Therefor its very difficult to post what exactly happens.  I have a stacktrace.  Does this tell you more?

2009-10-01 15:49:25  WARN: Could not load properties from URL [file:////home/bvda/sources/digidoc-all/digidoc-server/notexistingdigidoc-server.properties]: /home/bvda/sources/digidoc-all/digidoc-server/notexistingdigidoc-server.properties (Bestand of map bestaat niet)
java.lang.NullPointerException
        at org.outerj.daisy.repository.clientimpl.RemoteDocumentStrategy.instantiateVersion(RemoteDocumentStrategy.java:415)
        at org.outerj.daisy.repository.clientimpl.RemoteDocumentStrategy.loadShallowVersions(RemoteDocumentStrategy.java:389)
        at org.outerj.daisy.repository.commonimpl.DocumentVariantImpl.loadVersions(DocumentVariantImpl.java:931)
        at org.outerj.daisy.repository.commonimpl.DocumentVariantImpl.getVersions(DocumentVariantImpl.java:915)
        at org.outerj.daisy.repository.commonimpl.DocumentVariantImpl.getLastVersion(DocumentVariantImpl.java:881)
        at org.outerj.daisy.repository.commonimpl.DocumentImpl.getLastVersion(DocumentImpl.java:450)
        at be.schaubroeck.digidoc.dao.daisy.DigidocumentDetailMapper.mapCommonSimpleProperties(DigidocumentDetailMapper.java:118)
        at be.schaubroeck.digidoc.dao.daisy.DigidocumentDetailMapper.mapDigidocumentCommon(DigidocumentDetailMapper.java:107)
        at be.schaubroeck.digidoc.dao.daisy.DigidocumentDetailMapper.toObject(DigidocumentDetailMapper.java:69)
        at be.schaubroeck.digidoc.dao.daisy.DigidocumentDetailMapper.toObject(DigidocumentDetailMapper.java:1)
        at be.schaubroeck.daisy.RepositoryTemplate$1.doExecute(RepositoryTemplate.java:240)
        at be.schaubroeck.daisy.RepositoryTemplate.execute(RepositoryTemplate.java:67)
        at be.schaubroeck.daisy.RepositoryTemplate.save(RepositoryTemplate.java:194)
        at be.schaubroeck.daisy.RepositoryTemplate.save(RepositoryTemplate.java:139)
        at be.schaubroeck.digidoc.dao.daisy.DaisyDigidocumentDAO.insert(DaisyDigidocumentDAO.java:390)
        at be.schaubroeck.digidoc.dao.DigidocumentDAOITest.testNewInsertUpdateDeleteAkte(DigidocumentDAOITest.java:73)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at junit.framework.TestCase.runTest(TestCase.java:168)
        at junit.framework.TestCase.runBare(TestCase.java:134)
        at org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:76)
        at junit.framework.TestResult$1.protect(TestResult.java:110)
        at junit.framework.TestResult.runProtected(TestResult.java:128)
        at junit.framework.TestResult.run(TestResult.java:113)
        at junit.framework.TestCase.run(TestCase.java:124)
        at junit.framework.TestSuite.runTest(TestSuite.java:232)
        at junit.framework.TestSuite.run(TestSuite.java:227)
        at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
        at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
java.lang.NullPointerException
        at org.outerj.daisy.repository.clientimpl.RemoteDocumentStrategy.instantiateVersion(RemoteDocumentStrategy.java:415)
        at org.outerj.daisy.repository.clientimpl.RemoteDocumentStrategy.loadShallowVersions(RemoteDocumentStrategy.java:389)
        at org.outerj.daisy.repository.commonimpl.DocumentVariantImpl.loadVersions(DocumentVariantImpl.java:931)
        at org.outerj.daisy.repository.commonimpl.DocumentVariantImpl.getVersions(DocumentVariantImpl.java:915)
        at org.outerj.daisy.repository.commonimpl.DocumentVariantImpl.getLastVersion(DocumentVariantImpl.java:881)
        at org.outerj.daisy.repository.commonimpl.DocumentImpl.getLastVersion(DocumentImpl.java:450)
        at be.schaubroeck.digidoc.dao.daisy.DigidocumentDetailMapper.mapCommonSimpleProperties(DigidocumentDetailMapper.java:118)
        at be.schaubroeck.digidoc.dao.daisy.DigidocumentDetailMapper.mapDigidocumentCommon(DigidocumentDetailMapper.java:107)
        at be.schaubroeck.digidoc.dao.daisy.DigidocumentDetailMapper.toObject(DigidocumentDetailMapper.java:69)
        at be.schaubroeck.digidoc.dao.daisy.DigidocumentDetailMapper.toObject(DigidocumentDetailMapper.java:1)
        at be.schaubroeck.daisy.RepositoryTemplate$1.doExecute(RepositoryTemplate.java:240)
        at be.schaubroeck.daisy.RepositoryTemplate.execute(RepositoryTemplate.java:67)
        at be.schaubroeck.daisy.RepositoryTemplate.save(RepositoryTemplate.java:194)
        at be.schaubroeck.daisy.RepositoryTemplate.save(RepositoryTemplate.java:139)
        at be.schaubroeck.digidoc.dao.daisy.DaisyDigidocumentDAO.insert(DaisyDigidocumentDAO.java:390)
        at be.schaubroeck.digidoc.dao.DigidocumentDAOITest.testNewInsertUpdateDeleteAkte(DigidocumentDAOITest.java:73)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at junit.framework.TestCase.runTest(TestCase.java:168)
        at junit.framework.TestCase.runBare(TestCase.java:134)
        at org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:76)
        at junit.framework.TestResult$1.protect(TestResult.java:110)
        at junit.framework.TestResult.runProtected(TestResult.java:128)
        at junit.framework.TestResult.run(TestResult.java:113)
        at junit.framework.TestCase.run(TestCase.java:124)
        at junit.framework.TestSuite.runTest(TestSuite.java:232)
        at junit.framework.TestSuite.run(TestSuite.java:227)
        at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
        at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)



> document.getLastVersion() should not return null for saved documents.
> ---------------------------------------------------------------------
>
>          Key: DSY-738
>          URL: http://issues.cocoondev.org//browse/DSY-738
>      Project: Daisy
>         Type: Bug
>     Versions: 2.4
>     Reporter: Bart Van den Abeele

>
> > I am switching from daisy 2.0.1 to 2.4.  I have used the api intensively.
> > I notice that document.getLastVersion() returns null after i  execute
> > myDoc.save(validate); for a new document.  In 2.0.1 i used this function to
> > get the creation date.  Because this returns null now, i get a
> > null-pointer-exception (document.getLastVersion().getCreated()).  Is this
> > supposed to return null?  Why has the behaviour changed?  Am i safe to use
> > "document.getCreated()" instead?
> Kabouter Wesley ;-)

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.cocoondev.org//secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

_______________________________________________
daisy community mailing list
Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
mail to: daisy@...
list information: http://lists.cocoondev.org/mailman/listinfo/daisy

[JIRA] Commented: (DSY-738) document.getLastVersion() should not return null for saved documents.

by JIRA issues@cocoondev.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

    [ http://issues.cocoondev.org//browse/DSY-738?page=comments#action_13836 ]

Bart Van den Abeele commented on DSY-738:
-----------------------------------------

simmulation of code :

myRepo.createDocument(docName, docType, Language.DEFAULT_LANGUAGE_NAME,  Branch.MAIN_BRANCH_NAME);

document.setName(digidocument.getDocumentName());
        String oldDocumentType = schemaDAO.getDocumentType(document.getDocumentTypeId());
        String newDocumentType = digidocument.getDocumentType();
        if (!oldDocumentType.equals(newDocumentType))
        {
            Fields fields = document.getFields();
            for (Field field : fields.getArray())
            {
                document.deleteField(field.getTypeId());
            }
            document.changeDocumentType(newDocumentType);
        }
        modifyCommonSimpleProperties(digidocument, document);
        modifyUnknownFields(digidocument, document);
        modifyPictures(digidocument, document);

        myDoc.save(validate);

> document.getLastVersion() should not return null for saved documents.
> ---------------------------------------------------------------------
>
>          Key: DSY-738
>          URL: http://issues.cocoondev.org//browse/DSY-738
>      Project: Daisy
>         Type: Bug
>     Versions: 2.4
>     Reporter: Bart Van den Abeele

>
> > I am switching from daisy 2.0.1 to 2.4.  I have used the api intensively.
> > I notice that document.getLastVersion() returns null after i  execute
> > myDoc.save(validate); for a new document.  In 2.0.1 i used this function to
> > get the creation date.  Because this returns null now, i get a
> > null-pointer-exception (document.getLastVersion().getCreated()).  Is this
> > supposed to return null?  Why has the behaviour changed?  Am i safe to use
> > "document.getCreated()" instead?
> Kabouter Wesley ;-)

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.cocoondev.org//secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

_______________________________________________
daisy community mailing list
Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
mail to: daisy@...
list information: http://lists.cocoondev.org/mailman/listinfo/daisy

[JIRA] Commented: (DSY-738) document.getLastVersion() should not return null for saved documents.

by JIRA issues@cocoondev.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

    [ http://issues.cocoondev.org//browse/DSY-738?page=comments#action_13837 ]

Bart Van den Abeele commented on DSY-738:
-----------------------------------------

When i execute myDoc.getLastVersion() i get next exception :

java.lang.NullPointerException
        at org.outerj.daisy.repository.clientimpl.RemoteDocumentStrategy.instantiateVersion(RemoteDocumentStrategy.java:415)
        at org.outerj.daisy.repository.clientimpl.RemoteDocumentStrategy.loadShallowVersions(RemoteDocumentStrategy.java:389)
        at org.outerj.daisy.repository.commonimpl.DocumentVariantImpl.loadVersions(DocumentVariantImpl.java:931)
        at org.outerj.daisy.repository.commonimpl.DocumentVariantImpl.getVersions(DocumentVariantImpl.java:915)
        at org.outerj.daisy.repository.commonimpl.DocumentVariantImpl.getLastVersion(DocumentVariantImpl.java:881)
        at org.outerj.daisy.repository.commonimpl.DocumentImpl.getLastVersion(DocumentImpl.java:450)
        at be.schaubroeck.digidoc.dao.daisy.DigidocumentDetailMapper.mapCommonSimpleProperties(DigidocumentDetailMapper.java:118)
        at be.schaubroeck.digidoc.dao.daisy.DigidocumentDetailMapper.mapDigidocumentCommon(DigidocumentDetailMapper.java:107)
        at be.schaubroeck.digidoc.dao.daisy.DigidocumentDetailMapper.toObject(DigidocumentDetailMapper.java:69)
        at be.schaubroeck.digidoc.dao.daisy.DigidocumentDetailMapper.toObject(DigidocumentDetailMapper.java:1)
        at be.schaubroeck.daisy.RepositoryTemplate$1.doExecute(RepositoryTemplate.java:240)
        at be.schaubroeck.daisy.RepositoryTemplate.execute(RepositoryTemplate.java:67)
        at be.schaubroeck.daisy.RepositoryTemplate.save(RepositoryTemplate.java:194)
        at be.schaubroeck.daisy.RepositoryTemplate.save(RepositoryTemplate.java:139)
        at be.schaubroeck.digidoc.dao.daisy.DaisyDigidocumentDAO.insert(DaisyDigidocumentDAO.java:390)
        at be.schaubroeck.digidoc.dao.DigidocumentDAOITest.testNewInsertUpdateDeleteAkte(DigidocumentDAOITest.java:73)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at junit.framework.TestCase.runTest(TestCase.java:168)
        at junit.framework.TestCase.runBare(TestCase.java:134)
        at org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:76)
        at junit.framework.TestResult$1.protect(TestResult.java:110)
        at junit.framework.TestResult.runProtected(TestResult.java:128)
        at junit.framework.TestResult.run(TestResult.java:113)
        at junit.framework.TestCase.run(TestCase.java:124)
        at junit.framework.TestSuite.runTest(TestSuite.java:232)
        at junit.framework.TestSuite.run(TestSuite.java:227)
        at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
        at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
java.lang.NullPointerException
        at org.outerj.daisy.repository.clientimpl.RemoteDocumentStrategy.instantiateVersion(RemoteDocumentStrategy.java:415)
        at org.outerj.daisy.repository.clientimpl.RemoteDocumentStrategy.loadShallowVersions(RemoteDocumentStrategy.java:389)
        at org.outerj.daisy.repository.commonimpl.DocumentVariantImpl.loadVersions(DocumentVariantImpl.java:931)
        at org.outerj.daisy.repository.commonimpl.DocumentVariantImpl.getVersions(DocumentVariantImpl.java:915)
        at org.outerj.daisy.repository.commonimpl.DocumentVariantImpl.getLastVersion(DocumentVariantImpl.java:881)
        at org.outerj.daisy.repository.commonimpl.DocumentImpl.getLastVersion(DocumentImpl.java:450)
        at be.schaubroeck.digidoc.dao.daisy.DigidocumentDetailMapper.mapCommonSimpleProperties(DigidocumentDetailMapper.java:118)
        at be.schaubroeck.digidoc.dao.daisy.DigidocumentDetailMapper.mapDigidocumentCommon(DigidocumentDetailMapper.java:107)
        at be.schaubroeck.digidoc.dao.daisy.DigidocumentDetailMapper.toObject(DigidocumentDetailMapper.java:69)
        at be.schaubroeck.digidoc.dao.daisy.DigidocumentDetailMapper.toObject(DigidocumentDetailMapper.java:1)
        at be.schaubroeck.daisy.RepositoryTemplate$1.doExecute(RepositoryTemplate.java:240)
        at be.schaubroeck.daisy.RepositoryTemplate.execute(RepositoryTemplate.java:67)
        at be.schaubroeck.daisy.RepositoryTemplate.save(RepositoryTemplate.java:194)
        at be.schaubroeck.daisy.RepositoryTemplate.save(RepositoryTemplate.java:139)
        at be.schaubroeck.digidoc.dao.daisy.DaisyDigidocumentDAO.insert(DaisyDigidocumentDAO.java:390)
        at be.schaubroeck.digidoc.dao.DigidocumentDAOITest.testNewInsertUpdateDeleteAkte(DigidocumentDAOITest.java:73)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at junit.framework.TestCase.runTest(TestCase.java:168)
        at junit.framework.TestCase.runBare(TestCase.java:134)
        at org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:76)
        at junit.framework.TestResult$1.protect(TestResult.java:110)
        at junit.framework.TestResult.runProtected(TestResult.java:128)
        at junit.framework.TestResult.run(TestResult.java:113)
        at junit.framework.TestCase.run(TestCase.java:124)
        at junit.framework.TestSuite.runTest(TestSuite.java:232)
        at junit.framework.TestSuite.run(TestSuite.java:227)
        at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
        at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
java.lang.NullPointerException
        at org.outerj.daisy.repository.clientimpl.RemoteDocumentStrategy.instantiateVersion(RemoteDocumentStrategy.java:415)
        at org.outerj.daisy.repository.clientimpl.RemoteDocumentStrategy.loadShallowVersions(RemoteDocumentStrategy.java:389)
        at org.outerj.daisy.repository.commonimpl.DocumentVariantImpl.loadVersions(DocumentVariantImpl.java:931)
        at org.outerj.daisy.repository.commonimpl.DocumentVariantImpl.getVersions(DocumentVariantImpl.java:915)
        at org.outerj.daisy.repository.commonimpl.DocumentVariantImpl.getLastVersion(DocumentVariantImpl.java:881)
        at org.outerj.daisy.repository.commonimpl.DocumentImpl.getLastVersion(DocumentImpl.java:450)
        at be.schaubroeck.daisy.RepositoryTemplate$1.doExecute(RepositoryTemplate.java:234)
        at be.schaubroeck.daisy.RepositoryTemplate.execute(RepositoryTemplate.java:67)
        at be.schaubroeck.daisy.RepositoryTemplate.save(RepositoryTemplate.java:194)
        at be.schaubroeck.daisy.RepositoryTemplate.save(RepositoryTemplate.java:139)
        at be.schaubroeck.digidoc.dao.daisy.DaisyDigidocumentDAO.insert(DaisyDigidocumentDAO.java:390)
        at be.schaubroeck.digidoc.dao.DigidocumentDAOITest.testDocumentNotFoundException(DigidocumentDAOITest.java:244)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at junit.framework.TestCase.runTest(TestCase.java:168)
        at junit.framework.TestCase.runBare(TestCase.java:134)
        at org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:76)
        at junit.framework.TestResult$1.protect(TestResult.java:110)
        at junit.framework.TestResult.runProtected(TestResult.java:128)
        at junit.framework.TestResult.run(TestResult.java:113)
        at junit.framework.TestCase.run(TestCase.java:124)
        at junit.framework.TestSuite.runTest(TestSuite.java:232)
        at junit.framework.TestSuite.run(TestSuite.java:227)
        at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
        at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)


> document.getLastVersion() should not return null for saved documents.
> ---------------------------------------------------------------------
>
>          Key: DSY-738
>          URL: http://issues.cocoondev.org//browse/DSY-738
>      Project: Daisy
>         Type: Bug
>     Versions: 2.4
>     Reporter: Bart Van den Abeele

>
> > I am switching from daisy 2.0.1 to 2.4.  I have used the api intensively.
> > I notice that document.getLastVersion() returns null after i  execute
> > myDoc.save(validate); for a new document.  In 2.0.1 i used this function to
> > get the creation date.  Because this returns null now, i get a
> > null-pointer-exception (document.getLastVersion().getCreated()).  Is this
> > supposed to return null?  Why has the behaviour changed?  Am i safe to use
> > "document.getCreated()" instead?
> Kabouter Wesley ;-)

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.cocoondev.org//secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

_______________________________________________
daisy community mailing list
Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
mail to: daisy@...
list information: http://lists.cocoondev.org/mailman/listinfo/daisy

[JIRA] Commented: (DSY-738) document.getLastVersion() should not return null for saved documents.

by JIRA issues@cocoondev.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

    [ http://issues.cocoondev.org//browse/DSY-738?page=comments#action_13838 ]

Bart Van den Abeele commented on DSY-738:
-----------------------------------------

I get this exception when i execute myDoc.getLastVersion() after the myDoc.save() statement.  myDoc.getLastVerion() doesn't return null but an excpetion!

> document.getLastVersion() should not return null for saved documents.
> ---------------------------------------------------------------------
>
>          Key: DSY-738
>          URL: http://issues.cocoondev.org//browse/DSY-738
>      Project: Daisy
>         Type: Bug
>     Versions: 2.4
>     Reporter: Bart Van den Abeele

>
> > I am switching from daisy 2.0.1 to 2.4.  I have used the api intensively.
> > I notice that document.getLastVersion() returns null after i  execute
> > myDoc.save(validate); for a new document.  In 2.0.1 i used this function to
> > get the creation date.  Because this returns null now, i get a
> > null-pointer-exception (document.getLastVersion().getCreated()).  Is this
> > supposed to return null?  Why has the behaviour changed?  Am i safe to use
> > "document.getCreated()" instead?
> Kabouter Wesley ;-)

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.cocoondev.org//secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

_______________________________________________
daisy community mailing list
Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
mail to: daisy@...
list information: http://lists.cocoondev.org/mailman/listinfo/daisy

[JIRA] Commented: (DSY-738) document.getLastVersion() should not return null for saved documents.

by JIRA issues@cocoondev.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

    [ http://issues.cocoondev.org//browse/DSY-738?page=comments#action_13839 ]

Karel Vervaeke commented on DSY-738:
------------------------------------

Are you sure you are running that Daisy version?

The stacktrace says:
at org.outerj.daisy.repository.clientimpl.RemoteDocumentStrategy.instantiateVersion(RemoteDocumentStrategy.java:415)

However, daisy-2.4-dev-r5342 does not contain code at line 415 of said file.

> document.getLastVersion() should not return null for saved documents.
> ---------------------------------------------------------------------
>
>          Key: DSY-738
>          URL: http://issues.cocoondev.org//browse/DSY-738
>      Project: Daisy
>         Type: Bug
>     Versions: 2.4
>     Reporter: Bart Van den Abeele

>
> > I am switching from daisy 2.0.1 to 2.4.  I have used the api intensively.
> > I notice that document.getLastVersion() returns null after i  execute
> > myDoc.save(validate); for a new document.  In 2.0.1 i used this function to
> > get the creation date.  Because this returns null now, i get a
> > null-pointer-exception (document.getLastVersion().getCreated()).  Is this
> > supposed to return null?  Why has the behaviour changed?  Am i safe to use
> > "document.getCreated()" instead?
> Kabouter Wesley ;-)

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.cocoondev.org//secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

_______________________________________________
daisy community mailing list
Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
mail to: daisy@...
list information: http://lists.cocoondev.org/mailman/listinfo/daisy

[JIRA] Commented: (DSY-738) document.getLastVersion() should not return null for saved documents.

by JIRA issues@cocoondev.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

    [ http://issues.cocoondev.org//browse/DSY-738?page=comments#action_13840 ]

Karel Vervaeke commented on DSY-738:
------------------------------------

addendum: The exception comes from the *remote* implementation.
Even though the repository may be running r5342, your code may accidentally be using an older daisy remote implementation.
Coming to mind: for webapps, you may accidentally have old jars in your WEB-INF/lib folder (even if your ant/maven/whatever build script is copying the newer jars correctly, classes from older jars may take precedence in the classloader.

> document.getLastVersion() should not return null for saved documents.
> ---------------------------------------------------------------------
>
>          Key: DSY-738
>          URL: http://issues.cocoondev.org//browse/DSY-738
>      Project: Daisy
>         Type: Bug
>     Versions: 2.4
>     Reporter: Bart Van den Abeele

>
> > I am switching from daisy 2.0.1 to 2.4.  I have used the api intensively.
> > I notice that document.getLastVersion() returns null after i  execute
> > myDoc.save(validate); for a new document.  In 2.0.1 i used this function to
> > get the creation date.  Because this returns null now, i get a
> > null-pointer-exception (document.getLastVersion().getCreated()).  Is this
> > supposed to return null?  Why has the behaviour changed?  Am i safe to use
> > "document.getCreated()" instead?
> Kabouter Wesley ;-)

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.cocoondev.org//secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

_______________________________________________
daisy community mailing list
Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
mail to: daisy@...
list information: http://lists.cocoondev.org/mailman/listinfo/daisy

[JIRA] Commented: (DSY-738) document.getLastVersion() should not return null for saved documents.

by JIRA issues@cocoondev.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

    [ http://issues.cocoondev.org//browse/DSY-738?page=comments#action_13841 ]

Bart Van den Abeele commented on DSY-738:
-----------------------------------------

what is the fix then for this issue?

> document.getLastVersion() should not return null for saved documents.
> ---------------------------------------------------------------------
>
>          Key: DSY-738
>          URL: http://issues.cocoondev.org//browse/DSY-738
>      Project: Daisy
>         Type: Bug
>     Versions: 2.4
>     Reporter: Bart Van den Abeele

>
> > I am switching from daisy 2.0.1 to 2.4.  I have used the api intensively.
> > I notice that document.getLastVersion() returns null after i  execute
> > myDoc.save(validate); for a new document.  In 2.0.1 i used this function to
> > get the creation date.  Because this returns null now, i get a
> > null-pointer-exception (document.getLastVersion().getCreated()).  Is this
> > supposed to return null?  Why has the behaviour changed?  Am i safe to use
> > "document.getCreated()" instead?
> Kabouter Wesley ;-)

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.cocoondev.org//secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

_______________________________________________
daisy community mailing list
Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
mail to: daisy@...
list information: http://lists.cocoondev.org/mailman/listinfo/daisy

[JIRA] Commented: (DSY-738) document.getLastVersion() should not return null for saved documents.

by JIRA issues@cocoondev.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

    [ http://issues.cocoondev.org//browse/DSY-738?page=comments#action_13842 ]

Karel Vervaeke commented on DSY-738:
------------------------------------

Depends on what's causing the issue.

* check the version number in your build files
* run find . -name "daisy*.jar" in your build directory (and delete the offending jars)

> document.getLastVersion() should not return null for saved documents.
> ---------------------------------------------------------------------
>
>          Key: DSY-738
>          URL: http://issues.cocoondev.org//browse/DSY-738
>      Project: Daisy
>         Type: Bug
>     Versions: 2.4
>     Reporter: Bart Van den Abeele

>
> > I am switching from daisy 2.0.1 to 2.4.  I have used the api intensively.
> > I notice that document.getLastVersion() returns null after i  execute
> > myDoc.save(validate); for a new document.  In 2.0.1 i used this function to
> > get the creation date.  Because this returns null now, i get a
> > null-pointer-exception (document.getLastVersion().getCreated()).  Is this
> > supposed to return null?  Why has the behaviour changed?  Am i safe to use
> > "document.getCreated()" instead?
> Kabouter Wesley ;-)

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.cocoondev.org//secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

_______________________________________________
daisy community mailing list
Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
mail to: daisy@...
list information: http://lists.cocoondev.org/mailman/listinfo/daisy

[JIRA] Commented: (DSY-738) document.getLastVersion() should not return null for saved documents.

by JIRA issues@cocoondev.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

    [ http://issues.cocoondev.org//browse/DSY-738?page=comments#action_13843 ]

Bart Van den Abeele commented on DSY-738:
-----------------------------------------

thx! i was still dependant to daisy-2.0.1.

This issue can be clossed.

> document.getLastVersion() should not return null for saved documents.
> ---------------------------------------------------------------------
>
>          Key: DSY-738
>          URL: http://issues.cocoondev.org//browse/DSY-738
>      Project: Daisy
>         Type: Bug
>     Versions: 2.4
>     Reporter: Bart Van den Abeele

>
> > I am switching from daisy 2.0.1 to 2.4.  I have used the api intensively.
> > I notice that document.getLastVersion() returns null after i  execute
> > myDoc.save(validate); for a new document.  In 2.0.1 i used this function to
> > get the creation date.  Because this returns null now, i get a
> > null-pointer-exception (document.getLastVersion().getCreated()).  Is this
> > supposed to return null?  Why has the behaviour changed?  Am i safe to use
> > "document.getCreated()" instead?
> Kabouter Wesley ;-)

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.cocoondev.org//secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

_______________________________________________
daisy community mailing list
Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
mail to: daisy@...
list information: http://lists.cocoondev.org/mailman/listinfo/daisy

[JIRA] Resolved: (DSY-738) document.getLastVersion() should not return null for saved documents.

by JIRA issues@cocoondev.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

     [ http://issues.cocoondev.org//browse/DSY-738?page=all ]
     
Karel Vervaeke resolved DSY-738:
--------------------------------

    Resolution: Invalid

> document.getLastVersion() should not return null for saved documents.
> ---------------------------------------------------------------------
>
>          Key: DSY-738
>          URL: http://issues.cocoondev.org//browse/DSY-738
>      Project: Daisy
>         Type: Bug
>     Versions: 2.4
>     Reporter: Bart Van den Abeele

>
> > I am switching from daisy 2.0.1 to 2.4.  I have used the api intensively.
> > I notice that document.getLastVersion() returns null after i  execute
> > myDoc.save(validate); for a new document.  In 2.0.1 i used this function to
> > get the creation date.  Because this returns null now, i get a
> > null-pointer-exception (document.getLastVersion().getCreated()).  Is this
> > supposed to return null?  Why has the behaviour changed?  Am i safe to use
> > "document.getCreated()" instead?
> Kabouter Wesley ;-)

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.cocoondev.org//secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

_______________________________________________
daisy community mailing list
Professional Daisy support: http://outerthought.org/en/services/daisy/support.html
mail to: daisy@...
list information: http://lists.cocoondev.org/mailman/listinfo/daisy