Topic: [SOLVED] support for Oracle schemas
[SOLVED] support for Oracle schemas
Hi. Just starting to play around with this tool and have a question about how to get access to different schemas than the one used for connection to an Oracle database. There seems to be no option to specify that on connection dialog ("catalog" doesn't do anything) and I only see objects that belong to the user I'm logging in as. Thanks.
Hi,
If your user is not allowed to access a schema, then the schema won't be visible in DataCleaner - we can't bypass you databases security ;-)
But what I think you mean is that your user has access to several schemas? In DataCleaner 1.0 this should be possible (to my knowledge, but please let me know if I'm wrong!) and in the current development version I think it's one of the known shortcomings?
I'm not able to test it before tomorrow though - anyone else than me who has something to add to this?
If your user is not allowed to access a schema, then the schema won't be visible in DataCleaner - we can't bypass you databases security ;-)
But what I think you mean is that your user has access to several schemas? In DataCleaner 1.0 this should be possible (to my knowledge, but please let me know if I'm wrong!) and in the current development version I think it's one of the known shortcomings?
I'm not able to test it before tomorrow though - anyone else than me who has something to add to this?
OK I've looked into this and if you're using the development edition of DataCleaner then yes, we definately have a problem. I will fix it right away because this bug is actually a "conscious" one - it was based of my misunderstanding of how Oracle works, heh, sorry.
This has been fixed as of revision [446].
If you want this bug fixed and can't wait for version 1.2, here's what you need to do:
If you want this bug fixed and can't wait for version 1.2, here's what you need to do:
- Download the gui jar and put it in target.
- Download the core jar and put it in target/lib.
- Download the metamodel jar and put it in target/lib.
Sorry it took me a while to test it (with version 1.2 now). The initial problem has gone however now I'm not able to work with tables in the schemas at all. As expected I see a tree (in Profiler) of all Oracle schemas with expandable thoses that actually have objects accessible in them. But when I expand the tree those tables aren't recognized as tables.
Oh I just looked at traces and there is a lot of errors in there while reading database metadata. The first one looks like this:
INFO JdbcDataContextStrategy - Querying for table types {TABLE,VIEW} in catalog: null
INFO JdbcDataContextStrategy - Querying for table types {TABLE,VIEW} in catalog: null
INFO JdbcDataContextStrategy - Querying for table types {TABLE,VIEW} in catalog: null
INFO JdbcDataContextStrategy - Querying for table types {TABLE,VIEW} in catalog: null
INFO JdbcDataContextStrategy - Querying for table types {TABLE,VIEW} in catalog: null
ERROR JdbcDataContextStrategy - Error retriving table metadata
java.sql.SQLException: ORA-01031: insufficient privileges
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745)
at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:207)
at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:957)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1170)
at oracle.jdbc.driver.OracleStatement.executeUpdateInternal(OracleStatement.java:1623)
at oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java:1588)
at oracle.jdbc.OracleDatabaseMetaData.getIndexInfo(OracleDatabaseMetaData.java:3486)
at dk.eobjects.metamodel.JdbcDataContextStrategy.populateTables(JdbcDataContextStrategy.java:245)
at dk.eobjects.metamodel.JdbcDataContextStrategy.getSchemaByName(JdbcDataContextStrategy.java:667)
at dk.eobjects.metamodel.DataContext.getSchemaByName(DataContext.java:260)
at dk.eobjects.metamodel.DataContext.getSchemas(DataContext.java:201)
at dk.eobjects.datacleaner.gui.widgets.SchemaTree.updateTree(SchemaTree.java:54)
at dk.eobjects.datacleaner.gui.widgets.SchemaTree.update(SchemaTree.java:86)
at java.util.Observable.notifyObservers(Unknown Source)
at java.util.Observable.notifyObservers(Unknown Source)
at dk.eobjects.datacleaner.gui.model.DataContextSelection.setDataContext(DataContextSelection.java:67)
at dk.eobjects.datacleaner.gui.GuiHelper.selectSchemaByDatabase(GuiHelper.java:161)
at dk.eobjects.datacleaner.gui.dialogs.OpenDatabaseDialog$2.actionPerformed(OpenDatabaseDialog.java:157)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.Dialog$1.run(Unknown Source)
at java.awt.Dialog$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Dialog.show(Unknown Source)
at java.awt.Component.show(Unknown Source)
at java.awt.Component.setVisible(Unknown Source)
at java.awt.Window.setVisible(Unknown Source)
at java.awt.Dialog.setVisible(Unknown Source)
at dk.eobjects.datacleaner.gui.widgets.OpenDatabaseButton$1.actionPerformed(OpenDatabaseButton.java:40)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Oh I just looked at traces and there is a lot of errors in there while reading database metadata. The first one looks like this:
INFO JdbcDataContextStrategy - Querying for table types {TABLE,VIEW} in catalog: null
INFO JdbcDataContextStrategy - Querying for table types {TABLE,VIEW} in catalog: null
INFO JdbcDataContextStrategy - Querying for table types {TABLE,VIEW} in catalog: null
INFO JdbcDataContextStrategy - Querying for table types {TABLE,VIEW} in catalog: null
INFO JdbcDataContextStrategy - Querying for table types {TABLE,VIEW} in catalog: null
ERROR JdbcDataContextStrategy - Error retriving table metadata
java.sql.SQLException: ORA-01031: insufficient privileges
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745)
at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:207)
at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:957)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1170)
at oracle.jdbc.driver.OracleStatement.executeUpdateInternal(OracleStatement.java:1623)
at oracle.jdbc.driver.OracleStatement.executeUpdate(OracleStatement.java:1588)
at oracle.jdbc.OracleDatabaseMetaData.getIndexInfo(OracleDatabaseMetaData.java:3486)
at dk.eobjects.metamodel.JdbcDataContextStrategy.populateTables(JdbcDataContextStrategy.java:245)
at dk.eobjects.metamodel.JdbcDataContextStrategy.getSchemaByName(JdbcDataContextStrategy.java:667)
at dk.eobjects.metamodel.DataContext.getSchemaByName(DataContext.java:260)
at dk.eobjects.metamodel.DataContext.getSchemas(DataContext.java:201)
at dk.eobjects.datacleaner.gui.widgets.SchemaTree.updateTree(SchemaTree.java:54)
at dk.eobjects.datacleaner.gui.widgets.SchemaTree.update(SchemaTree.java:86)
at java.util.Observable.notifyObservers(Unknown Source)
at java.util.Observable.notifyObservers(Unknown Source)
at dk.eobjects.datacleaner.gui.model.DataContextSelection.setDataContext(DataContextSelection.java:67)
at dk.eobjects.datacleaner.gui.GuiHelper.selectSchemaByDatabase(GuiHelper.java:161)
at dk.eobjects.datacleaner.gui.dialogs.OpenDatabaseDialog$2.actionPerformed(OpenDatabaseDialog.java:157)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.Dialog$1.run(Unknown Source)
at java.awt.Dialog$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Dialog.show(Unknown Source)
at java.awt.Component.show(Unknown Source)
at java.awt.Component.setVisible(Unknown Source)
at java.awt.Window.setVisible(Unknown Source)
at java.awt.Dialog.setVisible(Unknown Source)
at dk.eobjects.datacleaner.gui.widgets.OpenDatabaseButton$1.actionPerformed(OpenDatabaseButton.java:40)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Also I've noticed - FIRST table of every schema is loaded OK, but not the rest.
What do you mean by
Is it that only the first table of each schema is available in the tree?
The important part of the stacktrace is this:
Even though I'm not sure I understand the part about "only the first table works" I have an idea: The metaData.getIndexInfo(...) is called within an iteration that loops through all tables. If the method throws an exception then that iteration will stop and the other tables will not be processed. I will fix this for 1.3 (since the indexInfo can be omitted if not available) but the only thing you can do right now is to grant your user more privileges I think.
But when I expand the tree those tables aren't recognized as tables.and
FIRST table of every schema is loaded OK, but not the rest.?
Is it that only the first table of each schema is available in the tree?
The important part of the stacktrace is this:
Error retriving table metadata java.sql.SQLException: ORA-01031: insufficient privilegesAnd it's caused by calling metaData.getIndexInfo(...) which you apparently don't have privileges to do. Can you grant your user privileges to read index info?
Even though I'm not sure I understand the part about "only the first table works" I have an idea: The metaData.getIndexInfo(...) is called within an iteration that loops through all tables. If the method throws an exception then that iteration will stop and the other tables will not be processed. I will fix this for 1.3 (since the indexInfo can be omitted if not available) but the only thing you can do right now is to grant your user more privileges I think.
Yes, you have described that all correctly. The thing is - Oracle doesn't have any privileges for indexes specifically, so in fact its probably their JDBC driver problem (according to this its been like that for a long time:
http://coding.derkeiler.com/Archive/Java/comp.lang.java.databases/2005-06/msg00026.html
)
So skipping index introspection is very important for Oracle users I think.
http://coding.derkeiler.com/Archive/Java/comp.lang.java.databases/2005-06/msg00026.html
)
So skipping index introspection is very important for Oracle users I think.
OK I've made the fix. Please download this jar-file and replace it with the other MetaModel jar in your datacleaner/target/lib directory:
http://datacleaner.sourceforge.net/m2-repo/dk/eobjects/commons/MetaModel/1.0.1/MetaModel-1.0.1.jar
Does it work now? It should... :)
http://datacleaner.sourceforge.net/m2-repo/dk/eobjects/commons/MetaModel/1.0.1/MetaModel-1.0.1.jar
Does it work now? It should... :)
I have two: MetaModel-1.0.jar and MetaModel-0.3-SNAPSHOT.jar Which one should I replace?
Heh, delete both and drop in the 1.0.1 version in there instead.
You're welcome! Please let us know how it works out for you in the future. Maybe you can contribute with a "user story"? We're looking for people and organizations who can testament their use of DataCleaner...
Not quite solved though - the logs still see a lot of errors before I start to get this:
WARN JdbcDataContextStrategy - Could not retrieve index info for table: ALL$OLAP2UHIERDIM_KEYCOL_MAP
INFO JdbcDataContextStrategy - ORA-01702: a view is not appropriate here
WARN JdbcDataContextStrategy - Could not retrieve index info for table: ALL$OLAP2UHIER_CUSTOM_SORT
INFO JdbcDataContextStrategy - ORA-01702: a view is not appropriate here
Could not retrieve index info for table: ALL$OLAP2UJOIN_KEY_COLUMN_USES
INFO JdbcDataContextStrategy - ORA-00604: error occurred at recursive SQL level 1
ORA-01000: maximum open cursors exceeded
ERROR JdbcDataContextStrategy - Error retriving table metadata
java.sql.SQLException: ORA-01000: maximum open cursors exceeded
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)
at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:810)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1039)
at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:850)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1134)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3339)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3384)
at oracle.jdbc.driver.OracleDatabaseMetaData.getColumns(OracleDatabaseMetaData.java:262)
at dk.eobjects.metamodel.JdbcDataContextStrategy.populateTables(JdbcDataContextStrategy.java:202)
at dk.eobjects.metamodel.JdbcDataContextStrategy.getSchemaByName(JdbcDataContextStrategy.java:680)
at dk.eobjects.metamodel.DataContext.getSchemaByName(DataContext.java:260)
at dk.eobjects.metamodel.DataContext.getSchemas(DataContext.java:201)
at dk.eobjects.datacleaner.gui.widgets.SchemaTree.updateTree(SchemaTree.java:54)
at dk.eobjects.datacleaner.gui.widgets.SchemaTree.update(SchemaTree.java:86)
at java.util.Observable.notifyObservers(Unknown Source)
at java.util.Observable.notifyObservers(Unknown Source)
at dk.eobjects.datacleaner.gui.model.DataContextSelection.setDataContext(DataContextSelection.java:67)
at dk.eobjects.datacleaner.gui.GuiHelper.selectSchemaByDatabase(GuiHelper.java:161)
at dk.eobjects.datacleaner.gui.dialogs.OpenDatabaseDialog$2.actionPerformed(OpenDatabaseDialog.java:157)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.Dialog$1.run(Unknown Source)
at java.awt.Dialog$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Dialog.show(Unknown Source)
at java.awt.Component.show(Unknown Source)
at java.awt.Component.setVisible(Unknown Source)
at java.awt.Window.setVisible(Unknown Source)
at java.awt.Dialog.setVisible(Unknown Source)
at dk.eobjects.datacleaner.gui.widgets.OpenDatabaseButton$1.actionPerformed(OpenDatabaseButton.java:40)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Looks to me like the index error deosn't release connection properly or something like that...
WARN JdbcDataContextStrategy - Could not retrieve index info for table: ALL$OLAP2UHIERDIM_KEYCOL_MAP
INFO JdbcDataContextStrategy - ORA-01702: a view is not appropriate here
WARN JdbcDataContextStrategy - Could not retrieve index info for table: ALL$OLAP2UHIER_CUSTOM_SORT
INFO JdbcDataContextStrategy - ORA-01702: a view is not appropriate here
Could not retrieve index info for table: ALL$OLAP2UJOIN_KEY_COLUMN_USES
INFO JdbcDataContextStrategy - ORA-00604: error occurred at recursive SQL level 1
ORA-01000: maximum open cursors exceeded
ERROR JdbcDataContextStrategy - Error retriving table metadata
java.sql.SQLException: ORA-01000: maximum open cursors exceeded
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745)
at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:216)
at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:810)
at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1039)
at oracle.jdbc.driver.T4CPreparedStatement.executeMaybeDescribe(T4CPreparedStatement.java:850)
at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1134)
at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3339)
at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3384)
at oracle.jdbc.driver.OracleDatabaseMetaData.getColumns(OracleDatabaseMetaData.java:262)
at dk.eobjects.metamodel.JdbcDataContextStrategy.populateTables(JdbcDataContextStrategy.java:202)
at dk.eobjects.metamodel.JdbcDataContextStrategy.getSchemaByName(JdbcDataContextStrategy.java:680)
at dk.eobjects.metamodel.DataContext.getSchemaByName(DataContext.java:260)
at dk.eobjects.metamodel.DataContext.getSchemas(DataContext.java:201)
at dk.eobjects.datacleaner.gui.widgets.SchemaTree.updateTree(SchemaTree.java:54)
at dk.eobjects.datacleaner.gui.widgets.SchemaTree.update(SchemaTree.java:86)
at java.util.Observable.notifyObservers(Unknown Source)
at java.util.Observable.notifyObservers(Unknown Source)
at dk.eobjects.datacleaner.gui.model.DataContextSelection.setDataContext(DataContextSelection.java:67)
at dk.eobjects.datacleaner.gui.GuiHelper.selectSchemaByDatabase(GuiHelper.java:161)
at dk.eobjects.datacleaner.gui.dialogs.OpenDatabaseDialog$2.actionPerformed(OpenDatabaseDialog.java:157)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.Dialog$1.run(Unknown Source)
at java.awt.Dialog$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Dialog.show(Unknown Source)
at java.awt.Component.show(Unknown Source)
at java.awt.Component.setVisible(Unknown Source)
at java.awt.Window.setVisible(Unknown Source)
at java.awt.Dialog.setVisible(Unknown Source)
at dk.eobjects.datacleaner.gui.widgets.OpenDatabaseButton$1.actionPerformed(OpenDatabaseButton.java:40)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Looks to me like the index error deosn't release connection properly or something like that...
Ah damn those open cursors ;-) I'll have a look at it asap.
Hmm I can't really reproduce the scenario (my oracle doesn't seem to have the same problem, don't know why) so I will wait for your confirmation before releasing this ... Can you please try out this MetaModel jar?
http://www.eobjects.dk/metamodel/MetaModel-1.0.2.jar
http://www.eobjects.dk/metamodel/MetaModel-1.0.2.jar
OK, I'm on my way out of the door right now, but I will look at again in a couple of hours and try to recreate the scenario "for real" so I won't have to use you as my beta-tester :) I'll post what I find out at least within the next 24 hours.
Didn't manage to reproduce your error I'm affraid. I did however make some changes to the code that I THINK will do the job. Can you please try out this jar-file instead of the old one?
http://www.eobjects.dk/hudson/job/MetaModel/ws/trunk/target/MetaModel-1.0.2.jar
What I did was to completely separate the column-searching part from the index-searching part of the code. That means that if the index-searching should somehow fail it will leave the column-part intact. I've also introduced a bit more strict cursor/resultset cleanup, even though the old one should have worked as far as I can see.
If it doesn't work, can you please then describe to me a little more about your database - what are the specific columns mentioned in the error message and how are your users configuration?
http://www.eobjects.dk/hudson/job/MetaModel/ws/trunk/target/MetaModel-1.0.2.jar
What I did was to completely separate the column-searching part from the index-searching part of the code. That means that if the index-searching should somehow fail it will leave the column-part intact. I've also introduced a bit more strict cursor/resultset cleanup, even though the old one should have worked as far as I can see.
If it doesn't work, can you please then describe to me a little more about your database - what are the specific columns mentioned in the error message and how are your users configuration?
This is great - I finally was able to load everything correctly in Profiler. It took ages though as SYS schema in oracle contains a lot of objects that frankly one should not be looking at anyway. So is it possible to exclude some schemas from introspection (or at least an option to exclude SYS schema)? Generic solution could be loading schema metadata on demand, i.e. initially you load only schemas then when user clicked on expand in the tree - tables, but I that might not be possible if your metadata object is totally separate from the GUI...
Anyway its a good start and I already have a few suggestions about profiler which I'll describe in another thread...
Anyway its a good start and I already have a few suggestions about profiler which I'll describe in another thread...
Glad to hear it worked!
We've already been working on some improvements to performance. The reason that the SYS schema takes ages to process is because it contains 1000-some views and only a couple (8 as far as I know) "real" tables. In DataCleaner 1.3 it will be optional to include views (with the default setting to just include tables).
For more info, see Ticket #171
I'll release the new MetaModel version right away so the changes will become "official".
We've already been working on some improvements to performance. The reason that the SYS schema takes ages to process is because it contains 1000-some views and only a couple (8 as far as I know) "real" tables. In DataCleaner 1.3 it will be optional to include views (with the default setting to just include tables).
For more info, see Ticket #171
I'll release the new MetaModel version right away so the changes will become "official".
Having option to filter out the views is good one, however it doesn't solve this particular problem with SYS views as I still want to be able to access the views in all other schemas apart from SYS ones...
Ah yes. Hmm we'll have to implement lazyloading in the tree view then. That will require some changes, but I'll make a ticket for it and I hope it will make the 1.3 release then.
Just a little notice. We're now done with the lazyloading tree ticket - you can [BuildingDataCleaner build datacleaner yourself] or wait for the 1.3 release to start using it :)
I am not convinced that this problem has been solved in 1.3. But I may be wrong. Here's what happens:
I have installed V1.3 and I am using it against an oracle database.
I can see all the schemas (it's a large Data Warehouse, probably 100 difference schemas). When I click on a schema that owns a small number of tables, there is no problem and everything works. But when I click on a schema that owns many tables, everything freezes, with no error message anywhere (at least, nowhere obvious).
The schema I am trying to access is the main schema of the data warehouse, and includes 1042 tables.
In data warehousing terms, this is large but no amazingly large.
Can anyone offer any workarounds?
I have installed V1.3 and I am using it against an oracle database.
I can see all the schemas (it's a large Data Warehouse, probably 100 difference schemas). When I click on a schema that owns a small number of tables, there is no problem and everything works. But when I click on a schema that owns many tables, everything freezes, with no error message anywhere (at least, nowhere obvious).
The schema I am trying to access is the main schema of the data warehouse, and includes 1042 tables.
In data warehousing terms, this is large but no amazingly large.
Can anyone offer any workarounds?
Hi BenBor,
Honestly, we haven't tested it with that many tables but I did experience some lag-time when opening the one of the system schemas that holds a little over 100 tables as far as I recall. I'm pretty convinced that if you wait a little while, you'll eventually get a working app, but this is of course not acceptable performance-wise. One thing I'm thinking is that perhaps the "thin" driver is not appropriate for this kind of operation? I'm no Oracle expert but they have different types of JDBC drivers and perhaps some of them are better for more performance-intensive operations?
Honestly, we haven't tested it with that many tables but I did experience some lag-time when opening the one of the system schemas that holds a little over 100 tables as far as I recall. I'm pretty convinced that if you wait a little while, you'll eventually get a working app, but this is of course not acceptable performance-wise. One thing I'm thinking is that perhaps the "thin" driver is not appropriate for this kind of operation? I'm no Oracle expert but they have different types of JDBC drivers and perhaps some of them are better for more performance-intensive operations?
Uh one more thing, can you check the console for any error messages? I was just going through the code and discovered that our error handling if anything was to go wrong was not that good in just that part of DataCleaner so I'll file a bug for improving that right away.
Did u try to only select tables or views, not both?
1. I tried selecting tables only. Tried selecting views only. Neither work.
2. I waited for over half an hour, still no response. My "Task Manager" shows almost no CPU activity, so I assume that the profiler is not doing anything.
3. Well, after about half an hour the console displayed an error message
4. Kasper - you have been in contact with the Talend people, who are also developing a Data Profiling tool. They seemed to have solved this problem and their schema browser opens my schema with no perceptible delay. I think that your measures are better, though. A combination of both tools would be nice.
5. I am a very experienced Business Intelligence, Data Warehousing and Data Quality consultant. I currently have some time to 'play' with Data Quality tools. Would you be interested in a list of improvement suggestions?
2. I waited for over half an hour, still no response. My "Task Manager" shows almost no CPU activity, so I assume that the profiler is not doing anything.
3. Well, after about half an hour the console displayed an error message
“WARN JdbcDataContextStrategy - Could not retrieve index info for table: FACT_IMMUNISATION_SUMMARYI deduce from that that (1) it is still running, and (2) the program loads all the metadata information for all the tables at this time, instead of just loading the table names and populating the rest of the metadata when a table is selected. Wouldn’t it be better to do it the other way? Load just the table names, thus making them visible. When a user selects a table for profiling, load the rest of the metadata. There is still no resposne from the GUI, though. I'll wait another hour, I guess...
INFO JdbcDataContextStrategy - ORA-01502: index DSSADM.FACT_IMMUNISATION_SUMM_IDX_0' or partition of such index is in unusable state”
4. Kasper - you have been in contact with the Talend people, who are also developing a Data Profiling tool. They seemed to have solved this problem and their schema browser opens my schema with no perceptible delay. I think that your measures are better, though. A combination of both tools would be nice.
5. I am a very experienced Business Intelligence, Data Warehousing and Data Quality consultant. I currently have some time to 'play' with Data Quality tools. Would you be interested in a list of improvement suggestions?
I took the liberty of formatting your reply a bit to make it look nicer with our website :) If you want formatting tips, you can check out: WikiFormatting. I'm going to try and reply to your comments one by one :)
1. OK, but I guess it's also not satisfactory to just rule out views or tables.
2. I think you can shut it down now :)
3. This is really the interesting part. Your assumptions are right as with the eager loading of metadata and I guess we could perhaps tweak that part a bit but it's not really the issue and since we use MetaModel as our data access component this is not just a matter of how the tree works but how the model for the whole app works. In order to get closer to diagnosing this problem, can you please inform me of:
5. We're always open ears for new ideas. And if you want to help us along a lot of things can be done of course. Our project structure is informal and if some one has an idea that they want to work with we won't stop them unless it interferes with other plans.
1. OK, but I guess it's also not satisfactory to just rule out views or tables.
2. I think you can shut it down now :)
3. This is really the interesting part. Your assumptions are right as with the eager loading of metadata and I guess we could perhaps tweak that part a bit but it's not really the issue and since we use MetaModel as our data access component this is not just a matter of how the tree works but how the model for the whole app works. In order to get closer to diagnosing this problem, can you please inform me of:
- What version of Oracle you are running
- What JDBC driver you're using
- The structure of the DSSADM.FACT_IMMUNISATION_SUMM_IDX_0 index. This is crucial I think so all the info you have please.
- The structure of the FACT_IMMUNISATION_SUMMARY tables, including indexes, foreign and primary keys.
- If it's possible, a little .sql script with a snippet of the table would be best, then I'll create an exact copy of your scenario and will have the best ways of testing it.
5. We're always open ears for new ideas. And if you want to help us along a lot of things can be done of course. Our project structure is informal and if some one has an idea that they want to work with we won't stop them unless it interferes with other plans.
1. Probably irrelevant to this discussion, but I am not sure why you would want to profile views.[[BR]]
2. Surprisingly, after over an hour, it all came back and is now working. I don't dare exit, though :)... it will take another hour to get back to where I am... Will I ever shut-down my machine again? :-)
3. I am using Oracle 9.2, JRE 1.6. The full table creation script is almost 27,00 lines (!). Mainly to do with partitioning and index partitioning. If you want, I can email you the script. Placing it on this Wiki is not going to make me too popular, I guess.
I hope this helps.
2. Surprisingly, after over an hour, it all came back and is now working. I don't dare exit, though :)... it will take another hour to get back to where I am... Will I ever shut-down my machine again? :-)
3. I am using Oracle 9.2, JRE 1.6. The full table creation script is almost 27,00 lines (!). Mainly to do with partitioning and index partitioning. If you want, I can email you the script. Placing it on this Wiki is not going to make me too popular, I guess.
I hope this helps.
1. I agree, normally you won't profile views. But to some users it may be easier to get an overview of their data by looking at the views - The only example I can come up with is for the Javascript evaluator, it would be beneficial to create a joined view if you where to check the integrity of two columns from different tables, then you could reference the joined values in the same javascript.
2. I think you can shut it down - at least I'm pretty sure we'll overcome this bug eventually, even though it has been a pain in the a...
3. Yes please email it to me at kasper@eobjects.dk then I'll give it a go. I'm running Oracle 10g (Express) but hopefully it will let me recreate the scenario.
2. I think you can shut it down - at least I'm pretty sure we'll overcome this bug eventually, even though it has been a pain in the a...
3. Yes please email it to me at kasper@eobjects.dk then I'll give it a go. I'm running Oracle 10g (Express) but hopefully it will let me recreate the scenario.
Hi,
I join this discussion only to ask one thing:
Why wouldn't you profile views?
Often views are defined in order to not bother business users with too many details. And profiling them allows the business users to check the quality of the data they are using.
Sometimes business users even don't have access to the tables, but only to the views defined for them.
I join this discussion only to ask one thing:
Why wouldn't you profile views?
Often views are defined in order to not bother business users with too many details. And profiling them allows the business users to check the quality of the data they are using.
Sometimes business users even don't have access to the tables, but only to the views defined for them.
I agree with that also :) I think the line of thought by some may be that they think of tables as the "sources to views" and then may feel uncomfortable with doing DQ analysis on behalf of the result as apposed to the source. If you profile or validate a table you'll get results that apply directly to the table your working with. If you want to make corrections to a view you'll have to find the actual table and do the corrections there.
Of course, if you want to clean the data, you will need to work on the tables.
But this does not mean that the profiling has to be done on the tables.
For example, where I worked before, developers of Business Object universes could only work with views. Then in order to check the quality of the data they deliver in their BO reports, they had to profile the views because the views were the source of the final reports.
But this does not mean that the profiling has to be done on the tables.
For example, where I worked before, developers of Business Object universes could only work with views. Then in order to check the quality of the data they deliver in their BO reports, they had to profile the views because the views were the source of the final reports.
I fully agree that in the scenarios you describe it is sensible to profile a view.[[BR]]
However, I would not recommend these scenarios. If an organisation is serious about Data Quality, it should have a Data Quality expert who performs the profiling, formats the results into plain English (or whatever the local language is) and discusses it with the business.[[BR]][[BR]]
I would not expect users to do their own data profiling.
However, I would not recommend these scenarios. If an organisation is serious about Data Quality, it should have a Data Quality expert who performs the profiling, formats the results into plain English (or whatever the local language is) and discusses it with the business.[[BR]][[BR]]
I would not expect users to do their own data profiling.
For reader's interests: We've identified that choosing the correct JDBC driver version (the same as your oracle server) is very important. This ruled out the main part of the problems that BenBor had been experiencing and we're working on the last couple of minor bugs.
Log in by clicking the login link at the top of the screen
Go back to forum.


