PMML Spring Boot, kogito-examples - "illegal escape character" in PredictionModels

119 views
Skip to first unread message

Andreas Martin

unread,
Jul 9, 2021, 3:22:14 AM7/9/21
to Kogito development mailing list
Hi colleagues,

I tried to compile and run (mvn clean compile spring-boot:run) the PMML and DMN Spring Boot kogito-examples (https://github.com/kiegroup/kogito-examples) on my Windows machine.

While the classes getting generated, a compilation error occurred: "illegal escape character".

The problem is that the generated "PredictionModels" class contains paths, some String, with some wrongly escaped characters of the Windows paths:
09-07-_2021_09-16-09.png
What do you think, is that a bug?
Or am I missing a necessary configuration setting?

Cheers,
Andreas

Gabriele Cardosi

unread,
Jul 12, 2021, 2:37:31 AM7/12/21
to kogito-de...@googlegroups.com
HI Andreas,
from the screenshots, it seems that the generated paths inside the "static" block are correctly-formatted windows paths. Then there is that last line ("/C:/Dev....") that is clearly wrong, but I'm not sure where this comes from. Could you please try again the compilation with full debug ("-X -e") and share log output ?

Thanks

Gabriele

--
You received this message because you are subscribed to the Google Groups "Kogito development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kogito-developm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kogito-development/69fa5748-19f6-4164-8ebe-bf1a059c1257n%40googlegroups.com.


--

GABRIELE CARDOSI

SENIOR SOFTWARE ENGINEERS, MW

Red Hat Ltd

gcar...@redhat.com    M: +39-3461717132    

Andreas Martin

unread,
Jul 12, 2021, 7:36:44 AM7/12/21
to Kogito development mailing list
Hi Gabriele
 
Thank you very much for your reply.

Are you sure that the paths (as strings) in the init() block are formatted correctly?

As I said, init() seems to expect strings, where in my case containing backslashes in the path. Should this not be "escaped" - like this: init("C:\\DevProjects\\kogito-examples-stable\\pmml-springboot-example\\src\main\\resources\\test_miningmodel.pmml")

Regards,
Andreas

Gabriele Cardosi

unread,
Jul 12, 2021, 7:45:43 AM7/12/21
to kogito-de...@googlegroups.com
Hi Andreas, you are right - I had misread.
I've done and  verifying the fix right now, I'll let you know as soon as I open the PR

Best

Gabriele

Rhett S

unread,
Aug 17, 2021, 9:49:35 AM8/17/21
to Kogito development mailing list
Hi All, issue still occurring on windows. However, if you spin up WSL2 and build there, you'll have success. hope it helps, Rhett

Daniele Zonca

unread,
Aug 17, 2021, 10:57:29 AM8/17/21
to Kogito development mailing list
Hi Rhett,

The fix of the problem should be included in Kogito 1.10 that is going to be released few days

Thanks for the WSL2 feedback, it is probably a reasonable workaround for similar issues!

Daniele

Rhett S

unread,
Aug 18, 2021, 5:25:20 PM8/18/21
to Kogito development mailing list
Hi Daniele, completely reasonable. Thank you- to you and your team for the hard work and fantastic tool set. Rhett
Reply all
Reply to author
Forward
0 new messages