[jboss-jira] [JBoss JIRA] (DROOLS-704) Java scriptTask compilation error reports invalid line
Mark Proctor (JIRA)
issues at jboss.org
Thu Jul 23 12:59:04 EDT 2015
[ https://issues.jboss.org/browse/DROOLS-704?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mark Proctor reassigned DROOLS-704:
-----------------------------------
Assignee: Petr Široký (was: Mark Proctor)
> Java scriptTask compilation error reports invalid line
> ------------------------------------------------------
>
> Key: DROOLS-704
> URL: https://issues.jboss.org/browse/DROOLS-704
> Project: Drools
> Issue Type: Bug
> Affects Versions: 6.1.0.Final
> Environment: Windows 7 x64,
> jdk1.6.0_45 x64
> jbpm 6.1.0.Final
> Reporter: Владимир Боднарчук
> Assignee: Petr Široký
> Priority: Minor
>
> In case of a compilation error inside the scriptTask java code, the line and the column reported inside the org.drools.compiler.kie.builder.impl.MessageImpl are incorrect.
> The MessageImpl.getPath() should also return a path with the node id that contains the compilation error.
> To reproduce:
> {code:java}
> KieHelper kieHelper = new KieHelper();
> kieHelper.addResource(ResourceFactory.newClassPathResource("sample-jbpm6.bpmn"));
> Results res = kieHelper.verify();
> for (Message msg : res.getMessages()) {
> System.out.println("Error: " + msg);
> }
> if (res.hasMessages(Message.Level.ERROR)) {
> throw new IllegalStateException("Could not verify the workflow");
> }
> {code}
> {noformat}
> Error: class org.drools.compiler.kie.builder.impl.MessageImpl
> [main] ERROR org.drools.compiler.kie.builder.impl.AbstractKieModule - Unable to build KieBaseModel:defaultKieBase
> Process Compilation error : Process org.jbpm.Hello World(com.sample.bpmn.hello)
> org/jbpm/Process_org$u46$jbpm$u46$Hello_World265679914.java (9:416) : Syntax error on token "halskdjfh", delete this token
> Exception in thread "main" java.lang.IllegalStateException: Could not verify the workflow
> at Main.main(Main.java:26)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:597)
> at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
> Process finished with exit code 1
> {noformat}
> I've tested with both with "ECLIPSE" and "NATIVE" as values of the "drools.dialect.java.compiler".
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
More information about the jboss-jira
mailing list