[
https://issues.apache.org/jira/browse/JENA-227?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13239720#comment-13239720
]
Petr Chmelar commented on JENA-227:
-----------------------------------
Hi Andy,
thank you... I'll try to move to SDB. I thought, that RDB is the default
option, because SDB is not integrated in both versions 2.6.4 (which I use
because of WebProtege) and 2.7.
I used cleanDB() instead of recreating the database schema, because I always
got:
Exception in thread "main" com.hp.hpl.jena.db.RDFRDBException: Internal error
in driver while cleaning database
(org.postgresql.util.PSQLException: ERROR: table "jena_g1t0_reif" does not
exist).
Database may be corrupted. Try cleanDB() again.
at com.hp.hpl.jena.db.impl.DriverRDB.doCleanDB(DriverRDB.java:1025)
at com.hp.hpl.jena.db.impl.DriverRDB.cleanDB(DriverRDB.java:984)
at com.hp.hpl.jena.db.DBConnection.cleanDB(DBConnection.java:119)
> containsModel returns false, which is false
> -------------------------------------------
>
> Key: JENA-227
> URL: https://issues.apache.org/jira/browse/JENA-227
> Project: Apache Jena
> Issue Type: Bug
> Components: RDB
> Environment: Linux 64, PostgreSQL
> Reporter: Petr Chmelar
> Priority: Minor
>
> // load the the driver class
> Class.forName(modelDBdriver);
>
> // create a database connection
> dbconn = new DBConnection(modelDBURL, modelDBuserName,
> modelDBpassWord, modelDBengine);
> // create a model maker with the given connection parameters
> maker = ModelFactory.createModelRDBMaker(dbconn);
>
> // open a previously created named model
> if (dbconn.containsModel(name)) {
> // this d
> System.out.println("Great job, model "+ name +" found
> :)");
> model = ModelRDB.open(dbconn, name);
> }
> else System.out.println("It seems there is no model " +
> name);
>
> // well, I know, it is there...
> model = ModelRDB.open(dbconn, name);
> model.write(System.out); // this is OK
> some time before this, I run, but it did even before:
> // WARNING: this is realy dangerous:
> dbconn.cleanDB();
>
> // create a model maker with the given connection parameters
> maker = ModelFactory.createModelRDBMaker(dbconn);
>
> model = ModelRDB.createModel(dbconn, name, properties);
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira