[ https://issues.apache.org/jira/browse/JENA-1575?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16543337#comment-16543337 ]
ASF GitHub Bot commented on JENA-1575: -------------------------------------- Github user afs commented on a diff in the pull request: https://github.com/apache/jena/pull/448#discussion_r202386269 --- Diff: jena-tdb/src/main/java/org/apache/jena/tdb/TDBLoader.java --- @@ -219,11 +211,14 @@ public final void setGenerateStats(boolean generateStats) // These are the basic operations for TDBLoader. - private static void loadGraph$(GraphNonTxnTDB graph, InputStream input, boolean showProgress, boolean collectStats) { + private static void loadGraph$(GraphTDB graph, InputStream input, boolean showProgress, boolean collectStats) { + + DatasetGraphTDB dsgtdb = TDBInternal.getBaseDatasetGraphTDB(graph.getDatasetGraphTDB()); --- End diff -- In TDB1, `DatasetGraphTDB` has refs to the indexes and node tables. The TDB1 transaction mechanism is to have different, layered indexes and node tables so a `DatasetGraphTDB` can be holding either the base storage indexes/node table or the in-transaction indexes/node table. `getDatasetGraphTDB` is the base if non-transactional and transaction version if transactional. i.e it switches. The loader wants the base storage version. > tdbloader: class cast exception when using --graph. > --------------------------------------------------- > > Key: JENA-1575 > URL: https://issues.apache.org/jira/browse/JENA-1575 > Project: Apache Jena > Issue Type: Bug > Components: TDB > Affects Versions: Jena 3.8.0 > Reporter: Andy Seaborne > Priority: Major > > [Email on > users@|https://lists.apache.org/thread.html/80759dd4ab869eab052ebb660209ff0a214866955c8c112df8039431@%3Cusers.jena.apache.org%3E]. > {{tdbloader --loc=TMP --graph=http://example/g ~/tmp/D.ttl}} > causes: > {noformat} > java.lang.ClassCastException: org.apache.jena.tdb.store.GraphTxnTDB cannot be > cast to org.apache.jena.tdb.store.GraphNonTxnTDB > at tdb.cmdline.CmdTDBGraph.getGraph(CmdTDBGraph.java:69) > at tdb.tdbloader.loadNamedGraph(tdbloader.java:127) > at tdb.tdbloader.exec(tdbloader.java:117) > at jena.cmd.CmdMain.mainMethod(CmdMain.java:93) > at jena.cmd.CmdMain.mainRun(CmdMain.java:58) > at jena.cmd.CmdMain.mainRun(CmdMain.java:45) > at tdb.tdbloader.main(tdbloader.java:48) > {noformat} > This work with Jena 3.7.0 but not 3.8.0. -- This message was sent by Atlassian JIRA (v7.6.3#76005)