2 Replies Latest reply on May 20, 2013 7:23 AM by Jawwad Muzaffar

    Error converting InputStream to a BinaryValue

    Jawwad Muzaffar Newbie

      Hi,

       

            I was working with ModeShape and finally converted my application (working on JR previously) to ModeShape, It worked fine on my developer machine (Windows). Then I deployed it on a test machine which was using linux. The repository was initialized successfully, but When I started some document uploading, I encountered the following exception:

      Exception in WebService Method EX: org.modeshape.jcr.value.ValueFormatException: Error converting InputStream to a BinaryValue
      org.modeshape.jcr.value.ValueFormatException: Error converting InputStream to a BinaryValue
              at org.modeshape.jcr.value.binary.BinaryStoreValueFactory.create(BinaryStoreValueFactory.java:254)
              at org.modeshape.jcr.value.binary.BinaryStoreValueFactory.create(BinaryStoreValueFactory.java:57)
              at org.modeshape.jcr.JcrValueFactory.createBinary(JcrValueFactory.java:142)
              at org.modeshape.jcr.JcrValueFactory.createBinary(JcrValueFactory.java:47)
              at com.virtualcode.repository.impl.UploadDocumentServiceImpl.addFileToParentNode(UploadDocumentServiceImpl.java:465)
              at com.virtualcode.repository.impl.UploadDocumentServiceImpl.uploadDocument(UploadDocumentServiceImpl.java:148)
              at com.virtualcode.controller.DocumentManagementModule.uploadDocument(DocumentManagementModule.java:78)
              at com.virtualcode.agent.das.utils.Utility.uploadDocument(Utility.java:77)
              at com.virtualcode.agent.das.dataArchiver.FileArchiver.Process(FileArchiver.java:77)
              at com.virtualcode.agent.das.dataArchiver.FileArchiver.run(FileArchiver.java:119)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
              at java.lang.Thread.run(Thread.java:722)
      Caused by: org.modeshape.jcr.value.binary.BinaryStoreException: java.io.IOException: No such file or directory
              at org.modeshape.jcr.value.binary.FileSystemBinaryStore.storeValue(FileSystemBinaryStore.java:137)
              at org.modeshape.jcr.value.binary.BinaryStoreValueFactory.create(BinaryStoreValueFactory.java:252)
              ... 12 more
      Caused by: java.io.IOException: No such file or directory
              at java.io.UnixFileSystem.createFileExclusively(Native Method)
              at java.io.File.createTempFile(File.java:1879)
              at java.io.File.createTempFile(File.java:1923)
              at org.modeshape.jcr.value.binary.FileSystemBinaryStore.storeValue(FileSystemBinaryStore.java:113)
              ... 13 more
      

       

                     The folders are created but when it comes to converting input stream to binary, the above exception is thrown on any type of file. Is  there any special configurations I might be missing? or is this a problem with the system/platform?

       

      Thanks in advance.