Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to compile a .drl file?

 
Arc Sa
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to compile a .drl file?

Is this the right way to be used in JDeveloper?

Am getting the following exception--
java.lang.NullPointerException

at java.io.Reader.<init>(Reader.java:61)

at java.io.InputStreamReader.<init>(InputStreamReader.java:55)

at demo.MyDrools.initRuleBase(MyDrools.java:13)

at demo.MyDrools.main(MyDrools.java:44)

Exception in thread main
Am i getting this because the drl file is not compiled.Am i missing any jar file? Can someone help me ?
 
Campbell Ritchie
Sheriff
Posts: 48652
56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please check very carefully that the file name is correctly spelt. The / at the beginning may cause the JVM to look in the wrong place. Failure to retrieve the URL will cause getResource() to return null, and that may cause the NullPointerException.
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also note that this has nothing to do with any IDE you may happen to be using.
 
Arc Sa
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes I have checked the file name, Its correct. But can you tell me how to compile the drl file? Nothing happens when I compile it even with errors
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not familiar with Drools, but what do you expect to happen? I wouldn't think that compiling a rules file produces any visible output. Maybe the Drools API has some way of figuring out if there were compilation problems?

Moving to a more appropriate forum where Drools would be discussed.
 
Arc Sa
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic