I David,

I think that the exception is thrown because some entity dereferenced by the 
Refactor engine has a RDF graph that contains some URI that the Jena parser 
does not like.
In my opinion in such a situation the Refactor should not break the execution, 
even if it is not possible to resolve the bad URI.
You have also to take into account that we are moving the SPARQL engine of the 
Refactor to work directly with Clerezza construct queries without any graph 
conversion from 
Jena Models to Clerezza triple collections. This might fix the problem as I see 
that it is exactly during such a conversion that the exception is thrown.

By the way, if you still not you can open a ticket on Jira about that.

Andrea


On Mar 18, 2012, at 10:46 AM, David Riccitelli wrote:

> I shall add that, when an exception is raised, the Refactor is not
> releasing the resources as per latest implementations, causing the race
> conditions to happen again.
> 
> BR
> David
> 
> On Sat, Mar 17, 2012 at 10:12 AM, David Riccitelli <[email protected]>wrote:
> 
>> Dears,
>> 
>> When running an analysis job it seems that sometimes some data are not
>> formally correct, and raise BadURIException. This causes the entire
>> analysis job to fail. From the stack-trace I don't clearly understand if
>> the bad URI is fed by the Refactorer or not:
>> 
>> 17.03.2012 08:06:11.467 *INFO* [Thread-26]
>> org.apache.stanbol.enhancer.jobmanager.event.impl.EnhancementJob Execution
>> of 'seo_refactoring' for ContentItem
>> urn:content-item-sha1-c68a862d0fcb750f1477ad074b831925f40bf464 completed
>> (chain: default, node: org.apache.clerezza.rdf.core.BNode@4a349f8a,
>> optional false)
>> 17.03.2012 08:06:11.468 *ERROR* [Thread-26]
>> org.apache.stanbol.enhancer.jobmanager.event.impl.EnhancementJobHandler
>> Unexpected Exception while processing ContentItem
>> <urn:content-item-sha1-c68a862d0fcb750f1477ad074b831925f40bf464> with
>> EnhancementJobManager: class
>> org.apache.stanbol.enhancer.jobmanager.event.impl.EventJobManagerImpl *
>> com.hp.hpl.jena.shared.BadURIException*: Only well-formed absolute
>> URIrefs can be included in RDF/XML output: <http://www.dhsm.org,> Code:
>> 28/NOT_DNS_NAME in HOST: The host component did not meet the restrictions
>> on DNS names.
>>       at
>> com.hp.hpl.jena.xmloutput.impl.BaseXMLWriter.checkURI(BaseXMLWriter.java:829)
>>       at
>> com.hp.hpl.jena.xmloutput.impl.BaseXMLWriter.relativize(BaseXMLWriter.java:806)
>>       at
>> com.hp.hpl.jena.xmloutput.impl.Basic.writeResourceReference(Basic.java:148)
>>       at
>> com.hp.hpl.jena.xmloutput.impl.Basic.writePredicate(Basic.java:101)
>>       at
>> com.hp.hpl.jena.xmloutput.impl.Basic.writeRDFStatements(Basic.java:77)
>>       at
>> com.hp.hpl.jena.xmloutput.impl.Basic.writeRDFStatements(Basic.java:66)
>>       at com.hp.hpl.jena.xmloutput.impl.Basic.writeBody(Basic.java:40)
>>       at
>> com.hp.hpl.jena.xmloutput.impl.BaseXMLWriter.writeXMLBody(BaseXMLWriter.java:500)
>>       at
>> com.hp.hpl.jena.xmloutput.impl.BaseXMLWriter.write(BaseXMLWriter.java:472)
>>       at
>> com.hp.hpl.jena.xmloutput.impl.BaseXMLWriter.write(BaseXMLWriter.java:458)
>>       at com.hp.hpl.jena.rdf.model.impl.ModelCom.write(ModelCom.java:271)
>>       at
>> org.apache.stanbol.commons.owl.transformation.JenaToClerezzaConverter.jenaModelToClerezzaMGraph(JenaToClerezzaConverter.java:89)
>>       at
>> org.apache.stanbol.rules.refactor.impl.RefactorerImpl.kReSCoreOperation(RefactorerImpl.java:237)
>>       at
>> org.apache.stanbol.rules.refactor.impl.RefactorerImpl.ontologyRefactoring(RefactorerImpl.java:392)
>>       at
>> org.apache.stanbol.enhancer.engines.refactor.RefactorEnhancementEngine.computeEnhancements(RefactorEnhancementEngine.java:326)
>>       at
>> org.apache.stanbol.enhancer.jobmanager.event.impl.EnhancementJobHandler.processEvent(EnhancementJobHandler.java:228)
>>       at
>> org.apache.stanbol.enhancer.jobmanager.event.impl.EnhancementJobHandler.handleEvent(EnhancementJobHandler.java:167)
>>       at
>> org.apache.felix.eventadmin.impl.tasks.HandlerTaskImpl.execute(HandlerTaskImpl.java:88)
>>       at
>> org.apache.felix.eventadmin.impl.tasks.SyncDeliverTasks.execute(SyncDeliverTasks.java:221)
>>       at
>> org.apache.felix.eventadmin.impl.tasks.AsyncDeliverTasks$TaskExecuter.run(AsyncDeliverTasks.java:110)
>>       at
>> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(Unknown Source)
>>       at java.lang.Thread.run(Thread.java:662)
>> 17.03.2012 08:06:11.469 *INFO* [310268208@qtp-1377668766-0]
>> org.apache.stanbol.enhancer.jobmanager.event.impl.EventJobManagerImpl
>> Finished EnhancementJob for ContentItem
>> <urn:content-item-sha1-c68a862d0fcb750f1477ad074b831925f40bf464> after
>> 1637ms
>> 
>> --
>> David Riccitelli
>> 
>> 
>> ********************************************************************************
>> InsideOut10 s.r.l.
>> P.IVA: IT-11381771002
>> Fax: +39 0110708239
>> ---
>> LinkedIn: http://it.linkedin.com/in/riccitelli
>> Twitter: ziodave
>> ---
>> Layar Partner 
>> Network<http://www.layar.com/publishing/developers/list/?page=1&country=&city=&keyword=insideout10&lpn=1>
>> 
>> ********************************************************************************
>> 
>> 
> 
> 
> -- 
> David Riccitelli
> 
> ********************************************************************************
> InsideOut10 s.r.l.
> P.IVA: IT-11381771002
> Fax: +39 0110708239
> ---
> LinkedIn: http://it.linkedin.com/in/riccitelli
> Twitter: ziodave
> ---
> Layar Partner 
> Network<http://www.layar.com/publishing/developers/list/?page=1&country=&city=&keyword=insideout10&lpn=1>
> ********************************************************************************

Reply via email to