[rules-users] Drools verifier

Wolfgang Laun wolfgang.laun at gmail.com
Wed Mar 16 07:06:10 EDT 2011


String path = "C:...";
Resource resource = ResourceFactory.newClassPathResource( path, getClass()
);
if( resource != null ){
      verifier.addResourcesToVerify( resource, ResourceType.DRL );
} else {
     //...
}

On 16 March 2011 12:03, Wolfgang Laun <wolfgang.laun at gmail.com> wrote:

> You are feeding it the pathname, not the text from the file.
> -W
>
>
> On 16 March 2011 11:52, FrankVhh <frank.vanhoenshoven at agserv.eu> wrote:
>
>> Hi Wolfgang,
>>
>> I was about to report the fact that using drools-verifier 5.2.0 M1 didn't
>> help, when I saw your comment about checking the error.
>>
>> Apparently there is something wrong:
>> ### Verifier errors ###
>> [ERR 101] Line 1:1 no viable alternative at input ':'
>> Verifier could not form a PackageDescr from the resources that it was
>> trying
>> to verify.
>>
>> I do not understand this completely. When I execute the ruleset, it runs
>> as
>> planned, but this error message seems to imply there is something wrong
>> with
>> the drl.
>>
>> Is it a problem that I feed the verifier with
>> String ruleText  =
>>
>> "C:\\Users\\Frank\\Documents\\DroolsWorkSpaces\\EmpiricalExperiments\\Financial
>> Rules\\src\\main\\rules\\clearancerules.drl";
>>                verifier.addResourcesToVerify(
>> ResourceFactory.newReaderResource(
>>
>>                          new StringReader( ruleText ) ), ResourceType.DRL
>> );
>>
>> Do the inputs need to be in another format or is there definitely
>> something
>> wrong in the rules themselves?
>>
>> Regards,
>> Frank
>>
>> --
>> View this message in context:
>> http://drools-java-rules-engine.46999.n3.nabble.com/Drools-verifier-tp2681002p2687184.html
>> Sent from the Drools - User mailing list archive at Nabble.com.
>> _______________________________________________
>> rules-users mailing list
>> rules-users at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110316/e02ac585/attachment.html 


More information about the rules-users mailing list