Discussion:
Fuseki with SDB - connection closed exception
Bangalore Akhilesh
2016-03-29 08:33:22 UTC
Permalink
Hi,

We have deployed fuseki with SDB against Oracle database. We have used
*jena-sdb-3.1.0-20160211.100203-49* with *apache-jena-fuseki-2.4.0-SNAPSHOT*
.

It worked fine for few days before we started to experience the SQL
connection closed problems. Can you please let me know why this is
happening? Am I missing anything in the configuration?

Below are my configuration and exception log.

*Configuration:*

@prefix : <# <http://example.com/#>> . @prefix fuseki: <
http://jena.apache.org/fuseki#> . @prefix rdf: <
http://www.w3.org/1999/02/22-rdf-syntax-ns#> . @prefix rdfs: <
http://www.w3.org/2000/01/rdf-schema#> . @prefix sdb: <
http://jena.hpl.hp.com/2007/sdb#> . @prefix ja: <
http://jena.hpl.hp.com/2005/11/Assembler#> . :service_sdb_all a fuseki:
Service ; rdfs:label "SDB - Oracle" ; fuseki:name "oracle" ; fuseki:
serviceQuery "query", "sparql" ; fuseki:serviceUpdate "update" ; fuseki:
serviceUpload "upload" ; fuseki:serviceReadWriteGraphStore "data" ; fuseki:
serviceReadGraphStore "get" ; fuseki:dataset :sdb_dataset_readwrite ; . :
sdb_dataset_readwrite a sdb:DatasetStore ; sdb:store :rdbms_datastore . :
rdbms_datastore a sdb:Store ; sdb:layout "layout2" ; sdb:connection :
fuseki_data_conn ; . :fuseki_data_conn a sdb:SDBConnection ; sdb:sdbType "
oracle" ; sdb:driver "oracle.jdbc.driver.OracleDriver" ; sdb:jdbcURL "
jdbc:oracle:thin:@localhost:1521/xe" ; sdb:sdbUser "myuser" ; sdb:
sdbPassword "password" ; .

*Exception log:*

[2016-03-28 20:45:46] Fuseki INFO [305964] 500 SQLException in
executing SQL statement (1 ms)
[2016-03-28 20:45:46] Fuseki INFO [305965] GET
http://localhost:8080/fuseki/oracle/query?query=SELECT%20%3Fs%20%3Fp%20%3Fo%0D%0AWHERE%0D%0A%7B%0D%0A%20%20GRAPH%20%3Curn%3Amydepts%3Aplatforms%3Acustomers%3ATestCompany1%3E%20%7B%20%3Fs%20%3Fp%20%3Fo%20.%20%7D%0D%0A%7D%0D%0A
[2016-03-28 20:45:46] Fuseki INFO [305965] GET /oracle :: 'query' ::
<none> ?
query=SELECT%20%3Fs%20%3Fp%20%3Fo%0D%0AWHERE%0D%0A%7B%0D%0A%20%20GRAPH%20%3Curn%3Amydepts%3Aplatforms%3Acustomers%3ATestCompany1%3E%20%7B%20%3Fs%20%3Fp%20%3Fo%20.%20%7D%0D%0A%7D%0D%0A
[2016-03-28 20:45:46] Fuseki INFO [305965] Query = SELECT ?s ?p ?o
WHERE { GRAPH <urn:mydepts:platforms:customers:TestCompany1> { ?s ?p
?o . } }
*[2016-03-28 20:45:46] SDBConnection WARN execQuery: SQLException*
*Closed Connection*
SELECT -- V_1=?s V_2=?p V_3=?o
-- V_4=?s V_5=?p V_6=?o
CASE WHEN LENGTH(R_1.lex) <= 2000 THEN NULL ELSE R_1.lex END V_1_lex,
CASE WHEN LENGTH(R_1.lex) <= 2000 THEN TO_NCHAR(R_1.lex) ELSE NULL END
V_1_lexNChar,
R_1.datatype V_1_datatype, R_1.lang V_1_lang, R_1.type V_1_type,
CASE WHEN LENGTH(R_2.lex) <= 2000 THEN NULL ELSE R_2.lex END V_2_lex,
CASE WHEN LENGTH(R_2.lex) <= 2000 THEN TO_NCHAR(R_2.lex) ELSE NULL END
V_2_lexNChar,
R_2.datatype V_2_datatype, R_2.lang V_2_lang, R_2.type V_2_type,
CASE WHEN LENGTH(R_3.lex) <= 2000 THEN NULL ELSE R_3.lex END V_3_lex,
CASE WHEN LENGTH(R_3.lex) <= 2000 THEN TO_NCHAR(R_3.lex) ELSE NULL END
V_3_lexNChar,
R_3.datatype V_3_datatype, R_3.lang V_3_lang, R_3.type V_3_type,
CASE WHEN LENGTH(R_1.lex) <= 2000 THEN NULL ELSE R_1.lex END V_4_lex,
CASE WHEN LENGTH(R_1.lex) <= 2000 THEN TO_NCHAR(R_1.lex) ELSE NULL END
V_4_lexNChar,
R_1.datatype V_4_datatype, R_1.lang V_4_lang, R_1.type V_4_type,
CASE WHEN LENGTH(R_2.lex) <= 2000 THEN NULL ELSE R_2.lex END V_5_lex,
CASE WHEN LENGTH(R_2.lex) <= 2000 THEN TO_NCHAR(R_2.lex) ELSE NULL END
V_5_lexNChar,
R_2.datatype V_5_datatype, R_2.lang V_5_lang, R_2.type V_5_type,
CASE WHEN LENGTH(R_3.lex) <= 2000 THEN NULL ELSE R_3.lex END V_6_lex,
CASE WHEN LENGTH(R_3.lex) <= 2000 THEN TO_NCHAR(R_3.lex) ELSE NULL END
V_6_lexNChar,
R_3.datatype V_6_datatype, R_3.lang V_6_lang, R_3.type V_6_type
FROM
( SELECT *
FROM Quads Q_1 --
<urn:mydepts:platforms:customers:TestCompany1> ?s ?p ?o
WHERE ( Q_1.g = -106387259433705127 -- Const:
<urn:mydepts:platforms:customers:TestCompany1>
)
) Q_1
LEFT OUTER JOIN
Nodes R_1 -- Var: ?s
ON ( Q_1.s = R_1.hash )
LEFT OUTER JOIN
Nodes R_2 -- Var: ?p
ON ( Q_1.p = R_2.hash )
LEFT OUTER JOIN
Nodes R_3 -- Var: ?o
ON ( Q_1.o = R_3.hash )


