Page 1 of 1

Exception bei null-Datenbankfeld

PostPosted: Fri Oct 30, 2009 12:19 pm
by stpa
Hallo,

ich bekomme folgende Exception wenn ich ein Datenbankfeld mit dem Inhalt "null" einem UIEditor zuweise und dann einen Text eingeben will

Code: Select all
Exception in thread "AWT-EventQueue-0" java.lang.IllegalStateException: Attempt to mutate in notification
   at javax.swing.text.AbstractDocument.writeLock(AbstractDocument.java:1323)
   at javax.swing.text.AbstractDocument.replace(AbstractDocument.java:644)
   at javax.swing.text.JTextComponent.setText(JTextComponent.java:1693)
   at com.sibvisions.rad.ui.swing.ext.celleditor.JVxTextCellEditor$CellEditorHandler.cancelEditing(JVxTextCellEditor.java:397)
   at com.sibvisions.rad.ui.swing.ext.JVxEditor.cancelEditing(JVxEditor.java:133)
   at com.sibvisions.rad.ui.swing.ext.JVxEditor.editingStarted(JVxEditor.java:197)
   at com.sibvisions.rad.ui.swing.ext.celleditor.JVxTextCellEditor$CellEditorHandler.fireEditingStarted(JVxTextCellEditor.java:582)
   at com.sibvisions.rad.ui.swing.ext.celleditor.JVxTextCellEditor$CellEditorHandler.insertUpdate(JVxTextCellEditor.java:438)
   at javax.swing.text.AbstractDocument.fireInsertUpdate(AbstractDocument.java:185)
   at javax.swing.text.AbstractDocument.handleInsertString(AbstractDocument.java:734)
   at javax.swing.text.AbstractDocument$DefaultFilterBypass.replace(AbstractDocument.java:3101)
   at com.sibvisions.rad.ui.swing.ext.celleditor.JVxTextCellEditor$CellEditorHandler.replaceAllowed(JVxTextCellEditor.java:619)
   at com.sibvisions.rad.ui.swing.ext.celleditor.JVxTextCellEditor$CellEditorHandler.access$100(JVxTextCellEditor.java:198)
   at com.sibvisions.rad.ui.swing.ext.celleditor.JVxTextCellEditor$CellEditorHandler$TextDocumentFilter.replace(JVxTextCellEditor.java:667)
   at javax.swing.text.AbstractDocument.replace(AbstractDocument.java:647)
   at javax.swing.text.JTextComponent.replaceSelection(JTextComponent.java:1351)
   at javax.swing.text.DefaultEditorKit$DefaultKeyTypedAction.actionPerformed(DefaultEditorKit.java:859)
   at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1636)
   at javax.swing.JComponent.processKeyBinding(JComponent.java:2851)
   at javax.swing.JComponent.processKeyBindings(JComponent.java:2886)
   at javax.swing.JComponent.processKeyEvent(JComponent.java:2814)
   at java.awt.Component.processEvent(Component.java:6040)
   at java.awt.Container.processEvent(Container.java:2041)
   at java.awt.Component.dispatchEventImpl(Component.java:4630)
   at java.awt.Container.dispatchEventImpl(Container.java:2099)
   at java.awt.Component.dispatchEvent(Component.java:4460)
   at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1848)
   at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:704)
   at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:969)
   at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:841)
   at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:668)
   at java.awt.Component.dispatchEventImpl(Component.java:4502)
   at java.awt.Container.dispatchEventImpl(Container.java:2099)
   at java.awt.Window.dispatchEventImpl(Window.java:2475)
   at java.awt.Component.dispatchEvent(Component.java:4460)
   at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
   at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)
   at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)
   at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)
   at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)
   at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

Re: Exception bei null-Datenbankfeld

PostPosted: Fri Oct 30, 2009 12:52 pm
by Support@SIB
Das Problem liegt am Update der Zeile und nicht daran das der Wert des Feldes null ist. Es ist schwierig das Problem zu bestimmen ohne Ihren Source Code zu sehen. Ggf. posten sie diesen!

Die Fehlerursache könnte sein, daß sie 2 mit Applikationen die auf dieselbe Datenzeile zugreifen und bei einer Applikation ist ein Fehler aufgetreten?

Von JVx 0.6 wird der auslösende Fehler nicht korrekt dargestellt. Das Problem war bereits bekannt und wird in der nächsten Release nicht mehr auftreten.

Grundsätzlich versucht jeder Editor beim ersten Tastendruck die Datenzeile zu locken um Transaktionssicherheit zu gewähren!