Oracle Exception when using DatabaseSequenceFilter

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Oracle Exception when using DatabaseSequenceFilter

Fabien Coppens-2
Hi all.
This issue is with DBUnit 2.4.8 and Oracle 10g (thin driver ojdbc6).
I am trying to do a full export of my DB as FlatXmlDataSet with the correct sequencing
of tables so as to ensure referential integrity, and for this purpose I am
using a DatabaseSequenceFilter as per the code below:

// full database export ordered by dependencies
ITableFilter filter = new DatabaseSequenceFilter(connection)
IDataSet fullDataSet = connection.createDataSet();
IDataSet filteredDataSet = new FilteredDataSet(filter, fullDataSet);
FlatXmlDataSet.write(filteredDataSet, new FileOutputStream("/C:/Temp/full_dev_export.xml"));

This generates the exception below:
org.dbunit.dataset.DataSetException: Exception while searching the dependent tables.
        at org.dbunit.database.DatabaseSequenceFilter.sortTableNames(DatabaseSequenceFilter.java:105)
        at org.dbunit.database.DatabaseSequenceFilter.<init>(DatabaseSequenceFilter.java:67)
        at org.dbunit.database.DatabaseSequenceFilter.<init>(DatabaseSequenceFilter.java:76)
        at com.warnerbros.wbap.persistence.DBUnitDataExporter.main(DBUnitDataExporter.java:134)
Caused by: org.dbunit.util.search.SearchException: java.sql.SQLDataException: ORA-01424: missing or illegal character following the escape character

        at org.dbunit.database.search.AbstractMetaDataBasedSearchCallback.getNodes(AbstractMetaDataBasedSearchCallback.java:221)
        at org.dbunit.database.search.AbstractMetaDataBasedSearchCallback.getNodes(AbstractMetaDataBasedSearchCallback.java:149)
        at org.dbunit.database.search.AbstractMetaDataBasedSearchCallback.getNodesFromImportedKeys(AbstractMetaDataBasedSearchCallback.java:99)
        at org.dbunit.database.search.ImportedKeysSearchCallback.getEdges(ImportedKeysSearchCallback.java:53)
        at org.dbunit.util.search.DepthFirstSearch.reverseSearch(DepthFirstSearch.java:264)
        at org.dbunit.util.search.DepthFirstSearch.search(DepthFirstSearch.java:148)
        at org.dbunit.util.search.DepthFirstSearch.search(DepthFirstSearch.java:104)
        at org.dbunit.database.search.TablesDependencyHelper.getDependentTables(TablesDependencyHelper.java:92)
        at org.dbunit.database.search.TablesDependencyHelper.getDependentTables(TablesDependencyHelper.java:73)
        at org.dbunit.database.DatabaseSequenceFilter.getDependencyInfo(DatabaseSequenceFilter.java:201)
        at org.dbunit.database.DatabaseSequenceFilter.sortTableNames(DatabaseSequenceFilter.java:101)
        ... 3 more
Caused by: java.sql.SQLDataException: ORA-01424: missing or illegal character following the escape character

        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:445)
        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
        at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:879)
        at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:450)
        at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:192)
        at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531)
        at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:207)
        at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:884)
        at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1167)
        at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1289)
        at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3584)
        at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3628)
        at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1493)
        at oracle.jdbc.OracleDatabaseMetaData.getTables(OracleDatabaseMetaData.java:3077)
        at org.dbunit.database.DefaultMetadataHandler.tableExists(DefaultMetadataHandler.java:119)
        at org.dbunit.database.search.AbstractMetaDataBasedSearchCallback.getNodes(AbstractMetaDataBasedSearchCallback.java:184)
        ... 13 more

Help please ?
Fabien

------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn
about Cisco certifications, training, and career opportunities.
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user
Reply | Threaded
Open this post in threaded view
|

Re: Oracle Exception when using DatabaseSequenceFilter

Fabien Coppens-2
Hi.
Trying my luck again with this. If anyone has ideas...

