Hi,  I'm trying to expose a Java Axis2 webService to query an ontology.

The project works fine in a java local application.

Trying to expose in a webservice, on the first request, model try to load and 
i've got the error :

"[ERROR] com/hp/hpl/jena/rdf/model/ModelFactory
java.lang.reflect.InvocationTargetException
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)


This error occurs when trying to create the ontModel :
OntModel model_XXX = ModelFactory.createOntologyModel();

any help will be appreciated

Regards


Full logs :

18 mai 2014 14:19:51 org.apache.catalina.core.StandardContext reload
INFO: Le rechargement du contexte [/SWJena1] a démarré
18 mai 2014 14:19:51 org.apache.catalina.loader.WebappClassLoader 
checkThreadLocalMapForLeaks
GRAVE: The web application [/SWJena1] created a ThreadLocal with key of type 
[org.apache.axiom.util.UIDGenerator$1] (value 
[org.apache.axiom.util.UIDGenerator$1@16562d4b]) and a value of type [long[]] 
(value [[J@73b7a261]) but failed to remove it when the web application was 
stopped. Threads are going to be renewed over time to try and avoid a probable 
memory leak.
[INFO] Clustering has been disabled
[INFO] Deploying module: addressing-1.6.2 - 
file:/C:/Users/xxxxxx/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/SWJena1/WEB-INF/modules/addressing-1.6.2.mar
[INFO] Deploying module: metadataExchange-1.6.2 - 
file:/C:/Users/xxxxxx/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/SWJena1/WEB-INF/modules/mex-1.6.2.mar
[INFO] Deploying module: mtompolicy-1.6.2 - 
file:/C:/Users/xxxxxx/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/SWJena1/WEB-INF/modules/mtompolicy-1.6.2.mar
[INFO] Deploying module: ping-1.6.2 - 
file:/C:/Users/xxxxxx/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/SWJena1/WEB-INF/modules/ping-1.6.2.mar
[INFO] Deploying module: script-1.6.2 - 
file:/C:/Users/xxxxxx/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/SWJena1/WEB-INF/modules/scripting-1.6.2.mar
[INFO] Deploying module: soapmonitor-1.6.2 - 
file:/C:/Users/xxxxxx/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/SWJena1/WEB-INF/modules/soapmonitor-1.6.2.mar
[INFO] Deploying Web service: FrontalWeb - 
file:/C:/Users/xxxxxx/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/SWJena1/WEB-INF/services/FrontalWeb/
[INFO] Deploying Web service: version.aar - 
file:/C:/Users/xxxxxx/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/SWJena1/WEB-INF/services/version.aar
[WARN] No transportReceiver for 
org.apache.axis2.transport.http.AxisServletListener found. An instance for HTTP 
will be configured automatically. Please update your axis2.xml file!
18 mai 2014 14:19:53 org.apache.catalina.core.StandardContext reload
INFO: Le rechargement de ce contexte est terminé
==> PathinputFileBASE : 
/C:/Users/xxxxxx/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/SWJena1/WEB-INF/model_infere_out.owl
==> Before Loading DataModel...
[ERROR] com/hp/hpl/jena/ontology/OntModelSpec
java.lang.reflect.InvocationTargetException
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at 
org.apache.axis2.rpc.receivers.RPCUtil.invokeServiceClass(RPCUtil.java:212)
       at 
org.apache.axis2.rpc.receivers.RPCMessageReceiver.invokeBusinessLogic(RPCMessageReceiver.java:117)
       at 
org.apache.axis2.receivers.AbstractInOutMessageReceiver.invokeBusinessLogic(AbstractInOutMessageReceiver.java:40)
       at 
org.apache.axis2.receivers.AbstractMessageReceiver.receive(AbstractMessageReceiver.java:114)
       at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:181)
       at 
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:172)
       at 
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:146)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:646)
       at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
       at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
       at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
       at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
       at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
       at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
       at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
       at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
       at 
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
       at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
       at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
       at 
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
       at 
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
       at 
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:313)
       at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
       at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
       at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NoClassDefFoundError: com/hp/hpl/jena/ontology/OntModelSpec
       at Frontal.Singleton.<init>(Singleton.java:43)
       at Frontal.Singleton.getInstance(Singleton.java:64)
       at Frontal.FrontalWeb.getAllResultsFrom2(FrontalWeb.java:23)
       ... 29 more
Caused by: java.lang.ClassNotFoundException: 
com.hp.hpl.jena.ontology.OntModelSpec
       at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720)
       at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
       at java.lang.ClassLoader.loadClassInternal(Unknown Source)
       ... 32 more


_________________________________________________________________________________________________________________________

Ce message et ses pieces jointes peuvent contenir des informations 
confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce 
message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages 
electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou 
falsifie. Merci.

This message and its attachments may contain confidential or privileged 
information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete 
this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been 
modified, changed or falsified.
Thank you.

Reply via email to