You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stanbol.apache.org by David Riccitelli <da...@insideout.io> on 2012/03/17 09:12:14 UTC

BadURIException on analysis job as RefactorerImpl.kReSCoreOperation

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>
********************************************************************************

Re: BadURIException on analysis job as RefactorerImpl.kReSCoreOperation

Posted by David Riccitelli <da...@insideout.io>.
So I think the only two differences between your configuration and ours is
that:
 [1] we're not using Zemanta,
 [2] we're using a local DBpedia index (in sling/datafiles):
http://dev.iks-project.eu/downloads/stanbol-indices/dbpedia-3.6-insideOut10/dbpedia.solrindex.zip

Probably by using the aforementioned DBpedia index you'll be able to
reproduce the issue.

Ciao,
David

On Wed, Mar 21, 2012 at 3:52 PM, Alessandro Adamou <ad...@cs.unibo.it>wrote:

> That's odd, it worked for me on that text. I'm using the latest default
> chain + zemanta and seo_refactoring:
>
>    tika
>    langid
>    ner
>    zemanta
>    dbpediaLinking
>    entityhubExtraction
>    seo_refactoring
>
> Anyway thanks for the ticket! Rupert's new TcProvider should help too.
>
> Alessandro
>
>
>
> On 3/19/12 4:49 PM, David Riccitelli wrote:
>
>> mmm... nope doesn't seem to release the resources. I'm testing with the
>> attached text.
>>
>> On Mon, Mar 19, 2012 at 2:06 PM, Alessandro Adamou <adamou@cs.unibo.it<mailto:
>> adamou@cs.unibo.it>> wrote:
>>
>>    Hi David,
>>
>>
>>        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.
>>
>>
>>    To that I think I can help. I just committed another update that
>>    releases the OntoNet session in a finally {} block, so even if the
>>    engine fails. Sorry for not thinking about it earlier.
>>
>>    It should also be quite faster and occupy a lot less disk space
>>    during the process (all entity signatures fetched from the
>>    EntityHub or elsewhere are now merged together in a single graph).
>>    It should also be delivering the same results (did for me at
>>    least), would you mind checking it against your content?
>>
>>        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-**c68a862d0fcb750f1477ad074b8319**
>> 25f40bf464>
>>         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.
>>
>>
>>    It looks as if an URI list/array is not being parsed correctly
>>    somewhere. What text did you use to get that odd URI ending with a
>>    comma? I guess it is not the same you posted earlier.
>>
>>    Best,
>>
>>    Alessandro
>>
>>    --     M.Sc. Alessandro Adamou
>>
>>    Alma Mater Studiorum - Università di Bologna
>>    Department of Computer Science
>>    Mura Anteo Zamboni 7, 40127 Bologna - Italy
>>
>>    Semantic Technology Laboratory (STLab)
>>    Institute for Cognitive Science and Technology (ISTC)
>>    National Research Council (CNR)
>>    Via Nomentana 56, 00161 Rome - Italy
>>
>>
>>    "I will give you everything, so long as you do not demand anything."
>>    (Ettore Petrolini, 1930)
>>
>>    Not sent from my iSnobTechDevice
>>
>>
>>
>>
>> --
>> David Riccitelli
>>
>> ****************************************************************
>> ********************
>> InsideOut10 s.r.l.
>> P.IVA: IT-11381771002
>> Fax: +39 0110708239
>> ---
>> LinkedIn: http://it.linkedin.com/in/**riccitelli<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<http://www.layar.com/publishing/developers/list/?page=1&country=&city=&keyword=insideout10&lpn=1>
>> >
>> ****************************************************************
>> ********************
>>
>>
>
> --
> M.Sc. Alessandro Adamou
>
> Alma Mater Studiorum - Università di Bologna
> Department of Computer Science
> Mura Anteo Zamboni 7, 40127 Bologna - Italy
>
> Semantic Technology Laboratory (STLab)
> Institute for Cognitive Science and Technology (ISTC)
> National Research Council (CNR)
> Via Nomentana 56, 00161 Rome - Italy
>
>
> "I will give you everything, so long as you do not demand anything."
> (Ettore Petrolini, 1930)
>
> Not sent from my iSnobTechDevice
>
>


-- 
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>
********************************************************************************

Re: BadURIException on analysis job as RefactorerImpl.kReSCoreOperation

Posted by Alessandro Adamou <ad...@cs.unibo.it>.
That's odd, it worked for me on that text. I'm using the latest default 
chain + zemanta and seo_refactoring:

     tika
     langid
     ner
     zemanta
     dbpediaLinking
     entityhubExtraction
     seo_refactoring

Anyway thanks for the ticket! Rupert's new TcProvider should help too.

Alessandro


On 3/19/12 4:49 PM, David Riccitelli wrote:
> mmm... nope doesn't seem to release the resources. I'm testing with 
> the attached text.
>
> On Mon, Mar 19, 2012 at 2:06 PM, Alessandro Adamou <adamou@cs.unibo.it 
> <ma...@cs.unibo.it>> wrote:
>
>     Hi David,
>
>
>         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.
>
>
>     To that I think I can help. I just committed another update that
>     releases the OntoNet session in a finally {} block, so even if the
>     engine fails. Sorry for not thinking about it earlier.
>
>     It should also be quite faster and occupy a lot less disk space
>     during the process (all entity signatures fetched from the
>     EntityHub or elsewhere are now merged together in a single graph).
>     It should also be delivering the same results (did for me at
>     least), would you mind checking it against your content?
>
>         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.
>
>
>     It looks as if an URI list/array is not being parsed correctly
>     somewhere. What text did you use to get that odd URI ending with a
>     comma? I guess it is not the same you posted earlier.
>
>     Best,
>
>     Alessandro
>
>     -- 
>     M.Sc. Alessandro Adamou
>
>     Alma Mater Studiorum - Università di Bologna
>     Department of Computer Science
>     Mura Anteo Zamboni 7, 40127 Bologna - Italy
>
>     Semantic Technology Laboratory (STLab)
>     Institute for Cognitive Science and Technology (ISTC)
>     National Research Council (CNR)
>     Via Nomentana 56, 00161 Rome - Italy
>
>
>     "I will give you everything, so long as you do not demand anything."
>     (Ettore Petrolini, 1930)
>
>     Not sent from my iSnobTechDevice
>
>
>
>
> -- 
> 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>
> ********************************************************************************
>


-- 
M.Sc. Alessandro Adamou

Alma Mater Studiorum - Università di Bologna
Department of Computer Science
Mura Anteo Zamboni 7, 40127 Bologna - Italy

Semantic Technology Laboratory (STLab)
Institute for Cognitive Science and Technology (ISTC)
National Research Council (CNR)
Via Nomentana 56, 00161 Rome - Italy


"I will give you everything, so long as you do not demand anything."
(Ettore Petrolini, 1930)

Not sent from my iSnobTechDevice


Re: BadURIException on analysis job as RefactorerImpl.kReSCoreOperation

Posted by David Riccitelli <da...@insideout.io>.
mmm... nope doesn't seem to release the resources. I'm testing with the
attached text.

On Mon, Mar 19, 2012 at 2:06 PM, Alessandro Adamou <ad...@cs.unibo.it>wrote:

> Hi David,
>
>
>  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.
>>
>
> To that I think I can help. I just committed another update that releases
> the OntoNet session in a finally {} block, so even if the engine fails.
> Sorry for not thinking about it earlier.
>
> It should also be quite faster and occupy a lot less disk space during the
> process (all entity signatures fetched from the EntityHub or elsewhere are
> now merged together in a single graph). It should also be delivering the
> same results (did for me at least), would you mind checking it against your
> content?
>
>  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-**c68a862d0fcb750f1477ad074b8319**25f40bf464>
>>  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.
>>
>
> It looks as if an URI list/array is not being parsed correctly somewhere.
> What text did you use to get that odd URI ending with a comma? I guess it
> is not the same you posted earlier.
>
> Best,
>
> Alessandro
>
> --
> M.Sc. Alessandro Adamou
>
> Alma Mater Studiorum - Universit� di Bologna
> Department of Computer Science
> Mura Anteo Zamboni 7, 40127 Bologna - Italy
>
> Semantic Technology Laboratory (STLab)
> Institute for Cognitive Science and Technology (ISTC)
> National Research Council (CNR)
> Via Nomentana 56, 00161 Rome - Italy
>
>
> "I will give you everything, so long as you do not demand anything."
> (Ettore Petrolini, 1930)
>
> Not sent from my iSnobTechDevice
>
>


-- 
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>
********************************************************************************

Re: BadURIException on analysis job as RefactorerImpl.kReSCoreOperation

Posted by Alessandro Adamou <ad...@cs.unibo.it>.
Hi David,

> 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.

To that I think I can help. I just committed another update that 
releases the OntoNet session in a finally {} block, so even if the 
engine fails. Sorry for not thinking about it earlier.

It should also be quite faster and occupy a lot less disk space during 
the process (all entity signatures fetched from the EntityHub or 
elsewhere are now merged together in a single graph). It should also be 
delivering the same results (did for me at least), would you mind 
checking it against your content?

> 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.

It looks as if an URI list/array is not being parsed correctly 
somewhere. What text did you use to get that odd URI ending with a 
comma? I guess it is not the same you posted earlier.

Best,

Alessandro

-- 
M.Sc. Alessandro Adamou

Alma Mater Studiorum - Università di Bologna
Department of Computer Science
Mura Anteo Zamboni 7, 40127 Bologna - Italy

Semantic Technology Laboratory (STLab)
Institute for Cognitive Science and Technology (ISTC)
National Research Council (CNR)
Via Nomentana 56, 00161 Rome - Italy


"I will give you everything, so long as you do not demand anything."
(Ettore Petrolini, 1930)

Not sent from my iSnobTechDevice


Re: BadURIException on analysis job as RefactorerImpl.kReSCoreOperation

Posted by David Riccitelli <da...@insideout.io>.
I created https://issues.apache.org/jira/browse/STANBOL-539.

BR
David

On Mon, Mar 19, 2012 at 1:39 PM, Andrea Giovanni Nuzzolese <
nuzzoles@cs.unibo.it> wrote:

> 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 <david@insideout.io
> >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
> >
> >
> ********************************************************************************
>
>


-- 
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>
********************************************************************************

Re: BadURIException on analysis job as RefactorerImpl.kReSCoreOperation

Posted by Andrea Giovanni Nuzzolese <nu...@cs.unibo.it>.
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 <da...@insideout.io>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>
> ********************************************************************************


Re: BadURIException on analysis job as RefactorerImpl.kReSCoreOperation

Posted by David Riccitelli <da...@insideout.io>.
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 <da...@insideout.io>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>
********************************************************************************