help to resolve exception to obtain SKOSDataset

42 views
Skip to first unread message

Paola Montorio

unread,
May 10, 2012, 6:19:04 AM5/10/12
to skos...@googlegroups.com

 

Hi dev group,

I ask you kindly support regarding the use of SKOS and OWL API.

 

The problem.

Especially in the initial steps after the class instantiated SkosManager, invoke on that object one of two methods to load the Ontology .owl

The two methods of SkosManager class: loadDatasetFromPhysicalURI and loadDataset.

 

Both these methods require as input an instance of URI as the absolute path of the ontology. I'm having so much always the same anomaly.

The exception that I get is the following:

 

  -----------

java.lang.ClassCastException: org.coode.owl.krssparser.KRSSOWLParserFactory cannot be cast to org.semanticweb.owl.io.OWLParserFactory

         at uk.ac.manchester.cs.owl.ParsableOWLOntologyFactory.getParsers(ParsableOWLOntologyFactory.java:84)

         at uk.ac.manchester.cs.owl.ParsableOWLOntologyFactory.loadOWLOntology(ParsableOWLOntologyFactory.java:154)

         at uk.ac.manchester.cs.owl.OWLOntologyManagerImpl.loadOntology(OWLOntologyManagerImpl.java:250)

 

---------------

 

The two codes where this falls ClassCastException are:

a.    invocation loadDataset method :

SKOSManager manager = new SKOSManager();

SKOSDataset dataSet = manager.loadDataset(URI.create("file:C:/modello_skos_secondo_prototipo.owl"));

           or

                  SKOSDataset dataSet = manager.loadDataset(URI.create("http://localhost:8080/provaWeb/"));

 

 

b.    invocation loadDatasetFromPhysicalURI method :

                   SKOSManager manager = new SKOSManager();

                   SKOSDataset dataSet = manager.loadDatasetFromPhysicalURI(URI.create("file:C:/modello_skos_secondo_prototipo.owl"));

 

Did you encounter this exception and if so, how did you solved?

Otherwise you can send the SKOS and OWL API libraries to use?

The SDK version on which development is 1.6, may also be a version problem?

 

Thank you in advance of the hand to overcome this problem,

Regards

 

Descrizione: Descrizione: Descrizione: Descrizione: Logo ITSLab

ITSLab srl

PAOLA MONTORIO

SSD - Area Application Management

Analyst Senior

 

Via Terragneta 90

80058 Torre Annunziata (Naples) - ITALY
Phone:    +39 0815353310
Fax:        +39 0815353700

E-mail:     paola.m...@itslab.it

Web:       www.itslab.it

 

STRETTAMENTE PERSONALE E CONFIDENZIALE. Questa e-mail potrebbe contenere informazioni riservate esclusivamente per il destinatario, a chiunque altro è fatto divieto di spedire e distribuire il presente documento. Se ritieni di non essere il giusto destinatario contatta il mittente e cancella il  massaggio dal tuo PC.

STRICTLY PERSONAL AND CONFIDENTIAL. This email may contain confidential and proprietary material for the sole use of the intended recipient. Any review or distribution by others is strictly prohibited. If you are not the intended recipient please contact the sender and delete all copies.

 

 

image001.jpg

Simon Jupp

unread,
May 10, 2012, 8:18:00 AM5/10/12
to skos...@googlegroups.com
Hi Paola, 

Sorry you are having some problems. It looks like a parsing error but that doesn't look like the full error message, if there are more errors being thrown can you also send them to me please?

Can you also let me know which version of the API you are using. If you have a public version version of the file you are trying to load, or want to send me a copy offline, then I can also take a look at that. 

Cheers
Simon

--
You received this message because you are subscribed to the Google Groups "skos-dev" group.
To post to this group, send email to skos...@googlegroups.com.
To unsubscribe from this group, send email to skos-dev+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/skos-dev?hl=en.

image001.jpg

Paola Montorio

unread,
May 11, 2012, 10:06:40 AM5/11/12
to skos...@googlegroups.com
Hi Simon,
I have fixed the exception, I've loading the correct version for both Skos and Owl api.
Thanks very much for your fast answer but I haven't  more errors.


cheers
Paola


E-mail:     paola.montorio@itslab.it

Web:       www.itslab.it

 

STRETTAMENTE PERSONALE E CONFIDENZIALE. Questa e-mail potrebbe contenere informazioni riservate esclusivamente per il destinatario, a chiunque altro è fatto divieto di spedire e distribuire il presente documento. Se ritieni di non essere il giusto destinatario contatta il mittente e cancella il  massaggio dal tuo PC.

STRICTLY PERSONAL AND CONFIDENTIAL. This email may contain confidential and proprietary material for the sole use of the intended recipient. Any review or distribution by others is strictly prohibited. If you are not the intended recipient please contact the sender and delete all copies.

--
You received this message because you are subscribed to the Google Groups "skos-dev" group.
To post to this group, send email to skos...@googlegroups.com.
To unsubscribe from this group, send email to skos-dev+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages