Hi Venkatesh,

On 2/19/07, venkatesh devalapura nagabhushana <venkatesh.nag@wipro.com> wrote:

Hi,

After successfully compiling the example code FibnacciExample.java, I
tried to run it, I get the following error, let me know how to solve it:

java FibonacciExample
Exception in thread "main" java.lang.ExceptionInInitializerError
   at java.lang.Class.initializeClass() (/usr/lib/libgcj.so.6.0.0)
   at org.drools.semantics.java.RuleBuilder.<clinit>() (Unknown Source)
   at java.lang.Class.initializeClass () (/usr/lib/libgcj.so.6.0.0)
   at
org.drools.compiler.PackageBuilder.addRule(org.drools.lang.descr.RuleDescr) (Unknown Source)
   at
org.drools.compiler.PackageBuilder.addPackage(org.drools.lang.descr.PackageDescr ) (Unknown Source)
   at
org.drools.compiler.PackageBuilder.addPackageFromDrl(java.io.Reader)
(Unknown Source)
   at FibonacciExample.main(java.lang.String[]) (Unknown Source)
   at gnu.java.lang.MainThread.call_main () (/usr/lib/libgcj.so.6.0.0)
   at gnu.java.lang.MainThread.run() (/usr/lib/libgcj.so.6.0.0)
Caused by: java.util.regex.PatternSyntaxException: At position 2 in
regular expression pattern:
expected end of character class
        (.*)\bmodify\s*\(([^)]+)\)(.*)
          ^
   at java.util.regex.Pattern.Pattern(java.lang.String, int)
(/usr/lib/libgcj.so.6.0.0)
   at java.util.regex.Pattern.compile(java.lang.String, int)
(/usr/lib/libgcj.so.6.0.0)
   at org.drools.semantics.java.KnowledgeHelperFixer.<clinit>() (Unknown
Source)   at java.lang.Class.initializeClass()
(/usr/lib/libgcj.so.6.0.0)
   ...8 more

Is it require to place .drl file in the same directory as that of the
source code ?

Thanks,
Venkatesh


What JDK are you using? "/usr/lib/libgcj.so.6.0.0" and "gnu.java.lang" makes me think that it's GNU Classpath or something like that. It is quite possible that there are incompatibilities with that runtime.
Have you tried running it with Sun's JDK?

Best regards
Marcus