Thank you for your fast reply.But, in my code, I have: 
import com.hp.hpl.jena.ontology.OntModel; 

public class OWLSProfileParser {
private OntModel ontModel;


......String URI= 
"http://www.daml.org/services/owl-s/1.0/BravoAirProfile.owl";ontModel.addLoadedImport(URI);
....}
So, I think that the problem in "jena.jar".  ("OntModel" comes from jena).I use 
jena-2.4.jar  .  I put this file in the lib of my project and in the jre.So, 
please, can you help me?Thank you in advance. 

--

Fairouz FAKHFAKH

Ingénieur informatique

Ecole Nationale d'Ingénieurs de Sfax

> Date: Sat, 16 Jun 2012 15:21:57 +0100
> From: [email protected]
> To: [email protected]
> Subject: Re: Problem jena
> 
> On 16/06/12 14:32, Fairouz FakhFakh wrote:
> >
> > Hello,I use: matchmaker-client
> > In the class OWLSProfileParser, I have a problem in this 
> > line:ontModel.addLoadedImport(URI);I have the following error:Exception in 
> > thread "main" java.lang.NullPointerException    at 
> > EDU.cmu.Atlas.owls1_1.parser.OWLSProfileParser.read(OWLSProfileParser.java:118)
> >       at 
> > EDU.cmu.Atlas.owls1_1.parser.OWLSProfileParser.read(OWLSProfileParser.java:97)
> >        at 
> > EDU.cmu.Atlas.matchmaker.client.OWLSMatchmakerClient.parseOWLSProfile(OWLSMatchmakerClient.java:226)
> >  at 
> > EDU.cmu.Atlas.matchmaker.client.OWLSMatchmakerClient.register(OWLSMatchmakerClient.java:99)
> >   at 
> > EDU.cmu.Atlas.matchmaker.client.OWLSMatchmakerClient.main(OWLSMatchmakerClient.java:247)
> > I found the method "addLoadedImport" in the class "ontModel.class" of the 
> > jar jena.
> > Can someone help me, please?Thank you in advance.                           
> >         
> 
> Your exception trace does not show any use of Jena code, you need to ask 
> the people who wrote OWLSProfileParse.
> 
> If you are getting NPE at the line
> 
>    ontModel.addLoadedImport(URI);
> 
> then that means ontModel is null. Jena is not getting called.
> 
> Dave
> 
> 
> 
                                          

Reply via email to