Uploaded image for project: 'JBRULES'
  1. JBRULES
  2. JBRULES-1044

dialect appears to be a reserved keyword, not allowed in package name

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 4.0.0.GA
    • Fix Version/s: 4.0.1
    • Component/s: drools-compiler
    • Labels:
      None
    • Environment:

      Sun Java build 1.6.0_01-b06, Windows XP SP2, Eclipse 3.3, Jboss Rules Eclipse IDE 4.0

    • Affects:
      Documentation (Ref Guide, User Guide, etc.)
    • Workaround Description:
      Hide

      rename company or package

      Show
      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

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                tirelli Edson Tirelli
                Reporter:
                cbarham christopher barham
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: