-
Bug
-
Resolution: Done
-
Critical
-
2.4.0.Final
-
None
When Guvnor is trying to get a handle to the repository, at some point the following code in the Graph.java is hit trying to read the modeshape-initial-content.xml file:
public ImportInto<Conjunction<Graph>> importXmlFrom( String resourceName, ClassLoader classLoader ) { CheckArg.isNotEmpty(resourceName, "resourceName"); // Try the resource on the classpath ... if (classLoader == null) classLoader = getClass().getClassLoader(); InputStream stream = null; RuntimeException error = null; try { stream = getClass().getResourceAsStream(resourceName);
And stream ends up null.
When I change the code to:
public ImportInto<Conjunction<Graph>> importXmlFrom( String resourceName, ClassLoader classLoader ) { CheckArg.isNotEmpty(resourceName, "resourceName"); // Try the resource on the classpath ... if (classLoader == null) classLoader = getClass().getClassLoader(); InputStream stream = null; RuntimeException error = null; try { stream = classLoader.getResourceAsStream(resourceName);
(note the last line in each snippet) then it all works ok.
Seems to me that the original author had intended to do it this way.
--Kurt