[jboss-jira] [JBoss JIRA] Updated: (JBRULES-1044) dialect appears to be a reserved keyword, not allowed in package name

christopher barham (JIRA) jira-events at lists.jboss.org
Mon Jul 30 00:31:49 EDT 2007


     [ http://jira.jboss.com/jira/browse/JBRULES-1044?page=all ]

christopher barham updated JBRULES-1044:
----------------------------------------

    Workaround Description: rename company or package
               Description: 
Although not mentioned in the Online documentation, it appears Dialect is now a reserved word, the Eclipse IDE highlights this in a rule.  Changing the (Eclipse generated) sample project to be in package com.dialect.rules instead of com.sample results in the stack trace below.  This is a problem as my company is called Dialect so all my pacakges have the word in there :-) :

org.drools.compiler.DroolsParserException: Unknown error while parsing. This is a bug. Please contact the Development team.
	at org.drools.compiler.DrlParser.compile(DrlParser.java:180)
	at org.drools.compiler.DrlParser.parse(DrlParser.java:61)
	at org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:158)
	at com.sample.DroolsTest.readRule(DroolsTest.java:54)
	at com.sample.DroolsTest.main(DroolsTest.java:21)

The example rule is:

package com.dialect.rules

import com.sample.DroolsTest.Message;

rule "Hello World"
  when
    m : Message( status == Message.HELLO, message : message )
  then
    System.out.println( message );
    m.setMessage( "Goodbye cruel world" );
    m.setStatus( Message.GOODBYE );
    update( m );
end

rule "GoodBye"
  no-loop true
  when
    m : Message( status == Message.GOODBYE, message : message )
  then
    System.out.println( message );
    m.setMessage( message );

end


  was:
Although not mntioned in the Online documentation, it appears Dialect is a reserved word, the Eclipse IDE highlights this in a rule.  Changing the (Eclipse generated) sample project to be in package com.dialect.rules instead of com.sample results in a stack trace:


                   Affects: [Documentation (Ref Guide, User Guide, etc.)]

> dialect appears to be a reserved keyword, not allowed in package name
> ---------------------------------------------------------------------
>
>                 Key: JBRULES-1044
>                 URL: http://jira.jboss.com/jira/browse/JBRULES-1044
>             Project: JBoss Rules
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Drl Parser/Builder
>    Affects Versions:  4.0.0.GA
>         Environment: Sun Java build 1.6.0_01-b06,  Windows XP SP2, Eclipse 3.3, Jboss Rules Eclipse IDE 4.0
>            Reporter: christopher barham
>         Assigned To: Mark Proctor
>
> Although not mentioned in the Online documentation, it appears Dialect is now a reserved word, the Eclipse IDE highlights this in a rule.  Changing the (Eclipse generated) sample project to be in package com.dialect.rules instead of com.sample results in the stack trace below.  This is a problem as my company is called Dialect so all my pacakges have the word in there :-) :
> org.drools.compiler.DroolsParserException: Unknown error while parsing. This is a bug. Please contact the Development team.
> 	at org.drools.compiler.DrlParser.compile(DrlParser.java:180)
> 	at org.drools.compiler.DrlParser.parse(DrlParser.java:61)
> 	at org.drools.compiler.PackageBuilder.addPackageFromDrl(PackageBuilder.java:158)
> 	at com.sample.DroolsTest.readRule(DroolsTest.java:54)
> 	at com.sample.DroolsTest.main(DroolsTest.java:21)
> The example rule is:
> package com.dialect.rules
> import com.sample.DroolsTest.Message;
> rule "Hello World"
>   when
>     m : Message( status == Message.HELLO, message : message )
>   then
>     System.out.println( message );
>     m.setMessage( "Goodbye cruel world" );
>     m.setStatus( Message.GOODBYE );
>     update( m );
> end
> rule "GoodBye"
>   no-loop true
>   when
>     m : Message( status == Message.GOODBYE, message : message )
>   then
>     System.out.println( message );
>     m.setMessage( message );
> end

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list