Hey,

With Fred's help, I have defined the following function to import RDF/XML :

create procedure
ZITGIST.DBA.CREATE_NAMED_GRAPH_FROM_REMOTE_RDF_FILE_XML(in url any, in graph
any)
{
  declare rdf_document any;

  rdf_document := http_get(url);

  DB.DBA.RDF_LOAD_RDFXML(rdf_document, graph, graph);
}


I'm calling the function from a JSP via a JDBC connection, using the SQL
taglib. The RDF/XML is imported correctly (I can check that with a SPARQL
query), but Tomcat returns the following error :

javax.servlet.ServletException: javax.servlet.jsp.JspException:
ZITGIST.DBA.CREATE_NAMED_GRAPH_FROM_REMOTE_RDF_FILE_XML('http://lazarus.stewart-explorations.net:8890/adt2map.vos/mdc2rdf.jsp',
'http://localhost:1352/dataspace'): 0
        
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:842)
        
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:779)
        org.apache.jsp.import_jsp._jspService(import_jsp.java:143)
        org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

*root cause*

java.lang.ArrayIndexOutOfBoundsException: 0
        openlink.util.Vector.setElementAt(Unknown Source)
        virtuoso.jdbc3.VirtuosoResultSet.process_result(Unknown Source)
        virtuoso.jdbc3.VirtuosoResultSet.getMoreResults(Unknown Source)
        virtuoso.jdbc3.VirtuosoPreparedStatement.sendQuery(Unknown Source)
        virtuoso.jdbc3.VirtuosoPreparedStatement.executeQuery(Unknown Source)
        
org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doEndTag(Unknown
Source)
        org.apache.jsp.import_jsp._jspService(import_jsp.java:111)
        org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
        
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:802)


(
http://lazarus.stewart-explorations.net:8890/adt2map.vos/import.jsp?data=http://lazarus.stewart-explorations.net:8890/adt2map.vos/mdc2rdf.jsp&graph=http://localhost:1352/dataspace
)

The import.jsp script is very basic. There's nothing much in there apart
from the SQL transaction itself.

Is there something that I'm not doing correctly?

Thanks!

Chris

Reply via email to