Search Mailing List Archives

Limit search to: Subject & Body Subject Author
Sort by: Reverse Sort
Limit to: All This Week Last Week This Month Last Month
Select Date Range     through    

[protege-discussion] PAL ValidationErrorImpl errors when using API but not GUI

Bertram Stuart sjbertram at
Thu Aug 7 00:57:27 PDT 2008


I've just checked in the JAR and all the entries appear to be in the 
manifest file. Diffing the files said that they were different, despite 
the fact that I copied them from my Protege install yesterday. I've 
recopied them and diff is reporting no differences, but validation is 
still failing with the same errors.

As for JVMs, I checked and I had Protege modified to force it to run on 
the Sun JDK while everything else ran on the Sun OpenJDK (both v1.6). 
The only reason I had done that was to try to get Jambalaya to work, so 
I've reverted it and Protege validation still works while code-based 
validation on the same ontology from matching JARs still fails.



Samson Tu wrote:
> Open your pal.jar file with Winzip and verify that the file 
> has entries like:
> Name: edu/stanford/smi/protegex/pal/predicates/LessThanP.class
> PAL-Predicate: True
> Make sure that your are using the same jar files and jvm 
> programmatically as Protege GUI.
> I am not aware of any change made to PAL in recent years.
> Samson
> Bertram Stuart wrote:
>> Hi,
>> I have an application that uses a Protege ontology (pprj format) and a 
>> number of PAL rules for validation. Those PAL rules are called through 
>> the API, looping over each constraint and calling the following:
>> EvaluationPolicy evalPolicy = new EvaluationPolicy();
>> evalPolicy.setFindAllCounterExamples(true);
>> ConstraintEvaluationEngine evalEngine = new 
>> ConstraintEvaluationEngine(evalPolicy, kb);
>> ConstraintEngineResponse response = 
>> evalEngine.checkSingleStatement(palConstraint);
>> Collection<ConstraintViolation> constraintResult = null;
>> if (response.areThereValidationErrors())
>> {
>> 	for (Object obj : response.getValidationErrors(palConstraint))
>> 	{
>> 		log.warn(obj.toString());
>> 	}
>> }
>> else if (response.areThereConstraintViolations())
>> {
>> 	constraintResult = response.getConstraintViolations(palConstraint);
>>"Number of violations of " + palConstraint.getBrowserText() + 
>> " = " + constraintResult.size());
>> }
>> else
>> {
>>"No constraint violations for " + palConstraint.getBrowserText());
>> }
>> palConstraint is an Instance that is the constraint and kb is the 
>> KnowledgeBase that the palConstraint was taken from and should be 
>> checked against. log is just a Log4J logger.
>> This has worked perfectly fine until recently, when it has started 
>> failing to parse the PAL rules and instead returning ValidationErrorImpl 
>> errors. The rules themselves are perfectly fine, as I can run them from 
>> within Protege and they pass/fail as appropriate. The problem is only 
>> from API calls, which get messages like the following:
>> 	Predicate named < is referenced but not defined.
>> 	Predicate named > is referenced but not defined.
>> 	Function named number-of-own-slot-values is referenced but not defined.
>> 	Function named coerce-to-string is referenced but not defined.
>> Given that the predicates and functions are core functionality, I am at 
>> a loss as to how they can not be defined. I have the protege.jar (3.3.1 
>> and 3.2.1 have been tested), lax.jar and looks-2.1.3.jar files from the 
>> Protege folder, plus antlr.jar and pal.jar from the plugins all included 
>> in my project.
>> Any suggestions on what might be causing core predicates and functions 
>> to fail as "not defined", especially when it works from the Protege app 
>> and worked as API calls until recently?
> _______________________________________________
> protege-discussion mailing list
> protege-discussion at
> Instructions for unsubscribing: 

The information contained in this E-Mail and any subsequent 
correspondence is private and is intended solely for the intended 
recipient(s).  The information in this communication may be 
confidential and/or legally privileged.  Nothing in this e-mail is 
intended to conclude a contract on behalf of QinetiQ or make QinetiQ 
subject to any other legally binding commitments, unless the e-mail 
contains an express statement to the contrary or incorporates a formal Purchase Order.

For those other than the recipient any disclosure, copying, 
distribution, or any action taken or omitted to be taken in reliance 
on such information is prohibited and may be unlawful.

Emails and other electronic communication with QinetiQ may be 
monitored and recorded for business purposes including security, audit 
and archival purposes.  Any response to this email indicates consent 
to this.

Telephone calls to QinetiQ may be monitored or recorded for quality 
control, security and other business purposes.

QinetiQ Limited
Registered in England & Wales: Company Number:3796233
Registered office: 85 Buckingham Gate, London SW1E 6PD, United Kingdom
Trading address: Cody Technology Park, Cody Building, Ively Road, Farnborough, Hampshire, GU14 0LX, United Kingdom

More information about the protege-discussion mailing list