5 Nisan 2013 Cuma



Merhaba arkadaşlar,

Bu makalede mysql kullanıcılarının pek sık karşılaşmadığı bir Exception(istisna)'dan bahsetmek istiyorum... Hatayı biraz daha Türkçe'leştirmek gerekirse productUnit kolonunda belirtilen sınırın aşıldığı anlaşılmaktadır. Yani kolonun veri tipi integer ise integer için belirlenen maximum aralık aşılmıştır... Bazı makalelerde sorunun aşılması için jdbc.Driver değişikliği hatayı kısa vadeli çözse de, asıl çözüm kolon için daha önceden belirlemiş olduğunuz veri tipi ile alakalıdır. Belli ki bu veri tipi bu kolona girilmek istenen değer için yeterli değildir.. Bunun için daha büyük veri saklayabilecek veri tipleri kullanmak gerekmektedir. Mesela tinyint yerine int veri tipinin kullanılması gibi örnekler verebilirim.



com.mysql.jdbc.MysqlDataTruncation: Data truncation: Out of range value for column 'productUnit' at row 1 at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3564) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3498) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1959) at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2113) at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2568) at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2113) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2409) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2327) at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2312) at barcode.PurchasePart.UrunSatisDatabase(PurchasePart.java:454) at barcode.PurchasePart.UrunSatis(PurchasePart.java:821) at barcode.PurchasePart.BarcodeControl(PurchasePart.java:264) at barcode.PurchasePart.jTextField1ActionPerformed(PurchasePart.java:3123) at barcode.PurchasePart.access$200(PurchasePart.java:61) at barcode.PurchasePart$3.actionPerformed(PurchasePart.java:2246) at javax.swing.JTextField.fireActionPerformed(JTextField.java:492) at javax.swing.JTextField.postActionEvent(JTextField.java:705) at javax.swing.JTextField$NotifyAction.actionPerformed(JTextField.java:820) at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1639) 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:6065) at java.awt.Container.processEvent(Container.java:2041) at java.awt.Component.dispatchEventImpl(Component.java:4651) at java.awt.Container.dispatchEventImpl(Container.java:2099) at java.awt.Component.dispatchEvent(Component.java:4481) at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1850) at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:712) at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:990) at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:855) at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:676) at java.awt.Component.dispatchEventImpl(Component.java:4523) at java.awt.Container.dispatchEventImpl(Container.java:2099) at java.awt.Window.dispatchEventImpl(Window.java:2478) at java.awt.Component.dispatchEvent(Component.java:4481) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:643) at java.awt.EventQueue.access$000(EventQueue.java:84) at java.awt.EventQueue$1.run(EventQueue.java:602) at java.awt.EventQueue$1.run(EventQueue.java:600) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87) at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:98) at java.awt.EventQueue$2.run(EventQueue.java:616) at java.awt.EventQueue$2.run(EventQueue.java:614) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87) at java.awt.EventQueue.dispatchEvent(EventQueue.java:613) 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)

0 yorum :

Yorum Gönder