TopSpin Exception w/ Trace

471 views
Skip to first unread message

Tim Smith

unread,
Aug 15, 2014, 6:56:50 PM8/15/14
to topbrai...@googlegroups.com
Hi,

I'm running an SM script that calls TopSPIN and the TopSPIN module is generating the exception below.  This script was working fine on TBC 4.3 but is having issues on 4.5.  I fixed the XML variable issues for the XML related modules.  I'm not sure what is causing the exception.  I'm not using SDB at all but a reference to org.topbraid.sdb.graph.SDBGraphStore.getGraphSDBExtended(SDBGraphStore.java:106) appears in the stack trace.

So I'm confused and don't know where to look.

I did ensure that I've removed all references to sp:Insert instances which is something that has happened before and I first created this script a long time ago.  Are there other things that may confuse the current version of the TopSPIN engine?

Thanks for your help!

Tim


java.lang.reflect.InvocationTargetException
    at org.topbraidcomposer.sparqlmotion.actions.AbstractExecuteSPARQLMotionAction$1.run(AbstractExecuteSPARQLMotionAction.java:153)
    at org.topbraidcomposer.core.util.ThreadUtil$1$1.run(ThreadUtil.java:64)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
    at org.topbraid.sdb.graph.SDBGraphStore.getGraphSDBExtended(SDBGraphStore.java:106)
    at org.topbraid.sdb.graph.SDBGraphStore.createSubGraph(SDBGraphStore.java:70)
    at org.topbraid.core.TBPersonality.getSpecialSubGraph(TBPersonality.java:292)
    at org.topbraid.core.TBPersonality.getSpecialModel(TBPersonality.java:269)
    at org.topbraidcomposer.editors.utils.AbstractTBCPersonality.getSpecialModel(AbstractTBCPersonality.java:116)
    at org.topbraid.sparql.TopBraidDataset.getSpecialModel(TopBraidDataset.java:509)
    at org.topbraid.sparql.TopBraidDataset.containsNamedModel(TopBraidDataset.java:273)
    at org.topbraid.core.TBPersonality.getSpecialSubGraph(TBPersonality.java:285)
    at org.topbraid.core.TBPersonality.getSpecialModel(TBPersonality.java:269)
    at org.topbraidcomposer.editors.utils.AbstractTBCPersonality.getSpecialModel(AbstractTBCPersonality.java:116)
    at org.topbraid.sparql.TopBraidDataset.getSpecialModel(TopBraidDataset.java:509)
    at org.topbraid.sparql.TopBraidDataset.containsNamedModel(TopBraidDataset.java:273)
    at org.topbraid.core.TBPersonality.getSpecialSubGraph(TBPersonality.java:285)
    at org.topbraid.core.TBPersonality.getSpecialModel(TBPersonality.java:269)
    at org.topbraidcomposer.editors.utils.AbstractTBCPersonality.getSpecialModel(AbstractTBCPersonality.java:116)
    at org.topbraid.sparql.TopBraidDataset.getSpecialModel(TopBraidDataset.java:509)
    at org.topbraid.sparql.TopBraidDataset$1.map1(TopBraidDataset.java:338)
    at org.topbraid.sparql.TopBraidDataset$1.map1(TopBraidDataset.java:1)
    at org.topbraid.sparql.TopBraidDataset.resolveURIasModel(TopBraidDataset.java:430)
    at org.topbraid.sparql.TopBraidDataset.getNamedModel(TopBraidDataset.java:319)
    at org.topbraid.spin.util.UpdateUtil.addUpdatedGraphs(UpdateUtil.java:73)
    at org.topbraid.spin.util.UpdateUtil.addUpdatedGraphs(UpdateUtil.java:54)
    at org.topbraid.spin.util.UpdateUtil.getUpdatedGraphs(UpdateUtil.java:34)
    at org.topbraid.spin.inference.SPINInferences.runCommandOnClass(SPINInferences.java:346)
    at org.topbraid.spin.inference.SPINInferences.run(SPINInferences.java:241)
    at org.topbraid.spin.sparqlmotion.modules.impl.ApplyTopSPINModule.addNewTriples(ApplyTopSPINModule.java:121)
    at org.topbraid.spin.sparqlmotion.modules.impl.ApplyTopSPINModule.addNewTriples(ApplyTopSPINModule.java:151)
    at org.topbraid.spin.sparqlmotion.modules.impl.ApplyTopSPINModule.createGraph(ApplyTopSPINModule.java:76)
    at org.topbraid.spin.sparqlmotion.modules.AbstractSMModule.getRDFOutput(AbstractSMModule.java:893)
    at org.topbraid.spin.sparqlmotion.engine.impl.ExecutionEngineImpl.executeModule(ExecutionEngineImpl.java:176)
    at org.topbraid.spin.sparqlmotion.engine.impl.ExecutionEngineImpl.execute(ExecutionEngineImpl.java:118)
    at org.topbraidcomposer.sparqlmotion.views.console.SPARQLMotionConsole.execute(SPARQLMotionConsole.java:79)
    at org.topbraidcomposer.sparqlmotion.actions.AbstractExecuteSPARQLMotionAction$1.run(AbstractExecuteSPARQLMotionAction.java:142)
    ... 2 more

