[jboss-user] [Snowdrop] - Solution: NPE VFS.getChild() snowdrop 2.0.0 M1 jboss 6

erik romson do-not-reply at jboss.com
Mon Jul 18 09:18:08 EDT 2011


erik romson [http://community.jboss.org/people/romson] created the discussion

"Solution: NPE VFS.getChild()  snowdrop 2.0.0 M1 jboss 6"

To view the discussion, visit: http://community.jboss.org/message/615850#615850

--------------------------------------------------------------
For anyone else:

I got a NullpoingterException in at VFS.getChild() when starting JBoss (sadly lost the stacktrace)

This was due to that I was importing spring resources from a folder that didn't exist (using a wildcard as in folder/*.xml)

In org.jboss.spring.vfs.VFSResourcePatternResolvingHelper#locateResources

        if (!oneMatchingRootOnly)
        {
            while (urls.hasMoreElements())
                resources.addAll(getVFSResources(urls.nextElement(), subPattern, pathMatcher));
        } else
        {
            resources.addAll(getVFSResources(classLoader.getResource(rootDirPath), subPattern, pathMatcher));
        }
        return resources.toArray(new Resource[resources.size()]);


This getVFSResources(urls.nextElement(), subPattern, pathMatcher) returned null which later through the exception when accessing the URL
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/615850#615850]

Start a new discussion in Snowdrop at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2082]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110718/981f89b9/attachment.html 


More information about the jboss-user mailing list