Illegal exception during DB deletion

User 677b9c22ff

24-07-2007 02:38:51

Hi,


I have a DB 25k structures, mark all structures down (blue color) , right click delete data. It nicely asks and the crashed. The error message "empty strcuctures no allowd" seems not true, if I delete n-1 structures ist still not possible. BTW I am the master of my table, why can't I have an empty table....





However what I actually wanted to do was to delete all my data and structures but keep the empty DB table (had a special fp and standardizer) and re-import erverything.


Is there a way to do that? I could not find out how.





Following error:





java.lang.IllegalArgumentException: Empty structures not allowed


at com.im.df.impl.db.dao.JChemBaseDao.update(JChemBaseDao.java:860)


at com.im.df.impl.db.DBSchemaManager.update(DBSchemaManager.java:770)


at com.im.df.impl.db.DBEntityDataProviderImpl.update(DBEntityDataProviderImpl.java:169)


at com.im.ijc.util.IJCCoreUtils$5.phase1InRequestProcessor(IJCCoreUtils.java:207)


at com.im.df.util.BackgroundRunner.processTheTask(BackgroundRunner.java:81)


at com.im.df.util.BackgroundRunner$1.run(BackgroundRunner.java:72)


at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:499)


[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:932)





Tobias

User 677b9c22ff

24-07-2007 02:56:29

Hi,


ok I found out that I can delet strcutures from -->data-->delete.





After deleting of 25k strcutures out of a 500k table I got the follwoing error, which was true because, because I was low on memory. Additionally it showed an error before in Clean2D.





I also know now that I can actually create an empty table


y going to the menu and do the delete.





Anyway some right-click-mouse functionality would be great. (This does not solve the first error).








Tobias





java.lang.OutOfMemoryError: unable to create new native thread


at java.lang.Thread.start0(Native Method)


at java.lang.Thread.start(Unknown Source)


at chemaxon.marvin.common.swing.MolPanel.initCursor(MolPanel.java:4976)


at chemaxon.marvin.common.swing.MolPanel.initCursor(MolPanel.java:4955)


at chemaxon.marvin.common.swing.MolPanel.endHourglass(MolPanel.java:3624)


at chemaxon.marvin.common.swing.MolPanel.molLoaded(MolPanel.java:4424)


at chemaxon.marvin.view.swing.ViewPanel.molLoaded(ViewPanel.java:2599)


at chemaxon.marvin.view.swing.ViewPanel.setM(ViewPanel.java:1657)


at chemaxon.marvin.beans.MViewPane.setM(MViewPane.java:462)


at com.im.ijc.renderers.impl.StructureRenderer.getWidgetCellRendererComponent(StructureRenderer.java:250)


at com.im.ijc.renderers.impl.StructureRenderer.getTableCellRendererComponent(StructureRenderer.java:178)


at javax.swing.JTable.prepareRenderer(Unknown Source)


at javax.swing.plaf.basic.BasicTableUI.paintCell(Unknown Source)


at javax.swing.plaf.basic.BasicTableUI.paintCells(Unknown Source)


at javax.swing.plaf.basic.BasicTableUI.paint(Unknown Source)


at javax.swing.plaf.ComponentUI.update(Unknown Source)


at javax.swing.JComponent.paintComponent(Unknown Source)


at javax.swing.JComponent.paint(Unknown Source)


at javax.swing.JComponent._paintImmediately(Unknown Source)


at javax.swing.JComponent.paintImmediately(Unknown Source)


at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)


at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown Source)


at java.awt.event.InvocationEvent.dispatch(Unknown Source)


at java.awt.EventQueue.dispatchEvent(Unknown Source)


at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)


at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)


at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)


at java.awt.Dialog$1.run(Unknown Source)


at java.awt.Dialog$2.run(Unknown Source)


at java.security.AccessController.doPrivileged(Native Method)


at java.awt.Dialog.show(Unknown Source)


at javax.swing.JOptionPane.showOptionDialog(Unknown Source)


at chemaxon.marvin.common.swing.modules.ExceptionFrame.runErrorDialog(ExceptionFrame.java:136)


at chemaxon.marvin.common.swing.modules.ExceptionFrame.run(ExceptionFrame.java:114)


at java.awt.event.InvocationEvent.dispatch(Unknown Source)


at java.awt.EventQueue.dispatchEvent(Unknown Source)


at java.awt.EventDispatchThread.pumpOneEventForHierarchy(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)

ChemAxon e189db4705

24-07-2007 11:22:51

Hi,





if you want to delete all data and keep the table structure, then it's better to delete whole rows. There is a different action for deleting rows (see menu Data or toolbar). The action you used just removes the values from cells, but the empty rows are still in DB.


And that's another problem as your Jchem table doesn't allow empty structures so you cannot just delete cells it in this case.





I've improved a few actions names and added some more explanation to Delete selected data action confirmation dialog. I also added other delete actions to popup menu in gridview: there are now:


1. "Clear selected data" (originally called delete selected data,


2. "Delete row(s)" and


3. "Delete field(s)" (which means delete columns).





hope this helps.


Petr

User 677b9c22ff

27-07-2007 08:07:11

Hi,


thank you. I think I will just restart new DBs, with some


100k structures not a problem.


Tobias