2 Replies Latest reply on Oct 27, 2015 3:43 AM by hchiorean

    inclusionPattern with FileSystemConnector gives NPE

    rvwijngaarden

      Hi,

       

      i'm having problems getting the inclusionPattern on the FileSystemConnector to work. I'm trying to scan for only the .csv files (which there are some on the local file system) but i get a NPE. I used the example at https://docs.jboss.org/author/display/MODE40/File+system+connector

      and am using ModShape 4.4.0.Final

       

      Example of part of my repo config:

       

      "externalSources" : {

              "files" : {

                  "classname" : "org.modeshape.connector.filesystem.FileSystemConnector",

                  "directoryPath" : "/Users/me/Projects/jadada/data/here",

                  "projections" : [ "default:/rootFolder => /" ],

                  "enableEvents" : true,

                  "cacheTtlSeconds" : 0,

                  "inclusionPattern" : ".+[.]csv$"

              }

          }

       

      java.lang.NullPointerException at

      Node rootFolder = session.getNode("/rootFolder");

       

      Shutting down engine ...

          at org.modeshape.jcr.JcrSession.node(JcrSession.java:542)

          at org.modeshape.jcr.JcrSession.node(JcrSession.java:659)

          at org.modeshape.jcr.JcrSession.node(JcrSession.java:677)

          at org.modeshape.jcr.JcrSession.getNode(JcrSession.java:861)

          at org.modeshape.jcr.JcrSession.getNode(JcrSession.java:844)

          at org.modeshape.jcr.JcrSession.getNode(JcrSession.java:125)

       

       

      When i remove the pattern, all works well (all files are found )