Created attachment 918966 [details]
reproducer maven project
Description of problem:
When using the code below to get KieBase, if using "KieClasspathContainer" and there is ".xsd" resource present in the classpath, NullPointerException will be thrown as "JaxbConfigurationImpl" was not set properly.
KieServices ks = KieServices.Factory.get();
KieContainer kContainer = ks.getKieClasspathContainer();
KieBase kBase = kContainer.getKieBase("kbase");
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Unzip attachment "reproducer.zip" and import maven project "01144843" into JBDS / Eclipse
2. Compile and execute "ProcessMain # main()"
Following stacktrace is printed out:
Exception in thread "main" java.lang.NullPointerException
KieBase object is expected with no exception thrown.
I fixed this issue with this commit https://github.com/droolsjbpm/drools/commit/a1a717c8c
However I believe we have a more general problem here: we need to differentiate between resources with compilation problems and resources that are not related at all with Drools. For instance we could have lots of false compilation problems if Drools tries to parse a xls file thinking that it is a decision table while actually it isn't. At the moment we don't have such a mechanism, but we could at least try to implement some heuristics to "guess" if a xls file has to be treated as a decision table or not.
Verified on BRMS 6.1.0.DR3.