I am currently working on some algorithms for indexing subclasses in ontologies expressed in OWL. I therefore traverse the ontology performing a list of queries. Unfortunately, most of the times, the indexing process is not completing due to the following error:
Could not get JDBC Connection; nested exception is virtuoso.jdbc3.VirtuosoException: Connection failed: Can't assign requested address org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is virtuoso.jdbc3.VirtuosoException: Connection failed: Can't assign requested address at com.commonsemantics.grails.services.utils.QueryService.getSparqlResultRowMaps(QueryService.groovy:23) at com.commonsemantics.grails.services.utils.QueryService$getSparqlResultRowMaps.call(Unknown Source) at com.commonsemantics.grails.service.indexes.SubclassesIndexingService.querySubclasses(SubclassesIndexingService.groovy:224) at com.commonsemantics.grails.service.indexes.SubclassesIndexingService$querySubclasses.callCurrent(Unknown Source) at com.commonsemantics.grails.service.indexes.SubclassesIndexingService.recursiveIndexing(SubclassesIndexingService.groovy:154) at com.commonsemantics.grails.service.indexes.SubclassesIndexingService.this$2$recursiveIndexing(SubclassesIndexingService.groovy) at com.commonsemantics.grails.service.indexes.SubclassesIndexingService$this$2$recursiveIndexing.callCurrent(Unknown Source) at com.commonsemantics.grails.service.indexes.SubclassesIndexingService.recursiveIndexing(SubclassesIndexingService.groovy:163) at com.commonsemantics.grails.service.indexes.SubclassesIndexingService.this$2$recursiveIndexing(SubclassesIndexingService.groovy) at com.commonsemantics.grails.service.indexes.SubclassesIndexingService$this$2$recursiveIndexing.callCurrent(Unknown Source) at com.commonsemantics.grails.service.indexes.SubclassesIndexingService.recursiveIndexing(SubclassesIndexingService.groovy:163) at com.commonsemantics.grails.service.indexes.SubclassesIndexingService.this$2$recursiveIndexing(SubclassesIndexingService.groovy) at com.commonsemantics.grails.service.indexes.SubclassesIndexingService$this$2$recursiveIndexing.callCurrent(Unknown Source) at com.commonsemantics.grails.service.indexes.SubclassesIndexingService.recursiveIndexing(SubclassesIndexingService.groovy:163) at com.commonsemantics.grails.service.indexes.SubclassesIndexingService.this$2$recursiveIndexing(SubclassesIndexingService.groovy) at com.commonsemantics.grails.service.indexes.SubclassesIndexingService$this$2$recursiveIndexing.callCurrent(Unknown Source) at com.commonsemantics.grails.service.indexes.SubclassesIndexingService.recursiveIndexing(SubclassesIndexingService.groovy:163) at com.commonsemantics.grails.service.indexes.SubclassesIndexingService.this$2$recursiveIndexing(SubclassesIndexingService.groovy) at com.commonsemantics.grails.service.indexes.SubclassesIndexingService$this$2$recursiveIndexing.callCurrent(Unknown Source) at com.commonsemantics.grails.service.indexes.SubclassesIndexingService.recursiveIndexing(SubclassesIndexingService.groovy:163) at com.commonsemantics.grails.service.indexes.SubclassesIndexingService.this$2$recursiveIndexing(SubclassesIndexingService.groovy) at com.commonsemantics.grails.service.indexes.SubclassesIndexingService$this$2$recursiveIndexing.callCurrent(Unknown Source) at com.commonsemantics.grails.service.indexes.SubclassesIndexingService.indexHierarchy(SubclassesIndexingService.groovy:136) at com.commonsemantics.grails.service.indexes.SubclassesIndexingService.this$2$indexHierarchy(SubclassesIndexingService.groovy) at com.commonsemantics.grails.service.indexes.SubclassesIndexingService$this$2$indexHierarchy.callCurrent(Unknown Source) at com.commonsemantics.grails.service.indexes.SubclassesIndexingService.indexVocabulary(SubclassesIndexingService.groovy:86) at com.commonsemantics.grails.service.indexes.SubclassesIndexingService$indexVocabulary.callCurrent(Unknown Source) at com.commonsemantics.grails.service.indexes.SubclassesIndexingService.indexVocabularies(SubclassesIndexingService.groovy:69) at com.commonsemantics.grails.service.indexes.SubclassesIndexingService$indexVocabularies.call(Unknown Source) at com.commonsemantics.grails.service.indexes.SubclassesIndexingServiceTests.testSomething(SubclassesIndexingServiceTests.groovy:35) at _GrailsTest_groovy$_run_closure4.doCall(_GrailsTest_groovy:203) at _GrailsTest_groovy$_run_closure4.call(_GrailsTest_groovy) at _GrailsTest_groovy$_run_closure2.doCall(_GrailsTest_groovy:147) at _GrailsTest_groovy$_run_closure1_closure19.doCall(_GrailsTest_groovy:113) at _GrailsTest_groovy$_run_closure1.doCall(_GrailsTest_groovy:96) at TestApp$_run_closure1.doCall(TestApp.groovy:66) at gant.Gant$_dispatch_closure4.doCall(Gant.groovy:324) at gant.Gant$_dispatch_closure6.doCall(Gant.groovy:334) at gant.Gant$_dispatch_closure6.doCall(Gant.groovy) at gant.Gant.withBuildListeners(Gant.groovy:344) at gant.Gant.this$2$withBuildListeners(Gant.groovy) at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source) at gant.Gant.dispatch(Gant.groovy:334) at gant.Gant.this$2$dispatch(Gant.groovy) at gant.Gant.invokeMethod(Gant.groovy) at gant.Gant.processTargets(Gant.groovy:495) at gant.Gant.processTargets(Gant.groovy:480) Caused by: virtuoso.jdbc3.VirtuosoException: Connection failed: Can't assign requested address at virtuoso.jdbc3.VirtuosoConnection.connect(Unknown Source) at virtuoso.jdbc3.VirtuosoConnection.connect(Unknown Source) at virtuoso.jdbc3.VirtuosoConnection.(Unknown Source) at virtuoso.jdbc3.Driver.connect(Unknown Source) at java.sql.DriverManager.getConnection(DriverManager.java:525) at java.sql.DriverManager.getConnection(DriverManager.java:140) I am working in a Grails (version 1.1.1) environment, Virtuoso (version 5.0.11), Drivers (jdbc3). I am performing really simple queries of the type: sparql $NAMESPACE_PREFIXES SELECT ?subject ?label FROM <$vocabularyUri> WHERE {?subject rdfs:subClassOf <$uri>. ?subject rdfs:label ?label} Again, with the same setup, sometimes (rarely) the process completes sometimes not. It blows up in different steps of the indexing (can be after 129, 876, 3000, 12000... queries). Increasing the amount of memory available delays the blow up, but I still have the problem. Any idea that could help me? Thank you Paolo -- Paolo Ciccarese