DMN-02003 Unable to transform decisions from input stream

Hello everyone,

I am creating a simple spring-boot RESTful web api with one Controller. I embedded the DMN engine following the examples on Camunda’s github.

I created my DMN definition on Camunda Modeler. I uploaded it to the Camunda DMN Simulator and it works just fine.

However, when I read from inside my web api, I get the following error.

DMN-02003 Unable to transform decisions from input stream.

When I dig deeper, I find the following inner exception.

org.xml.sax.SAXException: Error: URI=null Line=2: cvc-elt.1: Cannot find the declaration of element ‘definitions’.

Here is the sample code I am using.

        dmnEngine = DmnEngineConfiguration.createDefaultDmnEngineConfiguration().buildEngine();

    InputStream fileStream = getClass()
            .getClassLoader().getResourceAsStream("trade.dmn");

    dmnDecision = dmnEngine.parseDecision("category_decision", fileStream);

I already double check that the InputStream is properly loaded, and it shows the xml definition from begin to end.

Thanks!

trade.dmn (2.0 KB)