[2016-03-28 20:45:46] Fuseki WARN [305965] RC = 500 : SQLException in
executing SQL statement
org.apache.jena.sdb.sql.SDBExceptionSQL: SQLException in executing SQL
statement
at org.apache.jena.sdb.compiler.SDB_QC.exec(SDB_QC.java:82)
at org.apache.jena.sdb.compiler.OpSQL.exec(OpSQL.java:64)
at org.apache.jena.sdb.engine.QueryEngineSDB.eval(QueryEngineSDB.java:148)
at
org.apache.jena.sparql.engine.QueryEngineBase.evaluate(QueryEngineBase.java:136)
at
org.apache.jena.sparql.engine.QueryEngineBase.createPlan(QueryEngineBase.java:106)
at
org.apache.jena.sparql.engine.QueryEngineBase.getPlan(QueryEngineBase.java:87)
at
org.apache.jena.sdb.engine.QueryEngineSDB$QueryEngineFactorySDB.create(QueryEngineSDB.java:175)
at
org.apache.jena.sparql.engine.QueryExecutionBase.getPlan(QueryExecutionBase.java:524)
at
org.apache.jena.sparql.engine.QueryExecutionBase.startQueryIterator(QueryExecutionBase.java:472)
at
org.apache.jena.sparql.engine.QueryExecutionBase.execResultSet(QueryExecutionBase.java:511)
at
org.apache.jena.sparql.engine.QueryExecutionBase.execSelect(QueryExecutionBase.java:172)
at
org.apache.jena.fuseki.servlets.SPARQL_Query.executeQuery(SPARQL_Query.java:314)
at
org.apache.jena.fuseki.servlets.SPARQL_Query.execute(SPARQL_Query.java:270)
at
org.apache.jena.fuseki.servlets.SPARQL_Query.executeWithParameter(SPARQL_Query.java:228)
at
org.apache.jena.fuseki.servlets.SPARQL_Query.perform(SPARQL_Query.java:203)
at
org.apache.jena.fuseki.servlets.ActionSPARQL.executeLifecycle(ActionSPARQL.java:134)
at
org.apache.jena.fuseki.servlets.SPARQL_UberServlet.executeRequest(SPARQL_UberServlet.java:340)
at
org.apache.jena.fuseki.servlets.SPARQL_UberServlet.serviceDispatch(SPARQL_UberServlet.java:301)
at
org.apache.jena.fuseki.servlets.SPARQL_UberServlet.executeAction(SPARQL_UberServlet.java:257)
at
org.apache.jena.fuseki.servlets.ActionSPARQL.execCommonWorker(ActionSPARQL.java:85)
at org.apache.jena.fuseki.servlets.ActionBase.doCommon(ActionBase.java:81)
at
org.apache.jena.fuseki.servlets.FusekiFilter.doFilter(FusekiFilter.java:72)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at
org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
at
org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
at
org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
at
org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
at
org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
at
org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
at
org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
at
org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
at
org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
at
org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
at
org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
at
org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at
org.apache.jena.fuseki.servlets.CrossOriginFilter.handle(CrossOriginFilter.java:285)
at
org.apache.jena.fuseki.servlets.CrossOriginFilter.doFilter(CrossOriginFilter.java:248)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
at
org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522)
at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Unknown Source)
Caused by: java.sql.SQLRecoverableException: Closed Connection
at
oracle.jdbc.driver.PhysicalConnection.createStatement(PhysicalConnection.java:3194)
at org.apache.jena.sdb.sql.SDBConnection.execQuery(SDBConnection.java:117)
at org.apache.jena.sdb.compiler.SDB_QC.exec(SDB_QC.java:70)
... 57 more

Thanks,
Akhilesh
Andy Seaborne
2016-03-29 09:35:42 UTC
Permalink
Post by Bangalore Akhilesh
Hi,
We have deployed fuseki with SDB against Oracle database. We have used
*jena-sdb-3.1.0-20160211.100203-49* with *apache-jena-fuseki-2.4.0-SNAPSHOT*
.
It worked fine for few days before we started to experience the SQL
connection closed problems. Can you please let me know why this is
happening? Am I missing anything in the configuration?
Below are my configuration and exception log.
*Configuration:*
@prefix : <# <http://example.com/#>> . @prefix fuseki: <
fuseki_data_conn ; . :fuseki_data_conn a sdb:SDBConnection ; sdb:sdbType "
oracle" ; sdb:driver "oracle.jdbc.driver.OracleDriver" ; sdb:jdbcURL "
sdbPassword "password" ; .
*Exception log:*
[2016-03-28 20:45:46] Fuseki INFO [305964] 500 SQLException in
executing SQL statement (1 ms)
[2016-03-28 20:45:46] Fuseki INFO [305965] GET
http://localhost:8080/fuseki/oracle/query?query=SELECT%20%3Fs%20%3Fp%20%3Fo%0D%0AWHERE%0D%0A%7B%0D%0A%20%20GRAPH%20%3Curn%3Amydepts%3Aplatforms%3Acustomers%3ATestCompany1%3E%20%7B%20%3Fs%20%3Fp%20%3Fo%20.%20%7D%0D%0A%7D%0D%0A
<none> ?
query=SELECT%20%3Fs%20%3Fp%20%3Fo%0D%0AWHERE%0D%0A%7B%0D%0A%20%20GRAPH%20%3Curn%3Amydepts%3Aplatforms%3Acustomers%3ATestCompany1%3E%20%7B%20%3Fs%20%3Fp%20%3Fo%20.%20%7D%0D%0A%7D%0D%0A
[2016-03-28 20:45:46] Fuseki INFO [305965] Query = SELECT ?s ?p ?o
WHERE { GRAPH <urn:mydepts:platforms:customers:TestCompany1> { ?s ?p
?o . } }
*[2016-03-28 20:45:46] SDBConnection WARN execQuery: SQLException*
*Closed Connection*
It is not clear to me what's going on.

Did the database server restart?

Was the Fuseki server idle for a significant period of time prior to the
500's starting?

Andy
Bangalore Akhilesh
2016-03-29 10:52:47 UTC
Permalink
Hi Andy,

Sorry for the formatting issues. I have attached the configuration and
exception log files for your reference.

The database server did not restart and it is highly unlikely for the
Fuseki server to be idle as we execute a suite of tests regularly on hourly
basis.

Something which I missed in my previous e-mail is that we have deployed
Fuseki on Tomcat 8.

Is there a way to enable connection pooling or modify the configuration to
use a PoolDataSource etc?

Thanks,
Akhilesh
Post by Andy Seaborne
Post by Bangalore Akhilesh
Hi,
We have deployed fuseki with SDB against Oracle database. We have used
*jena-sdb-3.1.0-20160211.100203-49* with
*apache-jena-fuseki-2.4.0-SNAPSHOT*
.
It worked fine for few days before we started to experience the SQL
connection closed problems. Can you please let me know why this is
happening? Am I missing anything in the configuration?
Below are my configuration and exception log.
*Configuration:*
@prefix : <# <http://example.com/#>> . @prefix fuseki: <
fuseki_data_conn ; . :fuseki_data_conn a sdb:SDBConnection ; sdb:sdbType "
oracle" ; sdb:driver "oracle.jdbc.driver.OracleDriver" ; sdb:jdbcURL "
sdbPassword "password" ; .
*Exception log:*
[2016-03-28 20:45:46] Fuseki INFO [305964] 500 SQLException in
executing SQL statement (1 ms)
[2016-03-28 20:45:46] Fuseki INFO [305965] GET
http://localhost:8080/fuseki/oracle/query?query=SELECT%20%3Fs%20%3Fp%20%3Fo%0D%0AWHERE%0D%0A%7B%0D%0A%20%20GRAPH%20%3Curn%3Amydepts%3Aplatforms%3Acustomers%3ATestCompany1%3E%20%7B%20%3Fs%20%3Fp%20%3Fo%20.%20%7D%0D%0A%7D%0D%0A
<none> ?
query=SELECT%20%3Fs%20%3Fp%20%3Fo%0D%0AWHERE%0D%0A%7B%0D%0A%20%20GRAPH%20%3Curn%3Amydepts%3Aplatforms%3Acustomers%3ATestCompany1%3E%20%7B%20%3Fs%20%3Fp%20%3Fo%20.%20%7D%0D%0A%7D%0D%0A
[2016-03-28 20:45:46] Fuseki INFO [305965] Query = SELECT ?s ?p ?o
WHERE { GRAPH <urn:mydepts:platforms:customers:TestCompany1> { ?s ?p
?o . } }
*[2016-03-28 20:45:46] SDBConnection WARN execQuery: SQLException*
*Closed Connection*
It is not clear to me what's going on.
Did the database server restart?
Was the Fuseki server idle for a significant period of time prior to the
500's starting?
Andy
John A. Fereira
2016-03-29 10:59:31 UTC
Permalink
I work on a project which (still) Jena SDB and have bundled up versions of Fuseki with SDB and a ReconnectingSDB library that someone posted here a long time ago that handles database connections timing out. We’ve been using different versions of this configuration for several years. I recently put together a Fuseki 2.0.0 version which has instruction on how to install it for both a standalone instance under Jetty or running under Tomcat. If you can download from Dropbox you can get it here.