Scott Henninger

unread,
Aug 17, 2014, 3:42:19 PM8/17/14
to topbrai...@googlegroups.com
Tim; What is the rule set that TopSPIN is executing on?  Perhaps a process of elimination can tell which rule or dataset could be causing the problem.

Also in 4.5 there is a verbose logging option in Server Administration > Server Configuration Params.  Set this to true to see if you get some more detailed logs (then set back to false, as verbose logging will impact performance).

-- Scott
--
-- You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include Enterprise Vocabulary Network (EVN), TopBraid Composer, TopBraid Live, TopBraid Insight, SPARQLMotion, SPARQL Web Pages and SPIN.
To post to this group, send email to
topbrai...@googlegroups.com
To unsubscribe from this group, send email to
topbraid-user...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en
---
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Holger Knublauch

unread,
Aug 17, 2014, 6:37:53 PM8/17/14
to topbrai...@googlegroups.com
Hi Tim,

the error message is related to the (relatively new) dynamic named graph mechanism of SDB. The relevant snippet in the TBC help is:

Dynamic Named Graphs

TopBraid's SDB and TDB support includes dynamic named graphs. To use this feature, you need to create a connection for a default graph such as http://example.org/mysdb and the system will automatically map any graph that has the same beginning plus / plus a local graph name to named graphs stored in the same SDB or TDB. For example you can write a SPARQL query such as

    INSERT {
        GRAPH <http://example.org/mysdb/mygraph> {
            my:Instance my:property my:value .
        }
    }
    WHERE {
    }
	

to add triples to the named graph "mygraph" in the same database instance. There is no need to declare .sdb or .tdb connector files for any of those, and you can use as many graphs as you like. Note that you cannot directly open such named graphs unless they do have a connector, but the main use case is via SPARQL, for example from SPARQLMotion scripts or SPARQL Web Pages.

---

My first question is whether you are aware of this feature, and whether you have intentionally used it, or whether we are observing an unwanted side effect. For example you may have used a naming convention of your SDB graphs similar to the pattern above, and now the system resolves to a dynamic named graph.

I do not understand yet why our code could create an Exception like in your case, but if you could clarify the named graph architecture then we may better understand what's going on.

Thanks,
Holger

Tim Smith

unread,
Aug 17, 2014, 9:44:54 PM8/17/14
to topbrai...@googlegroups.com
Hi Holger,

That's an interesting feature.  I was not aware of it.

I don't use SDB for anything so there are no connector files in my workspace.  There are 4 rules that get executed (all of this is inside an SM script).  Three of them are straight constructs with no reference to a GRAPH keyword.

The fourth is a delete/insert.

DELETE {
    ?this help:isLiteral ?old .
}
INSERT {
    GRAPH <http://data.pg.com/synonyms/compass/instances> {
        ?this help:isLiteral ?new .
    } .
}
WHERE {
    ?this help:predicate ?pred .
    ?pred a ?ptype .
    BIND (spl:subClassOf(?ptype, owl:ObjectProperty) AS ?new) .
}

Now here's where it gets interesting.  I dumped the contents of the graph just before the TopSPIN module in the SM script.  I open this file in TBC and configure inferences to run only TopSPIN.

Running inferences results in 3 errors (details below):


Error
Sun Aug 17 21:36:09 EDT 2014
Failed to load named graph http://data.pg.com

Error
Sun Aug 17 21:36:09 EDT 2014
Could not execute inferences

Error
Sun Aug 17 21:36:09 EDT 2014
Could not execute inferences

The first error is most interesting because I've gotten that one several times while using the SPARQL view during the last week of using TBC 4.5.  I didn't understand it so I found another way to run my query without incurring the error.  I've had it occur during SELECT and INSERT queries.

