2 Replies Latest reply on Apr 3, 2013 6:29 AM by estel1212

    I can't see created nodes through webdav/rest

      Hi,

       

      I use Modeshape version 3.1.3.Final and JBoss version 7.1.1.Final.

      I create a repository and workspace that I can see them if I connect through webdav.

      My problem is when I create a node in this repository, I can't see it in my repository/workspace through webdav or rest:

       

      my standalone.xml looks like this:

       

       

      <subsystem xmlns="urn:jboss:domain:infinispan:1.2" default-cache-container="hibernate">
           <cache-container name="modeshape" default-cache="orc">
                      <local-cache name="orc">
                          <transaction mode="NON_XA"/>
                          <file-store relative-to="jboss.server.data.dir" path="modeshape/store/orc" passivation="false" purge="true"/>
                     </local-cache>
           </cache-container>
       </subsystem>
       <subsystem xmlns="urn:jboss:domain:modeshape:1.0">
           <repository name="orc" cache-name="orc" cache-container="modeshape">
               <workspaces default-workspace="orc">
                    <workspace name="orc"/>
               </workspaces>
           </repository>
       </subsystem>
      

       

      my code to create a node works and I can see the pictures in "modeshape/store/orc" and I see no errors in by creating the node in logging.

       

       

      try {
                   Node rootNode = rootNode = tools.findOrCreateNode(session, "documents", "nt:unstructured");  
                  // doc id is id od document coming frome external resource.
                  Node documentFolder = tools.findOrCreateChild(rootNode, docId, "nt:unstructured");
                  Node documentNode = tools.findOrCreateChild(documentFolder, FileUtil.getFileName(absolutePath), "nt:file");
      
                  // Upload the file to that node ...
                  Node resourceNode = tools.findOrCreateChild(documentNode,"jcr:content", "nt:resource");
                  resourceNode.setProperty("jcr:lastModified", Calendar.getInstance());
                // absolute path is the path from picture
                  Binary binaryValue = session.getValueFactory().createBinary(FileUtil.getFileToUpload(absolutePath).openStream());
                  resourceNode.setProperty("jcr:data", binaryValue);
                  resourceNode.addMixin("mix:versionable");
      
                  urlDocumentPath = webdavUrl+documentNode.getPath();
                  logger.infov("document path for document with id {0} is {1} ", docId, urlDocumentPath);
      
              } catch (RepositoryException e) {
                  throw new JcrServiceException("Document  Node can't be created for doc id '"+docId+"' look please on the exception cause!", e);
              }