https://www.dropbox.com/s/vaqj4rjxlf6rjvi/vivo-fuseki-2.0.0.tar.gz?dl=0

From: Bangalore Akhilesh [mailto:***@gmail.com]
Sent: Tuesday, March 29, 2016 6:53 AM
To: ***@jena.apache.org
Subject: Re: Fuseki with SDB - connection closed exception

Hi Andy,

Sorry for the formatting issues. I have attached the configuration and exception log files for your reference.

The database server did not restart and it is highly unlikely for the Fuseki server to be idle as we execute a suite of tests regularly on hourly basis.

Something which I missed in my previous e-mail is that we have deployed Fuseki on Tomcat 8.

Is there a way to enable connection pooling or modify the configuration to use a PoolDataSource etc?

Thanks,
Akhilesh

On Tue, Mar 29, 2016 at 3:05 PM, Andy Seaborne <***@apache.org<mailto:***@apache.org>> wrote:
On 29/03/16 09:33, Bangalore Akhilesh wrote:
Hi,

We have deployed fuseki with SDB against Oracle database. We have used
*jena-sdb-3.1.0-20160211.100203-49* with *apache-jena-fuseki-2.4.0-SNAPSHOT*
.

It worked fine for few days before we started to experience the SQL
connection closed problems. Can you please let me know why this is
happening? Am I missing anything in the configuration?

Below are my configuration and exception log.

*Configuration:*

This part has formatting problems:

@prefix : <# <http://example.com/#<http://example.com/>>> . @prefix fuseki: <
http://jena.apache.org/fuseki#<http://jena.apache.org/fuseki>> . @prefix rdf: <
http://www.w3.org/1999/02/22-rdf-syntax-ns#<http://www.w3.org/1999/02/22-rdf-syntax-ns>> . @prefix rdfs: <
http://www.w3.org/2000/01/rdf-schema#<http://www.w3.org/2000/01/rdf-schema>> . @prefix sdb: <
http://jena.hpl.hp.com/2007/sdb#<http://jena.hpl.hp.com/2007/sdb>> . @prefix ja: <
http://jena.hpl.hp.com/2005/11/Assembler#<http://jena.hpl.hp.com/2005/11/Assembler>> . :service_sdb_all a fuseki:
Service ; rdfs:label "SDB - Oracle" ; fuseki:name "oracle" ; fuseki:
serviceQuery "query", "sparql" ; fuseki:serviceUpdate "update" ; fuseki:
serviceUpload "upload" ; fuseki:serviceReadWriteGraphStore "data" ; fuseki:
serviceReadGraphStore "get" ; fuseki:dataset :sdb_dataset_readwrite ; . :
sdb_dataset_readwrite a sdb:DatasetStore ; sdb:store :rdbms_datastore . :
rdbms_datastore a sdb:Store ; sdb:layout "layout2" ; sdb:connection :
fuseki_data_conn ; . :fuseki_data_conn a sdb:SDBConnection ; sdb:sdbType "
oracle" ; sdb:driver "oracle.jdbc.driver.OracleDriver" ; sdb:jdbcURL "
jdbc:oracle:thin:@localhost:1521/xe" ; sdb:sdbUser "myuser" ; sdb:
sdbPassword "password" ; .

*Exception log:*

