2 Replies Latest reply on Nov 11, 2016 5:00 AM by pverboom

    modeshape git connector exception on big files.

    pverboom

      I have the following setup:

      Wildfly 10.1.0 with modeshape 5.2. The setup is done in the standalone.xml file. Modeshape uses both file based storage for persistence and binary.

      The setup seems to be working fine. I am able to read from and write to the repository.

       

      I use the git connector from Modeshape to read files from a git repository. This works fine for small files but for big files this is failing with the following error:

      Caused by: org.modeshape.persistence.file.FileProviderException: An active transaction is required, but wasn't detected

        at org.modeshape.persistence.file.FileDb.transactionalContent(FileDb.java:251)

        at org.modeshape.persistence.file.FileDb.editContent(FileDb.java:131)

        at org.modeshape.jcr.cache.document.LocalDocumentStore.edit(LocalDocumentStore.java:178)

        at org.modeshape.jcr.federation.FederatedDocumentStore.edit(FederatedDocumentStore.java:348)

        at org.modeshape.jcr.cache.document.DocumentTranslator.incrementBinaryReferenceCount(DocumentTranslator.java:1249)

        at org.modeshape.jcr.cache.document.DocumentTranslator.valueToDocument(DocumentTranslator.java:1222)

        at org.modeshape.jcr.cache.document.DocumentTranslator.setProperty(DocumentTranslator.java:425)

        at org.modeshape.jcr.federation.FederatedDocumentWriter.addProperty(FederatedDocumentWriter.java:131)

        at org.modeshape.connector.git.GitTree.addInformationForPath(GitTree.java:239)

        at org.modeshape.connector.git.GitTree.execute(GitTree.java:128)

        at org.modeshape.connector.git.GitConnector.getDocumentById(GitConnector.java:233)

       

      It makes no difference if I run the code that reads from Modeshape through a JEE session bean with transaction or one without a transaction I always get the same exception. As far as I know Modeshape should be creating his own transaction when non is found or use the existing one from an EJB when found.

      What I have seen in the source from the git connector is that it handles huge files differently from small files. Line 230 found here:

      modeshape/GitTree.java at master · ModeShape/modeshape · GitHub

      I haven't found out what he considers a huge file and what not. So far I have had it working with a 46MB file but not with a 126MB file.

       

      I haven't yet found out why it isn't opening a new transaction when non is found. Is there some way that I can create a transaction for Modeshape that it will recognize?

      Did somebody else run into the same exception?

       

      Kind regards,

      Patrick