Does this help narrow the conversation? 

Thanks for your help,

Tim

 
Error Details:

eclipse.buildId=unknown
java.version=1.7.0_51
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Command-line arguments:  -os win32 -ws win32 -arch x86_64

This is a continuation of log file C:\Semantic Tools\TBC-Workspaces\TBC450-7-31-14\.metadata\.bak_0.log
Created Time: 2014-08-17 20:57:21.167

Error
Sun Aug 17 21:36:09 EDT 2014
Failed to load named graph http://data.pg.com

java.net.ConnectException: Connection timed out: connect
    at java.net.DualStackPlainSocketImpl.connect0(Native Method)
    at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
    at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
    at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
    at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
    at java.net.PlainSocketImpl.connect(Unknown Source)
    at java.net.SocksSocketImpl.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at java.net.Socket.<init>(Unknown Source)
    at java.net.Socket.<init>(Unknown Source)
    at com.mysql.jdbc.StandardSocketFactory.connect(StandardSocketFactory.java:259)
    at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:307)
    at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2482)
    at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2519)
    at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2304)
    at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:834)
    at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
    at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:416)
    at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:346)
    at org.apache.commons.dbcp2.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:39)
    at org.apache.commons.dbcp2.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:205)
    at org.apache.commons.dbcp2.BasicDataSource.validateConnectionFactory(BasicDataSource.java:2162)
    at org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:2148)
    at org.apache.commons.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:1903)
    at org.apache.commons.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:1413)
    at org.topbraid.sdb.connection.StoreFactory.testConnection(StoreFactory.java:106)
    at org.topbraid.sdb.connection.StoreFactory.createDataSource(StoreFactory.java:98)
    at org.topbraid.sdb.connection.StoreFactory.getDataSource(StoreFactory.java:186)
    at org.topbraid.sdb.connection.StoreFactory.createStore(StoreFactory.java:174)
    at org.topbraid.sdb.connection.StoreFactory.getStore(StoreFactory.java:167)
    at org.topbraid.sdb.graph.AbstractSDBModule.getStore(AbstractSDBModule.java:49)
    at org.topbraid.sdb.graph.ImportSDBModule.createGraph(ImportSDBModule.java:30)

    at org.topbraid.spin.sparqlmotion.modules.AbstractSMModule.getRDFOutput(AbstractSMModule.java:893)
    at org.topbraid.spin.sparqlmotion.engine.impl.ExecutionEngineImpl.executeModule(ExecutionEngineImpl.java:176)
    at org.topbraid.spin.sparqlmotion.engine.impl.ExecutionEngineImpl.execute(ExecutionEngineImpl.java:118)
    at org.topbraid.sparqlmotion.util.AbstractSMGraphStore.getGraph(AbstractSMGraphStore.java:247)
    at org.topbraid.sparqlmotion.database.DatabaseGraphStore.getDelegateGraphFromFile(DatabaseGraphStore.java:69)
    at org.topbraid.sparqlmotion.database.DatabaseRegistry$1.create(DatabaseRegistry.java:27)
    at org.topbraid.sparqlmotion.database.DatabaseRegistry$1.create(DatabaseRegistry.java:1)
    at org.topbraid.javax.util.ConcurrentCreateWeakValueMapEx.getOrCreate(ConcurrentCreateWeakValueMapEx.java:71)
    at org.topbraid.sparqlmotion.database.DatabaseGraphStore.getGraph(DatabaseGraphStore.java:85)
    at org.topbraid.sparqlmotion.util.AbstractSMGraphStore.load(AbstractSMGraphStore.java:277)
    at org.topbraid.core.registry.IFileGraphSource.graphStoreLoad(IFileGraphSource.java:78)
    at org.topbraid.core.registry.IFileGraphSource.loadSpecialGraph(IFileGraphSource.java:46)
    at org.topbraid.core.registry.GraphSource.loadGraph(GraphSource.java:82)
    at org.topbraid.core.io.IO.loadAndRegister(IO.java:320)
    at org.topbraid.core.io.IO.load(IO.java:292)
    at org.topbraid.core.io.IO.load(IO.java:666)
    at org.topbraid.core.io.IO.load(IO.java:235)
    at org.topbraid.sparql.TopBraidDataset.load(TopBraidDataset.java:560)
    at org.topbraid.sparql.TopBraidDataset$5.run(TopBraidDataset.java:392)
    at org.topbraid.javax.locks.LockUtil.unsafeDisableLockOrderChecking(LockUtil.java:157)
    at org.topbraid.sparql.TopBraidDataset.loadWithoutDeadlockPrevention(TopBraidDataset.java:387)
    at org.topbraid.sparql.TopBraidDataset$4.map1(TopBraidDataset.java:361)
    at org.topbraid.sparql.TopBraidDataset$4.map1(TopBraidDataset.java:1)
    at org.topbraid.sparql.TopBraidDataset$6.map1(TopBraidDataset.java:451)
    at org.topbraid.sparql.TopBraidDataset$6.map1(TopBraidDataset.java:1)
    at org.topbraid.spintb.inference.SPINInferenceEngine.addTriples(SPINInferenceEngine.java:82)
    at org.topbraid.inference.change.AbstractInferenceChange.runReallyNow(AbstractInferenceChange.java:157)
    at org.topbraid.inference.change.AbstractInferenceChange.runReally(AbstractInferenceChange.java:124)
    at org.topbraidcomposer.inference.change.InferenceChange.access$0(InferenceChange.java:1)
    at org.topbraidcomposer.inference.change.InferenceChange$3.run(InferenceChange.java:90)
    at java.lang.Thread.run(Unknown Source)

