You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Eric Norman (JIRA)" <ji...@apache.org> on 2008/01/20 23:12:34 UTC

[jira] Created: (JCR-1329) Unable to commit a new version of a nt:file node within a transaction using a specfic configuration

Unable to commit a new version of a nt:file node within a transaction  using  a specfic configuration
-----------------------------------------------------------------------------------------------------

                 Key: JCR-1329
                 URL: https://issues.apache.org/jira/browse/JCR-1329
             Project: Jackrabbit
          Issue Type: Bug
          Components: config, transactions
    Affects Versions: 1.4
            Reporter: Eric Norman
         Attachments: TestCase.java

A NullPointerException is thrown when committing a version of a nt:file node within a transaction using the following repository configuration:

1. File data size > 1024 bytes (causes the BLOB to use a temp file, otherwise the data is kept in memory)
2. Persistance Manager: org.apache.jackrabbit.core.state.db.DerbyPersistenceManager
3. No <DataStore> configured in repository.xml

The cause appears to be that during the commit operation BLOBInTempFile.discard() is called which deletes the temp file, then later on, BLOBInTempFile.getStream() is called on the same object, but the file has already been deleted, so it fails resulting in the following exception:

121375 [main] ERROR org.apache.jackrabbit.core.persistence.db.DatabasePersistenceManager  - failed to write property state: c4c5b6ec-b12d-419d-8a1f-03eb69f30aee/{http://www.jcp.org/jcr/1.0}data
java.lang.NullPointerException
	at java.io.FileInputStream.<init>(FileInputStream.java:103)
	at org.apache.jackrabbit.core.value.BLOBInTempFile.getStream(BLOBInTempFile.java:145)
	at org.apache.jackrabbit.core.persistence.util.Serializer.serialize(Serializer.java:198)
	at org.apache.jackrabbit.core.persistence.db.DatabasePersistenceManager.store(DatabasePersistenceManager.java:476)
	at org.apache.jackrabbit.core.persistence.AbstractPersistenceManager.store(AbstractPersistenceManager.java:75)
	at org.apache.jackrabbit.core.persistence.db.DatabasePersistenceManager.store(DatabasePersistenceManager.java:282)
	at org.apache.jackrabbit.core.state.SharedItemStateManager$Update.end(SharedItemStateManager.java:688)
	at org.apache.jackrabbit.core.state.XAItemStateManager.commit(XAItemStateManager.java:162)
	at org.apache.jackrabbit.core.version.XAVersionManager.commit(XAVersionManager.java:476)
	at org.apache.jackrabbit.core.TransactionContext.commit(TransactionContext.java:189)
	at org.apache.jackrabbit.core.XASessionImpl.commit(XASessionImpl.java:339)
	at TestCase.main(TestCase.java:81)


Workarounds:
1. Use a different persistance manager.  'org.apache.jackrabbit.core.persistence.bundle.DerbyPersistenceManager' does not fail.
2. Configure a <DataStore> in your repository.xml.  This results in a different code path that seems to work.



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


[jira] Updated: (JCR-1329) Unable to commit a new version of a nt:file node within a transaction using a specfic configuration

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

Eric Norman updated JCR-1329:
-----------------------------

    Attachment: repository.xml

repository.xml for the TestCase 

> Unable to commit a new version of a nt:file node within a transaction  using  a specfic configuration
> -----------------------------------------------------------------------------------------------------
>
>                 Key: JCR-1329
>                 URL: https://issues.apache.org/jira/browse/JCR-1329
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: config, transactions
>    Affects Versions: 1.4
>            Reporter: Eric Norman
>         Attachments: repository.xml, TestCase.java
>
>
> A NullPointerException is thrown when committing a version of a nt:file node within a transaction using the following repository configuration:
> 1. File data size > 1024 bytes (causes the BLOB to use a temp file, otherwise the data is kept in memory)
> 2. Persistance Manager: org.apache.jackrabbit.core.state.db.DerbyPersistenceManager
> 3. No <DataStore> configured in repository.xml
> The cause appears to be that during the commit operation BLOBInTempFile.discard() is called which deletes the temp file, then later on, BLOBInTempFile.getStream() is called on the same object, but the file has already been deleted, so it fails resulting in the following exception:
> 121375 [main] ERROR org.apache.jackrabbit.core.persistence.db.DatabasePersistenceManager  - failed to write property state: c4c5b6ec-b12d-419d-8a1f-03eb69f30aee/{http://www.jcp.org/jcr/1.0}data
> java.lang.NullPointerException
> 	at java.io.FileInputStream.<init>(FileInputStream.java:103)
> 	at org.apache.jackrabbit.core.value.BLOBInTempFile.getStream(BLOBInTempFile.java:145)
> 	at org.apache.jackrabbit.core.persistence.util.Serializer.serialize(Serializer.java:198)
> 	at org.apache.jackrabbit.core.persistence.db.DatabasePersistenceManager.store(DatabasePersistenceManager.java:476)
> 	at org.apache.jackrabbit.core.persistence.AbstractPersistenceManager.store(AbstractPersistenceManager.java:75)
> 	at org.apache.jackrabbit.core.persistence.db.DatabasePersistenceManager.store(DatabasePersistenceManager.java:282)
> 	at org.apache.jackrabbit.core.state.SharedItemStateManager$Update.end(SharedItemStateManager.java:688)
> 	at org.apache.jackrabbit.core.state.XAItemStateManager.commit(XAItemStateManager.java:162)
> 	at org.apache.jackrabbit.core.version.XAVersionManager.commit(XAVersionManager.java:476)
> 	at org.apache.jackrabbit.core.TransactionContext.commit(TransactionContext.java:189)
> 	at org.apache.jackrabbit.core.XASessionImpl.commit(XASessionImpl.java:339)
> 	at TestCase.main(TestCase.java:81)
> Workarounds:
> 1. Use a different persistance manager.  'org.apache.jackrabbit.core.persistence.bundle.DerbyPersistenceManager' does not fail.
> 2. Configure a <DataStore> in your repository.xml.  This results in a different code path that seems to work.

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


[jira] Resolved: (JCR-1329) Unable to commit a new version of a nt:file node within a transaction using a specfic configuration

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

Jukka Zitting resolved JCR-1329.
--------------------------------

    Resolution: Duplicate

Seems like a duplicate of JCR-1346.

> Unable to commit a new version of a nt:file node within a transaction  using  a specfic configuration
> -----------------------------------------------------------------------------------------------------
>
>                 Key: JCR-1329
>                 URL: https://issues.apache.org/jira/browse/JCR-1329
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: config, transactions
>    Affects Versions: 1.4
>            Reporter: Eric Norman
>         Attachments: repository.xml, TestCase.java
>
>
> A NullPointerException is thrown when committing a version of a nt:file node within a transaction using the following repository configuration:
> 1. File data size > 1024 bytes (causes the BLOB to use a temp file, otherwise the data is kept in memory)
> 2. Persistance Manager: org.apache.jackrabbit.core.state.db.DerbyPersistenceManager
> 3. No <DataStore> configured in repository.xml
> The cause appears to be that during the commit operation BLOBInTempFile.discard() is called which deletes the temp file, then later on, BLOBInTempFile.getStream() is called on the same object, but the file has already been deleted, so it fails resulting in the following exception:
> 121375 [main] ERROR org.apache.jackrabbit.core.persistence.db.DatabasePersistenceManager  - failed to write property state: c4c5b6ec-b12d-419d-8a1f-03eb69f30aee/{http://www.jcp.org/jcr/1.0}data
> java.lang.NullPointerException
> 	at java.io.FileInputStream.<init>(FileInputStream.java:103)
> 	at org.apache.jackrabbit.core.value.BLOBInTempFile.getStream(BLOBInTempFile.java:145)
> 	at org.apache.jackrabbit.core.persistence.util.Serializer.serialize(Serializer.java:198)
> 	at org.apache.jackrabbit.core.persistence.db.DatabasePersistenceManager.store(DatabasePersistenceManager.java:476)
> 	at org.apache.jackrabbit.core.persistence.AbstractPersistenceManager.store(AbstractPersistenceManager.java:75)
> 	at org.apache.jackrabbit.core.persistence.db.DatabasePersistenceManager.store(DatabasePersistenceManager.java:282)
> 	at org.apache.jackrabbit.core.state.SharedItemStateManager$Update.end(SharedItemStateManager.java:688)
> 	at org.apache.jackrabbit.core.state.XAItemStateManager.commit(XAItemStateManager.java:162)
> 	at org.apache.jackrabbit.core.version.XAVersionManager.commit(XAVersionManager.java:476)
> 	at org.apache.jackrabbit.core.TransactionContext.commit(TransactionContext.java:189)
> 	at org.apache.jackrabbit.core.XASessionImpl.commit(XASessionImpl.java:339)
> 	at TestCase.main(TestCase.java:81)
> Workarounds:
> 1. Use a different persistance manager.  'org.apache.jackrabbit.core.persistence.bundle.DerbyPersistenceManager' does not fail.
> 2. Configure a <DataStore> in your repository.xml.  This results in a different code path that seems to work.

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


[jira] Updated: (JCR-1329) Unable to commit a new version of a nt:file node within a transaction using a specfic configuration

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

Eric Norman updated JCR-1329:
-----------------------------

    Attachment: TestCase.java

Simple TestCase that demonstrates the problem

> Unable to commit a new version of a nt:file node within a transaction  using  a specfic configuration
> -----------------------------------------------------------------------------------------------------
>
>                 Key: JCR-1329
>                 URL: https://issues.apache.org/jira/browse/JCR-1329
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: config, transactions
>    Affects Versions: 1.4
>            Reporter: Eric Norman
>         Attachments: TestCase.java
>
>
> A NullPointerException is thrown when committing a version of a nt:file node within a transaction using the following repository configuration:
> 1. File data size > 1024 bytes (causes the BLOB to use a temp file, otherwise the data is kept in memory)
> 2. Persistance Manager: org.apache.jackrabbit.core.state.db.DerbyPersistenceManager
> 3. No <DataStore> configured in repository.xml
> The cause appears to be that during the commit operation BLOBInTempFile.discard() is called which deletes the temp file, then later on, BLOBInTempFile.getStream() is called on the same object, but the file has already been deleted, so it fails resulting in the following exception:
> 121375 [main] ERROR org.apache.jackrabbit.core.persistence.db.DatabasePersistenceManager  - failed to write property state: c4c5b6ec-b12d-419d-8a1f-03eb69f30aee/{http://www.jcp.org/jcr/1.0}data
> java.lang.NullPointerException
> 	at java.io.FileInputStream.<init>(FileInputStream.java:103)
> 	at org.apache.jackrabbit.core.value.BLOBInTempFile.getStream(BLOBInTempFile.java:145)
> 	at org.apache.jackrabbit.core.persistence.util.Serializer.serialize(Serializer.java:198)
> 	at org.apache.jackrabbit.core.persistence.db.DatabasePersistenceManager.store(DatabasePersistenceManager.java:476)
> 	at org.apache.jackrabbit.core.persistence.AbstractPersistenceManager.store(AbstractPersistenceManager.java:75)
> 	at org.apache.jackrabbit.core.persistence.db.DatabasePersistenceManager.store(DatabasePersistenceManager.java:282)
> 	at org.apache.jackrabbit.core.state.SharedItemStateManager$Update.end(SharedItemStateManager.java:688)
> 	at org.apache.jackrabbit.core.state.XAItemStateManager.commit(XAItemStateManager.java:162)
> 	at org.apache.jackrabbit.core.version.XAVersionManager.commit(XAVersionManager.java:476)
> 	at org.apache.jackrabbit.core.TransactionContext.commit(TransactionContext.java:189)
> 	at org.apache.jackrabbit.core.XASessionImpl.commit(XASessionImpl.java:339)
> 	at TestCase.main(TestCase.java:81)
> Workarounds:
> 1. Use a different persistance manager.  'org.apache.jackrabbit.core.persistence.bundle.DerbyPersistenceManager' does not fail.
> 2. Configure a <DataStore> in your repository.xml.  This results in a different code path that seems to work.

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


[jira] Updated: (JCR-1329) Unable to commit a new version of a nt:file node within a transaction using a specfic configuration

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

Eric Norman updated JCR-1329:
-----------------------------

    Attachment:     (was: repository.xml)

> Unable to commit a new version of a nt:file node within a transaction  using  a specfic configuration
> -----------------------------------------------------------------------------------------------------
>
>                 Key: JCR-1329
>                 URL: https://issues.apache.org/jira/browse/JCR-1329
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: config, transactions
>    Affects Versions: 1.4
>            Reporter: Eric Norman
>         Attachments: repository.xml, TestCase.java
>
>
> A NullPointerException is thrown when committing a version of a nt:file node within a transaction using the following repository configuration:
> 1. File data size > 1024 bytes (causes the BLOB to use a temp file, otherwise the data is kept in memory)
> 2. Persistance Manager: org.apache.jackrabbit.core.state.db.DerbyPersistenceManager
> 3. No <DataStore> configured in repository.xml
> The cause appears to be that during the commit operation BLOBInTempFile.discard() is called which deletes the temp file, then later on, BLOBInTempFile.getStream() is called on the same object, but the file has already been deleted, so it fails resulting in the following exception:
> 121375 [main] ERROR org.apache.jackrabbit.core.persistence.db.DatabasePersistenceManager  - failed to write property state: c4c5b6ec-b12d-419d-8a1f-03eb69f30aee/{http://www.jcp.org/jcr/1.0}data
> java.lang.NullPointerException
> 	at java.io.FileInputStream.<init>(FileInputStream.java:103)
> 	at org.apache.jackrabbit.core.value.BLOBInTempFile.getStream(BLOBInTempFile.java:145)
> 	at org.apache.jackrabbit.core.persistence.util.Serializer.serialize(Serializer.java:198)
> 	at org.apache.jackrabbit.core.persistence.db.DatabasePersistenceManager.store(DatabasePersistenceManager.java:476)
> 	at org.apache.jackrabbit.core.persistence.AbstractPersistenceManager.store(AbstractPersistenceManager.java:75)
> 	at org.apache.jackrabbit.core.persistence.db.DatabasePersistenceManager.store(DatabasePersistenceManager.java:282)
> 	at org.apache.jackrabbit.core.state.SharedItemStateManager$Update.end(SharedItemStateManager.java:688)
> 	at org.apache.jackrabbit.core.state.XAItemStateManager.commit(XAItemStateManager.java:162)
> 	at org.apache.jackrabbit.core.version.XAVersionManager.commit(XAVersionManager.java:476)
> 	at org.apache.jackrabbit.core.TransactionContext.commit(TransactionContext.java:189)
> 	at org.apache.jackrabbit.core.XASessionImpl.commit(XASessionImpl.java:339)
> 	at TestCase.main(TestCase.java:81)
> Workarounds:
> 1. Use a different persistance manager.  'org.apache.jackrabbit.core.persistence.bundle.DerbyPersistenceManager' does not fail.
> 2. Configure a <DataStore> in your repository.xml.  This results in a different code path that seems to work.

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


[jira] Updated: (JCR-1329) Unable to commit a new version of a nt:file node within a transaction using a specfic configuration

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

Eric Norman updated JCR-1329:
-----------------------------

    Attachment: repository.xml

repository.xml for the TestCase

> Unable to commit a new version of a nt:file node within a transaction  using  a specfic configuration
> -----------------------------------------------------------------------------------------------------
>
>                 Key: JCR-1329
>                 URL: https://issues.apache.org/jira/browse/JCR-1329
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: config, transactions
>    Affects Versions: 1.4
>            Reporter: Eric Norman
>         Attachments: repository.xml, TestCase.java
>
>
> A NullPointerException is thrown when committing a version of a nt:file node within a transaction using the following repository configuration:
> 1. File data size > 1024 bytes (causes the BLOB to use a temp file, otherwise the data is kept in memory)
> 2. Persistance Manager: org.apache.jackrabbit.core.state.db.DerbyPersistenceManager
> 3. No <DataStore> configured in repository.xml
> The cause appears to be that during the commit operation BLOBInTempFile.discard() is called which deletes the temp file, then later on, BLOBInTempFile.getStream() is called on the same object, but the file has already been deleted, so it fails resulting in the following exception:
> 121375 [main] ERROR org.apache.jackrabbit.core.persistence.db.DatabasePersistenceManager  - failed to write property state: c4c5b6ec-b12d-419d-8a1f-03eb69f30aee/{http://www.jcp.org/jcr/1.0}data
> java.lang.NullPointerException
> 	at java.io.FileInputStream.<init>(FileInputStream.java:103)
> 	at org.apache.jackrabbit.core.value.BLOBInTempFile.getStream(BLOBInTempFile.java:145)
> 	at org.apache.jackrabbit.core.persistence.util.Serializer.serialize(Serializer.java:198)
> 	at org.apache.jackrabbit.core.persistence.db.DatabasePersistenceManager.store(DatabasePersistenceManager.java:476)
> 	at org.apache.jackrabbit.core.persistence.AbstractPersistenceManager.store(AbstractPersistenceManager.java:75)
> 	at org.apache.jackrabbit.core.persistence.db.DatabasePersistenceManager.store(DatabasePersistenceManager.java:282)
> 	at org.apache.jackrabbit.core.state.SharedItemStateManager$Update.end(SharedItemStateManager.java:688)
> 	at org.apache.jackrabbit.core.state.XAItemStateManager.commit(XAItemStateManager.java:162)
> 	at org.apache.jackrabbit.core.version.XAVersionManager.commit(XAVersionManager.java:476)
> 	at org.apache.jackrabbit.core.TransactionContext.commit(TransactionContext.java:189)
> 	at org.apache.jackrabbit.core.XASessionImpl.commit(XASessionImpl.java:339)
> 	at TestCase.main(TestCase.java:81)
> Workarounds:
> 1. Use a different persistance manager.  'org.apache.jackrabbit.core.persistence.bundle.DerbyPersistenceManager' does not fail.
> 2. Configure a <DataStore> in your repository.xml.  This results in a different code path that seems to work.

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


[jira] Updated: (JCR-1329) Unable to commit a new version of a nt:file node within a transaction using a specfic configuration

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

Eric Norman updated JCR-1329:
-----------------------------

    Comment: was deleted

> Unable to commit a new version of a nt:file node within a transaction  using  a specfic configuration
> -----------------------------------------------------------------------------------------------------
>
>                 Key: JCR-1329
>                 URL: https://issues.apache.org/jira/browse/JCR-1329
>             Project: Jackrabbit
>          Issue Type: Bug
>          Components: config, transactions
>    Affects Versions: 1.4
>            Reporter: Eric Norman
>         Attachments: repository.xml, TestCase.java
>
>
> A NullPointerException is thrown when committing a version of a nt:file node within a transaction using the following repository configuration:
> 1. File data size > 1024 bytes (causes the BLOB to use a temp file, otherwise the data is kept in memory)
> 2. Persistance Manager: org.apache.jackrabbit.core.state.db.DerbyPersistenceManager
> 3. No <DataStore> configured in repository.xml
> The cause appears to be that during the commit operation BLOBInTempFile.discard() is called which deletes the temp file, then later on, BLOBInTempFile.getStream() is called on the same object, but the file has already been deleted, so it fails resulting in the following exception:
> 121375 [main] ERROR org.apache.jackrabbit.core.persistence.db.DatabasePersistenceManager  - failed to write property state: c4c5b6ec-b12d-419d-8a1f-03eb69f30aee/{http://www.jcp.org/jcr/1.0}data
> java.lang.NullPointerException
> 	at java.io.FileInputStream.<init>(FileInputStream.java:103)
> 	at org.apache.jackrabbit.core.value.BLOBInTempFile.getStream(BLOBInTempFile.java:145)
> 	at org.apache.jackrabbit.core.persistence.util.Serializer.serialize(Serializer.java:198)
> 	at org.apache.jackrabbit.core.persistence.db.DatabasePersistenceManager.store(DatabasePersistenceManager.java:476)
> 	at org.apache.jackrabbit.core.persistence.AbstractPersistenceManager.store(AbstractPersistenceManager.java:75)
> 	at org.apache.jackrabbit.core.persistence.db.DatabasePersistenceManager.store(DatabasePersistenceManager.java:282)
> 	at org.apache.jackrabbit.core.state.SharedItemStateManager$Update.end(SharedItemStateManager.java:688)
> 	at org.apache.jackrabbit.core.state.XAItemStateManager.commit(XAItemStateManager.java:162)
> 	at org.apache.jackrabbit.core.version.XAVersionManager.commit(XAVersionManager.java:476)
> 	at org.apache.jackrabbit.core.TransactionContext.commit(TransactionContext.java:189)
> 	at org.apache.jackrabbit.core.XASessionImpl.commit(XASessionImpl.java:339)
> 	at TestCase.main(TestCase.java:81)
> Workarounds:
> 1. Use a different persistance manager.  'org.apache.jackrabbit.core.persistence.bundle.DerbyPersistenceManager' does not fail.
> 2. Configure a <DataStore> in your repository.xml.  This results in a different code path that seems to work.

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