Hello List,

I have been working with Jena to boost query performance using ontology and 
have encountered problems with the above class when I submit a query within my 
web application. I first show tomcat exception error followed a root cause, 
this is followed by Tomcat console output showing LOG.info "creating new 
ontology", finally I attach the class which cannot be initialized.


exception

org.apache.jasper.JasperException: javax.servlet.ServletException: 
java.lang.NoClassDefFoundError: Could not initialize class 
com.hp.hpl.jena.ontology.OntModelSpec
        
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:491)
        
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:401)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


root cause

java.lang.NoClassDefFoundError: Could not initialize class 
com.hp.hpl.jena.ontology.OntModelSpec
        org.apache.nutch.ontology.jena.OntologyImpl.<init>(OntologyImpl.java:82)
-------------

2010-12-29 13:43:06,794 INFO  OntologyFactory - Using the first ontology extensi
on found: org.apache.nutch.ontology.jena.OntologyImpl
2010-12-29 13:43:06,811 INFO  Ontology - creating new ontology

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

public OntologyImpl() {

//only initialize all the static variables

//if first time called to this ontology constructor

if (ontology == null) {

if (LOG.isInfoEnabled()) { LOG.info( "creating new ontology"); }

parser = new OwlParser();

ontology = this;

}

if (ontologyModel == null)

ontologyModel = <<<<Line 82

ModelFactory.createOntologyModel(OntModelSpec.OWL_MEM, null);

//ModelFactory.createOntologyModel();

}

I have been able to replicate this problem a couple of times and I am unsure of 
why it is occuring as I have specified my ontology location to the application. 
I am using Jena 2.1, Tomcat 6.0.26 running on Windows Vista.

I am aware that this may not be directly associated with the implementation of 
Jena but any help or pointers would be appreciated.

Thank you, Lewis


Glasgow Caledonian University is a registered Scottish charity, number SC021474

Winner: Times Higher Education's Widening Participation Initiative of the Year 
2009 and Herald Society's Education Initiative of the Year 2009
http://www.gcu.ac.uk/newsevents/news/bycategory/theuniversity/1/name,6219,en.html

Reply via email to