The problem seems to be that I wasn't following the note:

public void registerAll(Model model)
Registers all functions and templates from a given Model. Note that  
the Model should be an OntModel that also imports the system  
namespaces spin.owl and sp.owl - otherwise the system may not be able  
to transform the SPIN RDF into the correct SPARQL string.

A model that used to be an OntModel I changed to a Model in my move to  
create a single graph in SDB, and that is the model I was  
registering.  Perhaps the parameter should be changed to an OntModel?   
Note that the Model (_memModel) that caused the exception was created  
from the OntModel that worked as follows:


                _memModel.notifyEvent(GraphEvents.startRead);
                try {
                        _memModel.removeAll();
                        _memModel.add(ontModel);
                } finally {
                        _memModel.notifyEvent(GraphEvents.finishRead);
                }

But when I send the _memModel into registerAll I get the exception  
while the ontModel works.

Anyway, now on to your other e-mail regarding union graphs :-)

Jeff


On Dec 20, 2009, at 1:32 AM, Holger Knublauch wrote:

> Hi Jeff,
>
> could you send me the spl.spin.owl file from your distribution?  
> Also, which Jena version are you using?
>
> Thanks
> Holger
>
>
> On Dec 19, 2009, at 7:06 AM, Jeffrey Schmitz wrote:
>
>> Hello,
>>     I'm getting an exception on the call to registerAllSPINModules  
>> (stack trace below).  Stepping through the code, it's happeining on  
>> the following spin:Function defined in the spl ontology  
>> (spl.spin.owl):
>>
>>     http://spinrdf.org/spl#hasValue
>>
>> I'm not quite sure how to debug this one.  I believe I have the  
>> latest downloads of the spin libs and models.  Any ideas?
>>
>> java.lang.IllegalArgumentException: Function definition does not  
>> contain a valid body
>>      at  
>> org.topbraid.spin.arq.SPINARQFunction.<init>(SPINARQFunction.java:53)
>>      at  
>> org 
>> .topbraid 
>> .spin 
>> .system 
>> .SPINModuleRegistry.registerARQFunction(SPINModuleRegistry.java:183)
>>      at  
>> org 
>> .topbraid 
>> .spin.system.SPINModuleRegistry.register(SPINModuleRegistry.java:141)
>>      at  
>> org 
>> .topbraid 
>> .spin 
>> .system 
>> .SPINModuleRegistry.registerFunctions(SPINModuleRegistry.java:211)
>>      at  
>> org 
>> .topbraid 
>> .spin.system.SPINModuleRegistry.registerAll(SPINModuleRegistry.java: 
>> 171)
>>      at  
>> com 
>> .boeing.sparqlflow.SPINmodel.registerAllSPINModules(SPINmodel.java: 
>> 232)
>>      at com.boeing.sparqlflow.SIFmodel.initMemModel(SIFmodel.java:2319)
>>      at com.boeing.sparqlflow.debug.TestSDBSPIN.main(TestSDBSPIN.java: 
>> 120)
>> Caused by: java.lang.NullPointerException
>>      at com.hp.hpl.jena.sparql.path.PathWriter.asString(PathWriter.java: 
>> 35)
>>      at  
>> org 
>> .topbraid 
>> .spin.model.impl.TriplePathImpl.printPath(TriplePathImpl.java:58)
>>      at  
>> org 
>> .topbraid.spin.model.impl.TriplePathImpl.print(TriplePathImpl.java: 
>> 47)
>>      at  
>> org 
>> .topbraid 
>> .spin.model.impl.ElementListImpl.print(ElementListImpl.java:154)
>>      at  
>> org 
>> .topbraid 
>> .spin 
>> .model 
>> .impl 
>> .AbstractSPINResourceImpl 
>> .printNestedElementList(AbstractSPINResourceImpl.java:129)
>>      at  
>> org.topbraid.spin.model.impl.QueryImpl.printWhere(QueryImpl.java:173)
>>      at org.topbraid.spin.model.impl.AskImpl.print(AskImpl.java:23)
>>      at  
>> org 
>> .topbraid 
>> .spin 
>> .model 
>> .impl 
>> .AbstractSPINResourceImpl.toString(AbstractSPINResourceImpl.java:202)
>>      at  
>> org.topbraid.spin.arq.SPINARQFunction.<init>(SPINARQFunction.java:49)
>>      ... 7 more
>>
>>
>>
>> --
>>
>> You received this message because you are subscribed to the Google  
>> Groups "TopBraid Composer Users" group.
>> To post to this group, send email to 
>> [email protected] 
>> .
>> To unsubscribe from this group, send email to 
>> [email protected] 
>> .
>> For more options, visit this group at 
>> http://groups.google.com/group/topbraid-composer-users?hl=en 
>> .
>
>
> --
>
> You received this message because you are subscribed to the Google  
> Groups "TopBraid Composer Users" group.
> To post to this group, send email to [email protected] 
> .
> To unsubscribe from this group, send email to 
> [email protected] 
> .
> For more options, visit this group at 
> http://groups.google.com/group/topbraid-composer-users?hl=en 
> .

--

You received this message because you are subscribed to the Google Groups 
"TopBraid Composer Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/topbraid-composer-users?hl=en.


Reply via email to