eclipse.buildId=unknown
java.version=1.7.0_51
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Command-line arguments:  -os win32 -ws win32 -arch x86_64

This is a continuation of log file C:\Semantic Tools\TBC-Workspaces\TBC450-7-31-14\.metadata\.bak_0.log
Created Time: 2014-08-17 20:57:21.167

Error
Sun Aug 17 21:36:09 EDT 2014
Could not execute inferences

java.lang.reflect.InvocationTargetException
    at org.topbraidcomposer.inference.change.InferenceChange.run(InferenceChange.java:106)
    at org.topbraidcomposer.inference.change.InferenceChange.execute(InferenceChange.java:58)
    at org.topbraid.core.change.ChangeOperation.execute(ChangeOperation.java:105)
    at org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:513)
    at org.topbraid.core.change.AbstractChangeEngine.execute(AbstractChangeEngine.java:272)
    at org.topbraidcomposer.core.change.TBCChangeEngine.access$0(TBCChangeEngine.java:1)
    at org.topbraidcomposer.core.change.TBCChangeEngine$2.run(TBCChangeEngine.java:155)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
    at org.topbraid.spintb.inference.SPINInferenceEngine.addTriples(SPINInferenceEngine.java:82)
    at org.topbraid.inference.change.AbstractInferenceChange.runReallyNow(AbstractInferenceChange.java:157)
    at org.topbraid.inference.change.AbstractInferenceChange.runReally(AbstractInferenceChange.java:124)
    at org.topbraidcomposer.inference.change.InferenceChange.access$0(InferenceChange.java:1)
    at org.topbraidcomposer.inference.change.InferenceChange$3.run(InferenceChange.java:90)
    at java.lang.Thread.run(Unknown Source)


eclipse.buildId=unknown
java.version=1.7.0_51
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Command-line arguments:  -os win32 -ws win32 -arch x86_64

This is a continuation of log file C:\Semantic Tools\TBC-Workspaces\TBC450-7-31-14\.metadata\.bak_0.log
Created Time: 2014-08-17 20:57:21.167

Error
Sun Aug 17 21:36:09 EDT 2014
Could not execute inferences

java.lang.reflect.InvocationTargetException
    at org.topbraidcomposer.inference.change.InferenceChange.run(InferenceChange.java:106)
    at org.topbraidcomposer.inference.change.InferenceChange.execute(InferenceChange.java:58)
    at org.topbraid.core.change.ChangeOperation.execute(ChangeOperation.java:105)
    at org.eclipse.core.commands.operations.DefaultOperationHistory.execute(DefaultOperationHistory.java:513)
    at org.topbraid.core.change.AbstractChangeEngine.execute(AbstractChangeEngine.java:272)
    at org.topbraidcomposer.core.change.TBCChangeEngine.access$0(TBCChangeEngine.java:1)
    at org.topbraidcomposer.core.change.TBCChangeEngine$2.run(TBCChangeEngine.java:155)
    at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:121)
    at org.topbraid.spintb.inference.SPINInferenceEngine.addTriples(SPINInferenceEngine.java:82)
    at org.topbraid.inference.change.AbstractInferenceChange.runReallyNow(AbstractInferenceChange.java:157)
    at org.topbraid.inference.change.AbstractInferenceChange.runReally(AbstractInferenceChange.java:124)
    at org.topbraidcomposer.inference.change.InferenceChange.access$0(InferenceChange.java:1)
    at org.topbraidcomposer.inference.change.InferenceChange$3.run(InferenceChange.java:90)
    at java.lang.Thread.run(Unknown Source)