[2016-03-28 20:45:46] Fuseki INFO [305964] 500 SQLException in
executing SQL statement (1 ms)
[2016-03-28 20:45:46] Fuseki INFO [305965] GET
http://localhost:8080/fuseki/oracle/query?query=SELECT%20%3Fs%20%3Fp%20%3Fo%0D%0AWHERE%0D%0A%7B%0D%0A%20%20GRAPH%20%3Curn%3Amydepts%3Aplatforms%3Acustomers%3ATestCompany1%3E%20%7B%20%3Fs%20%3Fp%20%3Fo%20.%20%7D%0D%0A%7D%0D%0A
[2016-03-28 20:45:46] Fuseki INFO [305965] GET /oracle :: 'query' ::
<none> ?
query=SELECT%20%3Fs%20%3Fp%20%3Fo%0D%0AWHERE%0D%0A%7B%0D%0A%20%20GRAPH%20%3Curn%3Amydepts%3Aplatforms%3Acustomers%3ATestCompany1%3E%20%7B%20%3Fs%20%3Fp%20%3Fo%20.%20%7D%0D%0A%7D%0D%0A
[2016-03-28 20:45:46] Fuseki INFO [305965] Query = SELECT ?s ?p ?o
WHERE { GRAPH <urn:mydepts:platforms:customers:TestCompany1> { ?s ?p
?o . } }
*[2016-03-28 20:45:46] SDBConnection WARN execQuery: SQLException*
*Closed Connection*

It is not clear to me what's going on.

Did the database server restart?

Was the Fuseki server idle for a significant period of time prior to the 500's starting?

Andy
Andy Seaborne
2016-03-29 11:34:36 UTC
Permalink
I work on a project which (still) Jena SDB and have bundled up versions of Fuseki with SDB and a ReconnectingSDB library that someone posted here a long time ago that handles database connections timing out. We’ve been using different versions of this configuration for several years. I recently put together a Fuseki 2.0.0 version which has instruction on how to install it for both a standalone instance under Jetty or running under Tomcat. If you can download from Dropbox you can get it here.
Maybe this one:

https://github.com/shellac/ReconnectingSDB

Andy
John A. Fereira
2016-03-29 11:38:12 UTC
Permalink
Yes, that's it. I had to make some slight modifications to it to make it work with fuseki2. I probably should fork that repo and commit those changes to a new branch.

-----Original Message-----
From: Andy Seaborne [mailto:***@apache.org]
Sent: Tuesday, March 29, 2016 7:35 AM
To: ***@jena.apache.org
Subject: Re: Fuseki with SDB - connection closed exception
I work on a project which (still) Jena SDB and have bundled up versions of Fuseki with SDB and a ReconnectingSDB library that someone posted here a long time ago that handles database connections timing out. We’ve been using different versions of this configuration for several years. I recently put together a Fuseki 2.0.0 version which has instruction on how to install it for both a standalone instance under Jetty or running under Tomcat. If you can download from Dropbox you can get it here.
Maybe this one:

https://github.com/

John A. Fereira
2016-03-29 11:34:53 UTC
Permalink
I just realized that if you want to try working with the package I posted earlier that you’ll have to modify the configuration to use the Oracle driver and if you’re using Tomcat you’ll have to extract the war file into a directory, drop the oracle jdbc library in the WEB-INF/lib directory then rebuild another war files using the jar command.

From: Bangalore Akhilesh [mailto:***@gmail.com]
Sent: Tuesday, March 29, 2016 6:53 AM
To: ***@jena.apache.org
Subject: Re: Fuseki with SDB - connection closed exception

Hi Andy,

Sorry for the formatting issues. I have attached the configuration and exception log files for your reference.

The database server did not restart and it is highly unlikely for the Fuseki server to be idle as we execute a suite of tests regularly on hourly basis.

Something which I missed in my previous e-mail is that we have deployed Fuseki on Tomcat 8.

Is there a way to enable connection pooling or modify the configuration to use a PoolDataSource etc?

Thanks,
Akhilesh

On Tue, Mar 29, 2016 at 3:05 PM, Andy Seaborne <***@apache.org<mailto:***@apache.org>> wrote:
On 29/03/16 09:33, Bangalore Akhilesh wrote:
Hi,

