Attachments are generally not accepted by Apache mailing lists.  You can use a 
hosting service like PasteBin or GitHub Gists to share code by providing links 
to your uploaded code.

 

I notice that the stack trace you show doesn’t have any references to any Jena 
code.  It looks like you are using some Java to PHP bridge in your code and 
that is failing which is likely a dependency/environmental problem.

 

As it stands this does not look like a Jena problem.  If you can provide more 
detail that implicates Jena then we can try to help but otherwise you may be 
better asking this question elsewhere

 

Rob

 

From: Minakshi Bhardwaj <[email protected]>
Reply-To: <[email protected]>
Date: Thursday, 23 August 2018 at 14:32
To: <[email protected]>
Subject: My Java program using Jena working fine in eclipse but throws an 
exception when I run jar file from tomcat

 

I have written a java program to get some queries from an ontology. Its working 
fine in eclipse where I developed it, however, when I run it using jar file 
stored in tomcat an exception is thrown which is give below

Warning: Unchecked exception detected: 
[[o:Response$UndeclaredThrowableErrorMarker]:"FATAL: Undeclared 
java.lang.RuntimeException detected. java.lang.Exception: Invoke failed: 
[[c:test]]->drawmap((o:String)[o:String]). Cause: 
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 VM: 
1.8.0_181@http://java.oracle.com/"; at: #-14 
java.util.ArrayList.rangeCheck(Unknown Source) #-13 
java.util.ArrayList.get(Unknown Source) #-12 
cononto.test.traverse(test.java:64) #-11 cononto.test.drawmap(test.java:976) 
#-10 sun.re[...]ppedResult(true) #3 
http://localhost:8080/JavaBridge/java/Java.inc(588): java_Client->getResult() 
#4 http://localhost:8080/JavaBridge/java/Java.inc(1795): 
java_Client->invokeMethod(1, 'drawmap', Array) #5 
http://localhost:8080/JavaBridge/java/Java.inc(1894): 
java_JavaProxy->__call('drawmap', Array) #6 
http://localhost:8080/JavaBridge/java/Java.inc(2042): 
java_AbstractJava->__call('drawmap', Array) #7 C:\xampp\htdocs\javab.php(6): 
Java->__call('drawmap', Array) #8 {main}] in 
http://localhost:8080/JavaBridge/java/Java.inc on line 230
[[o:Response$UndeclaredThrowableErrorMarker]:"FATAL: Undeclared 
java.lang.RuntimeException detected. java.lang.Exception: Invoke failed: 
[[c:test]]->drawmap((o:String)[o:String]). Cause: 
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 VM: 
1.8.0_181@http://java.oracle.com/"; at: #-14 
java.util.ArrayList.rangeCheck(Unknown Source) #-13 
java.util.ArrayList.get(Unknown Source) #-12 
cononto.test.traverse(test.java:64) #-11 cononto.test.drawmap(test.java:976) 
#-10 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) #-9 
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) #-8 
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) #-7 
java.lang.reflect.Method.invoke(Unknown Source) #-6 
php.java.bridge.JavaBridge.Invoke(JavaBridge.java:1068) #-5 
php.java.bridge.parser.Request.handleRequest(Request.java:426) #-4 
php.java.bridge.parser.Request.handleRequests(Request.java:509) #-3 
php.java.bridge.http.ContextRunner.run(ContextRunner.java:143) #-2 
php.java.bridge.util.ThreadPool$Delegate.run(ThreadPool.java:60) #-1 
php.java.bridge.util.AppThreadPool$Delegate.run(AppThreadPool.java:58) #0 
http://localhost:8080/JavaBridge/java/Java.inc(260): 
java_ThrowExceptionProxyFactory->getProxy(2, 'cononto.test', 'F', true) #1 
http://localhost:8080/JavaBridge/java/Java.inc(388): java_Arg->getResult(true) 
#2 http://localhost:8080/JavaBridge/java/Java.inc(394): 
java_Client->getWrappedResult(true) #3 
http://localhost:8080/JavaBridge/java/Java.inc(588): java_Client->getResult() 
#4 http://localhost:8080/JavaBridge/java/Java.inc(1795): 
java_Client->invokeMethod(1, 'drawmap', Array) #5 
http://localhost:8080/JavaBridge/java/Java.inc(1894): 
java_JavaProxy->__call('drawmap', Array) #6 
http://localhost:8080/JavaBridge/java/Java.inc(2042): 
java_AbstractJava->__call('drawmap', Array) #7 C:\xampp\htdocs\javab.php(6): 
Java->__call('drawmap', Array) #8 {main}] 
Fatal error: An unchecked exception occured during script execution. Please 
check the server log files for details. in 
http://localhost:8080/JavaBridge/java/Java.inc on line 807 

 

I am attaching my java code and a sample ontology.

 

Please help. 

Reply via email to