Holger Knublauch

unread,
Aug 17, 2014, 10:07:08 PM8/17/14
to topbrai...@googlegroups.com
On 8/18/2014 11:44, Tim Smith wrote:
Hi Holger,

That's an interesting feature.  I was not aware of it.

I don't use SDB for anything so there are no connector files in my workspace. 

Have you excluded this possibility 100%, e.g. by doing a file search? I am really puzzled by the stack trace as according to our source code this can only happen if there is at least one .sdb file in your workspace.

Holger

Tim Smith

unread,
Aug 17, 2014, 10:27:05 PM8/17/14
to topbrai...@googlegroups.com
Well, sure enough, there are two old (as in a couple of years) .sdb files in the workspace - one with  "http://data.pg.com" as the baseURI.

I deleted them, restarted TBC.  It should be noted that the databases to which the .sdb files pointed no longer exist so I will remember to clean-up the workspace more rigorously.

Unfortunately, when I re-ran the SM script it still generated an error although the error has changed.



eclipse.buildId=unknown
java.version=1.7.0_51
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Command-line arguments:  -os win32 -ws win32 -arch x86_64

This is a continuation of log file C:\Semantic Tools\TBC-Workspaces\TBC450-7-31-14\.metadata\.bak_0.log
Created Time: 2014-08-17 22:20:34.811

Error
Sun Aug 17 22:22:14 EDT 2014
Could not execute SPARQLMotion script


java.lang.reflect.InvocationTargetException
    at org.topbraidcomposer.sparqlmotion.actions.AbstractExecuteSPARQLMotionAction$1.run(AbstractExecuteSPARQLMotionAction.java:153)
    at org.topbraidcomposer.core.util.ThreadUtil$1$1.run(ThreadUtil.java:64)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
    at org.topbraid.spin.util.UpdateUtil.addUpdatedGraphs(UpdateUtil.java:73)
    at org.topbraid.spin.util.UpdateUtil.addUpdatedGraphs(UpdateUtil.java:54)
    at org.topbraid.spin.util.UpdateUtil.getUpdatedGraphs(UpdateUtil.java:34)
    at org.topbraid.spin.inference.SPINInferences.runCommandOnClass(SPINInferences.java:346)
    at org.topbraid.spin.inference.SPINInferences.run(SPINInferences.java:241)
    at org.topbraid.spin.sparqlmotion.modules.impl.ApplyTopSPINModule.addNewTriples(ApplyTopSPINModule.java:121)
    at org.topbraid.spin.sparqlmotion.modules.impl.ApplyTopSPINModule.addNewTriples(ApplyTopSPINModule.java:151)
    at org.topbraid.spin.sparqlmotion.modules.impl.ApplyTopSPINModule.createGraph(ApplyTopSPINModule.java:76)
    at org.topbraid.spin.sparqlmotion.modules.AbstractSMModule.getRDFOutput(AbstractSMModule.java:893)
    at org.topbraid.spin.sparqlmotion.engine.impl.ExecutionEngineImpl.executeModule(ExecutionEngineImpl.java:176)
    at org.topbraid.spin.sparqlmotion.engine.impl.ExecutionEngineImpl.execute(ExecutionEngineImpl.java:118)
    at org.topbraidcomposer.sparqlmotion.views.console.SPARQLMotionConsole.execute(SPARQLMotionConsole.java:79)
    at org.topbraidcomposer.sparqlmotion.actions.AbstractExecuteSPARQLMotionAction$1.run(AbstractExecuteSPARQLMotionAction.java:142)
    ... 2 more