We have deployed fuseki with SDB against Oracle database. We have used
*jena-sdb-3.1.0-20160211.100203-49* with *apache-jena-fuseki-2.4.0-SNAPSHOT*
.

It worked fine for few days before we started to experience the SQL
connection closed problems. Can you please let me know why this is
happening? Am I missing anything in the configuration?

Below are my configuration and exception log.

*Configuration:*

This part has formatting problems:

@prefix : <# <http://example.com/#<http://example.com/>>> . @prefix fuseki: <
http://jena.apache.org/fuseki#<http://jena.apache.org/fuseki>> . @prefix rdf: <
http://www.w3.org/1999/02/22-rdf-syntax-ns#<http://www.w3.org/1999/02/22-rdf-syntax-ns>> . @prefix rdfs: <
http://www.w3.org/2000/01/rdf-schema#<http://www.w3.org/2000/01/rdf-schema>> . @prefix sdb: <
http://jena.hpl.hp.com/2007/sdb#<http://jena.hpl.hp.com/2007/sdb>> . @prefix ja: <
http://jena.hpl.hp.com/2005/11/Assembler#<http://jena.hpl.hp.com/2005/11/Assembler>> . :service_sdb_all a fuseki:
Service ; rdfs:label "SDB - Oracle" ; fuseki:name "oracle" ; fuseki:
serviceQuery "query", "sparql" ; fuseki:serviceUpdate "update" ; fuseki:
serviceUpload "upload" ; fuseki:serviceReadWriteGraphStore "data" ; fuseki:
serviceReadGraphStore "get" ; fuseki:dataset :sdb_dataset_readwrite ; . :
sdb_dataset_readwrite a sdb:DatasetStore ; sdb:store :rdbms_datastore . :
rdbms_datastore a sdb:Store ; sdb:layout "layout2" ; sdb:connection :
fuseki_data_conn ; . :fuseki_data_conn a sdb:SDBConnection ; sdb:sdbType "
oracle" ; sdb:driver "oracle.jdbc.driver.OracleDriver" ; sdb:jdbcURL "
jdbc:oracle:thin:@localhost:1521/xe" ; sdb:sdbUser "myuser" ; sdb:
sdbPassword "password" ; .

*Exception log:*

[2016-03-28 20:45:46] Fuseki INFO [305964] 500 SQLException in
executing SQL statement (1 ms)
[2016-03-28 20:45:46] Fuseki INFO [305965] GET
http://localhost:8080/fuseki/oracle/query?query=SELECT%20%3Fs%20%3Fp%20%3Fo%0D%0AWHERE%0D%0A%7B%0D%0A%20%20GRAPH%20%3Curn%3Amydepts%3Aplatforms%3Acustomers%3ATestCompany1%3E%20%7B%20%3Fs%20%3Fp%20%3Fo%20.%20%7D%0D%0A%7D%0D%0A
[2016-03-28 20:45:46] Fuseki INFO [305965] GET /oracle :: 'query' ::
<none> ?
query=SELECT%20%3Fs%20%3Fp%20%3Fo%0D%0AWHERE%0D%0A%7B%0D%0A%20%20GRAPH%20%3Curn%3Amydepts%3Aplatforms%3Acustomers%3ATestCompany1%3E%20%7B%20%3Fs%20%3Fp%20%3Fo%20.%20%7D%0D%0A%7D%0D%0A
[2016-03-28 20:45:46] Fuseki INFO [305965] Query = SELECT ?s ?p ?o
WHERE { GRAPH <urn:mydepts:platforms:customers:TestCompany1> { ?s ?p
?o . } }
*[2016-03-28 20:45:46] SDBConnection WARN execQuery: SQLException*
*Closed Connection*

It is not clear to me what's going on.

Did the database server restart?

Was the Fuseki server idle for a significant period of time prior to the 500's starting?

Andy
Loading...