----- Mail Original -----
De: "Fabien Coppens" <[hidden email]>
À: [hidden email]
Envoyé: Mercredi 26 Octobre 2011 15h45:45 GMT -08:00 USA/Canada - États du Pacifique
Objet: Oracle Exception when using DatabaseSequenceFilter

Hi all.
This issue is with DBUnit 2.4.8 and Oracle 10g (thin driver ojdbc6).
I am trying to do a full export of my DB as FlatXmlDataSet with the correct sequencing
of tables so as to ensure referential integrity, and for this purpose I am
using a DatabaseSequenceFilter as per the code below:

// full database export ordered by dependencies
ITableFilter filter = new DatabaseSequenceFilter(connection)
IDataSet fullDataSet = connection.createDataSet();
IDataSet filteredDataSet = new FilteredDataSet(filter, fullDataSet);
FlatXmlDataSet.write(filteredDataSet, new FileOutputStream("/C:/Temp/full_dev_export.xml"));

This generates the exception below:
org.dbunit.dataset.DataSetException: Exception while searching the dependent tables.
        at org.dbunit.database.DatabaseSequenceFilter.sortTableNames(DatabaseSequenceFilter.java:105)
        at org.dbunit.database.DatabaseSequenceFilter.<init>(DatabaseSequenceFilter.java:67)
        at org.dbunit.database.DatabaseSequenceFilter.<init>(DatabaseSequenceFilter.java:76)
        at com.warnerbros.wbap.persistence.DBUnitDataExporter.main(DBUnitDataExporter.java:134)
Caused by: org.dbunit.util.search.SearchException: java.sql.SQLDataException: ORA-01424: missing or illegal character following the escape character

        at org.dbunit.database.search.AbstractMetaDataBasedSearchCallback.getNodes(AbstractMetaDataBasedSearchCallback.java:221)
        at org.dbunit.database.search.AbstractMetaDataBasedSearchCallback.getNodes(AbstractMetaDataBasedSearchCallback.java:149)
        at org.dbunit.database.search.AbstractMetaDataBasedSearchCallback.getNodesFromImportedKeys(AbstractMetaDataBasedSearchCallback.java:99)
        at org.dbunit.database.search.ImportedKeysSearchCallback.getEdges(ImportedKeysSearchCallback.java:53)
        at org.dbunit.util.search.DepthFirstSearch.reverseSearch(DepthFirstSearch.java:264)
        at org.dbunit.util.search.DepthFirstSearch.search(DepthFirstSearch.java:148)
        at org.dbunit.util.search.DepthFirstSearch.search(DepthFirstSearch.java:104)
        at org.dbunit.database.search.TablesDependencyHelper.getDependentTables(TablesDependencyHelper.java:92)
        at org.dbunit.database.search.TablesDependencyHelper.getDependentTables(TablesDependencyHelper.java:73)
        at org.dbunit.database.DatabaseSequenceFilter.getDependencyInfo(DatabaseSequenceFilter.java:201)
        at org.dbunit.database.DatabaseSequenceFilter.sortTableNames(DatabaseSequenceFilter.java:101)
        ... 3 more
Caused by: java.sql.SQLDataException: ORA-01424: missing or illegal character following the escape character

        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:445)
        at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
        at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:879)
        at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:450)
        at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:192)
        at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:531)
        at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:207)
        at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:884)
        at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1167)
        at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1289)
        at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3584)
        at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3628)
        at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1493)
        at oracle.jdbc.OracleDatabaseMetaData.getTables(OracleDatabaseMetaData.java:3077)
        at org.dbunit.database.DefaultMetadataHandler.tableExists(DefaultMetadataHandler.java:119)
        at org.dbunit.database.search.AbstractMetaDataBasedSearchCallback.getNodes(AbstractMetaDataBasedSearchCallback.java:184)
        ... 13 more

Help please ?
Fabien

------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
dbunit-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/dbunit-user