Root exception:
java.lang.NullPointerException

    at org.topbraid.spin.util.UpdateUtil.addUpdatedGraphs(UpdateUtil.java:73)
    at org.topbraid.spin.util.UpdateUtil.addUpdatedGraphs(UpdateUtil.java:54)
    at org.topbraid.spin.util.UpdateUtil.getUpdatedGraphs(UpdateUtil.java:34)
    at org.topbraid.spin.inference.SPINInferences.runCommandOnClass(SPINInferences.java:346)
    at org.topbraid.spin.inference.SPINInferences.run(SPINInferences.java:241)
    at org.topbraid.spin.sparqlmotion.modules.impl.ApplyTopSPINModule.addNewTriples(ApplyTopSPINModule.java:121)
    at org.topbraid.spin.sparqlmotion.modules.impl.ApplyTopSPINModule.addNewTriples(ApplyTopSPINModule.java:151)
    at org.topbraid.spin.sparqlmotion.modules.impl.ApplyTopSPINModule.createGraph(ApplyTopSPINModule.java:76)
    at org.topbraid.spin.sparqlmotion.modules.AbstractSMModule.getRDFOutput(AbstractSMModule.java:893)
    at org.topbraid.spin.sparqlmotion.engine.impl.ExecutionEngineImpl.executeModule(ExecutionEngineImpl.java:176)
    at org.topbraid.spin.sparqlmotion.engine.impl.ExecutionEngineImpl.execute(ExecutionEngineImpl.java:118)
    at org.topbraidcomposer.sparqlmotion.views.console.SPARQLMotionConsole.execute(SPARQLMotionConsole.java:79)
    at org.topbraidcomposer.sparqlmotion.actions.AbstractExecuteSPARQLMotionAction$1.run(AbstractExecuteSPARQLMotionAction.java:142)
    at org.topbraidcomposer.core.util.ThreadUtil$1$1.run(ThreadUtil.java:64)
    at java.lang.Thread.run(Unknown Source)

Holger Knublauch

unread,
Aug 17, 2014, 10:33:25 PM8/17/14
to topbrai...@googlegroups.com
On 8/18/2014 12:27, Tim Smith wrote:
Well, sure enough, there are two old (as in a couple of years) .sdb files in the workspace - one with  "http://data.pg.com" as the baseURI.

Ok good, this explains the original error.



I deleted them, restarted TBC.  It should be noted that the databases to which the .sdb files pointed no longer exist so I will remember to clean-up the workspace more rigorously.

Unfortunately, when I re-ran the SM script it still generated an error although the error has changed.



eclipse.buildId=unknown
java.version=1.7.0_51
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Command-line arguments:  -os win32 -ws win32 -arch x86_64

This is a continuation of log file C:\Semantic Tools\TBC-Workspaces\TBC450-7-31-14\.metadata\.bak_0.log
Created Time: 2014-08-17 22:20:34.811

Error
Sun Aug 17 22:22:14 EDT 2014
Could not execute SPARQLMotion script

java.lang.reflect.InvocationTargetException
    at org.topbraidcomposer.sparqlmotion.actions.AbstractExecuteSPARQLMotionAction$1.run(AbstractExecuteSPARQLMotionAction.java:153)
    at org.topbraidcomposer.core.util.ThreadUtil$1$1.run(ThreadUtil.java:64)
    at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
    at org.topbraid.spin.util.UpdateUtil.addUpdatedGraphs(UpdateUtil.java:73)
    at org.topbraid.spin.util.UpdateUtil.addUpdatedGraphs(UpdateUtil.java:54)
    at org.topbraid.spin.util.UpdateUtil.getUpdatedGraphs(UpdateUtil.java:34)
    at org.topbraid.spin.inference.SPINInferences.runCommandOnClass(SPINInferences.java:346)

This could be because it cannot find the graph

<http://data.pg.com/synonyms/compass/instances>

used in the INSERT of your spin:rule. How is that graph stored in your workspace? Maybe there is no matching file and then the system walked up the hierarchy to discover that it could be a subgraph of the SDB.

Holger

Tim Smith

unread,
Aug 17, 2014, 11:19:09 PM8/17/14
to topbrai...@googlegroups.com
That was it!

That particular graph is a shared file and someone had added a "#" to the end of the base URI so, indeed, it would not have been found.

I have to admit, I would not have guessed that was the problem from the error message.

Thanks a bunch for all of your help!

Tim

Holger Knublauch

unread,
Aug 18, 2014, 7:47:29 PM8/18/14
to topbrai...@googlegroups.com
On 8/18/2014 13:19, Tim Smith wrote:
> That was it!
>
> That particular graph is a shared file and someone had added a "#" to
> the end of the base URI so, indeed, it would not have been found.
>
> I have to admit, I would not have guessed that was the problem from
> the error message.

I have just improved the error handling of the second case (unresolvable
named graph in UPDATE) for 4.6. The other case (with the unnoticed SDB)
was hopefully just a very unfortunate corner case.

Thanks
Holger

Reply all
Reply to author
Forward
0 new messages