I'm currently refactoring an application that uses drools 5.3.1, trying to add a binary package file from classpath instead of a taking it from a URL, but I'm stuck with the following exception:
java.io.StreamCorruptedException: invalid stream header: EFBFBDEF
This is the code I'm using:
KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
kbuilder.add(ResourceFactory.newClasspathResource(path), ResourceType.PKG);
I've just changed the static method called from ResourceFactory.newURLResource
to ResourceFactory.newClassPathResource
, which used to work when the .pkg file was loaded from a remote location.
Any hints?