problème cloture caisse windows10 32bits

Répondre
ellinggton
Messages : 19
Enregistré le : mar. nov. 25, 2014 12:14 pm

mar. mars 08, 2016 7:09 pm

bonjour, je reproduis ici un bug bloquant pour la cloture de la caisse.

Précisions :
win 10 32bits
Oracle Java (et pas jdk)

Si quelqu'un a une idée de pourquoi ça plante...

Merci.
cdlt.

Code : Tout sélectionner

Une erreur est survenue pendant la clôture.

java.sql.SQLException: unable to insert SQLRowValues on /PIECE/ : {NOM=Ticket 0205031600005(class java.lang.String)} using {NOM=Ticket 0205031600005}
org.openconcerto.utils.ExceptionHandler: Une erreur est survenue pendant la clôture.
	at org.openconcerto.utils.ExceptionHandler.handle(ExceptionHandler.java:112)
	at org.openconcerto.utils.ExceptionHandler.handle(ExceptionHandler.java:116)
	at org.openconcerto.erp.core.sales.pos.Caisse.commitAll(Caisse.java:308)
	at org.openconcerto.erp.core.sales.pos.ui.CaisseMenuPanel.valueChanged(CaisseMenuPanel.java:107)
	at javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source)
	at javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source)
	at javax.swing.DefaultListSelectionModel.setValueIsAdjusting(Unknown Source)
	at javax.swing.JList.setValueIsAdjusting(Unknown Source)
	at javax.swing.plaf.basic.BasicListUI$Handler.mouseReleased(Unknown Source)
	at java.awt.AWTEventMulticaster.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.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$500(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue$4.run(Unknown Source)
	at java.awt.EventQueue$4.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(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)
Caused by: java.sql.SQLException: java.sql.SQLException: unable to insert SQLRowValues on /PIECE/ : {NOM=Ticket 0205031600005(class java.lang.String)} using {NOM=Ticket 0205031600005}
	at org.openconcerto.erp.core.sales.pos.Caisse$1.create(Caisse.java:272)
	at org.openconcerto.sql.utils.SQLUtils$1.handle(SQLUtils.java:80)
	at org.openconcerto.sql.utils.SQLUtils$2.handle(SQLUtils.java:147)
	at org.openconcerto.sql.model.ConnectionHandler.compute(ConnectionHandler.java:55)
	at org.openconcerto.sql.model.SQLDataSource.useConnection(SQLDataSource.java:844)
	at org.openconcerto.sql.model.SQLDataSource.useConnection(SQLDataSource.java:812)
	at org.openconcerto.sql.utils.SQLUtils.executeAtomic(SQLUtils.java:125)
	at org.openconcerto.sql.utils.SQLUtils.executeAtomic(SQLUtils.java:97)
	at org.openconcerto.sql.utils.SQLUtils.executeAtomic(SQLUtils.java:77)
	at org.openconcerto.erp.core.sales.pos.Caisse.commitAll(Caisse.java:152)
	... 38 more
Caused by: java.sql.SQLException: unable to insert SQLRowValues on /PIECE/ : {NOM=Ticket 0205031600005(class java.lang.String)} using {NOM=Ticket 0205031600005}
	at org.openconcerto.sql.model.SQLRowValues.insertJustThis(SQLRowValues.java:1758)
	at org.openconcerto.sql.model.SQLRowValuesCluster$Insert.execOn(SQLRowValuesCluster.java:1461)
	at org.openconcerto.sql.model.SQLRowValuesCluster$Node.store(SQLRowValuesCluster.java:1373)
	at org.openconcerto.sql.model.SQLRowValuesCluster$Node.access$3(SQLRowValuesCluster.java:1371)
	at org.openconcerto.sql.model.SQLRowValuesCluster$2.handle(SQLRowValuesCluster.java:450)
	at org.openconcerto.sql.model.SQLRowValuesCluster$2.handle(SQLRowValuesCluster.java:1)
	at org.openconcerto.sql.utils.SQLUtils$2.handle(SQLUtils.java:147)
	at org.openconcerto.sql.model.ConnectionHandler.compute(ConnectionHandler.java:55)
	at org.openconcerto.sql.model.SQLDataSource.useConnection(SQLDataSource.java:844)
	at org.openconcerto.sql.model.SQLDataSource.useConnection(SQLDataSource.java:812)
	at org.openconcerto.sql.utils.SQLUtils.executeAtomic(SQLUtils.java:125)
	at org.openconcerto.sql.model.SQLRowValuesCluster.store(SQLRowValuesCluster.java:417)
	at org.openconcerto.sql.model.SQLRowValuesCluster.store(SQLRowValuesCluster.java:367)
	at org.openconcerto.sql.model.SQLRowValues.insert(SQLRowValues.java:1729)
	at org.openconcerto.sql.model.SQLRowValues.insert(SQLRowValues.java:1713)
	at org.openconcerto.erp.generationEcritures.GenerationEcritures.getNewMouvement(GenerationEcritures.java:355)
	at org.openconcerto.erp.generationEcritures.GenerationEcritures.getNewMouvement(GenerationEcritures.java:364)
	at org.openconcerto.erp.generationEcritures.GenerationMvtTicketCaisse$1.call(GenerationMvtTicketCaisse.java:77)
	at org.openconcerto.erp.generationEcritures.GenerationMvtTicketCaisse$1.call(GenerationMvtTicketCaisse.java:1)
	at org.openconcerto.erp.core.sales.pos.Caisse$1.create(Caisse.java:244)
	... 47 more
Caused by: java.sql.SQLException: Unable to insert prep13: INSERT INTO "OpenConcerto"."OpenConcerto48"."PIECE" ("MODIFICATION_DATE", "ID_USER_COMMON_MODIFY", "CREATION_DATE", "ID_USER_COMMON_CREATE", "NOM", "ORDRE") select ?, ?, ?, ?, ?, COALESCE(MAX("ORDRE"), 0) + 1 FROM "OpenConcerto"."OpenConcerto48"."PIECE" {1: TIMESTAMP '2016-03-08 19:33:14.995', 2: 17, 3: TIMESTAMP '2016-03-08 19:33:14.995', 4: 17, 5: 'Ticket 0205031600005'}
	at org.openconcerto.sql.model.SQLRowValues$6.handle(SQLRowValues.java:1746)
	at org.openconcerto.sql.model.SQLRowValues$6.handle(SQLRowValues.java:1)
	at org.openconcerto.sql.model.ConnectionHandler.compute(ConnectionHandler.java:55)
	at org.openconcerto.sql.model.SQLDataSource.useConnection(SQLDataSource.java:844)
	at org.openconcerto.sql.model.SQLDataSource.useConnection(SQLDataSource.java:812)
	at org.openconcerto.sql.model.SQLRowValues.insertJustThis(SQLRowValues.java:1736)
	... 66 more
Caused by: org.h2.jdbc.JdbcSQLException: Unique index or primary key violation: "PRIMARY KEY ON ""OpenConcerto48"".PIECE(ID)"; SQL statement:
INSERT INTO "OpenConcerto"."OpenConcerto48"."PIECE" ("MODIFICATION_DATE", "ID_USER_COMMON_MODIFY", "CREATION_DATE", "ID_USER_COMMON_CREATE", "NOM", "ORDRE") select ?, ?, ?, ?, ?, COALESCE(MAX("ORDRE"), 0) + 1 FROM "OpenConcerto"."OpenConcerto48"."PIECE" [23505-175]
	at org.h2.message.DbException.getJdbcSQLException(DbException.java:332)
	at org.h2.message.DbException.get(DbException.java:172)
	at org.h2.message.DbException.get(DbException.java:149)
	at org.h2.index.PageDataIndex.getNewDuplicateKeyException(PageDataIndex.java:165)
	at org.h2.index.PageDataIndex.add(PageDataIndex.java:143)
	at org.h2.table.RegularTable.addRow(RegularTable.java:119)
	at org.h2.command.dml.Insert.addRow(Insert.java:199)
	at org.h2.command.dml.Insert.insertRows(Insert.java:173)
	at org.h2.command.dml.Insert.update(Insert.java:115)
	at org.h2.command.CommandContainer.update(CommandContainer.java:79)
	at org.h2.command.Command.executeUpdate(Command.java:253)
	at org.h2.jdbc.JdbcPreparedStatement.execute(JdbcPreparedStatement.java:193)
	at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
	at org.openconcerto.sql.model.SQLRowValues.insert(SQLRowValues.java:2191)
	at org.openconcerto.sql.model.SQLRowValues$6.handle(SQLRowValues.java:1741)
	... 71 more
Avatar du membre
guillaume
Messages : 2437
Enregistré le : ven. févr. 11, 2011 7:15 pm

mer. mars 09, 2016 10:55 am

Bonjour,

Il ne s'agit pas d'un problème de paramétrage.
Dans vos pièces comptables, il y a déjà une pièce 'Ticket 0205031600005' -> caisse 2, au 5/3/2016, ticket numéro 5
Cela peut se produire si vous avez 2 caisses avec le même numéro de caisse (ici 2).
Modifiez le nom de la pièce en double et vérifiez la configuration de vos caisses...

Cordialement,
Directeur technique d'OpenConcerto qui dans son temps libre s'occupe du forum.
Pour une assistance pro, nous sommes joignables à ILM Informatique contre quelques jetons.
Pensez aussi à lire le manuel !
ellinggton
Messages : 19
Enregistré le : mar. nov. 25, 2014 12:14 pm

mer. mars 09, 2016 7:24 pm

justement, c'est ça qui bloque : il n'y a qu'une seule caisse.

et pour en être sûr, j'ai viré tous les tickets de caisse, relancer la caisse, fait une fermeture sans saisir de tickets, aucun souci. j'ai relancé, fait un ticket, cloturé, et voilà :

Code : Tout sélectionner

Une erreur est survenue pendant la clôture.

java.sql.SQLException: unable to insert SQLRowValues on /PIECE/ : {NOM=Ticket 0209031600001(class java.lang.String)} using {NOM=Ticket 0209031600001}
org.openconcerto.utils.ExceptionHandler: Une erreur est survenue pendant la clôture.
	at org.openconcerto.utils.ExceptionHandler.handle(ExceptionHandler.java:112)
	at org.openconcerto.utils.ExceptionHandler.handle(ExceptionHandler.java:116)
	at org.openconcerto.erp.core.sales.pos.Caisse.commitAll(Caisse.java:308)
	at org.openconcerto.erp.core.sales.pos.ui.CaisseMenuPanel.valueChanged(CaisseMenuPanel.java:107)
	at javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source)
	at javax.swing.DefaultListSelectionModel.fireValueChanged(Unknown Source)
	at javax.swing.DefaultListSelectionModel.setValueIsAdjusting(Unknown Source)
	at javax.swing.JList.setValueIsAdjusting(Unknown Source)
	at javax.swing.plaf.basic.BasicListUI$Handler.mouseReleased(Unknown Source)
	at java.awt.AWTEventMulticaster.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.dispatchEventImpl(Unknown Source)
	at java.awt.EventQueue.access$500(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.awt.EventQueue$3.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.awt.EventQueue$4.run(Unknown Source)
	at java.awt.EventQueue$4.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(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)
Caused by: java.sql.SQLException: java.sql.SQLException: unable to insert SQLRowValues on /PIECE/ : {NOM=Ticket 0209031600001(class java.lang.String)} using {NOM=Ticket 0209031600001}
	at org.openconcerto.erp.core.sales.pos.Caisse$1.create(Caisse.java:272)
	at org.openconcerto.sql.utils.SQLUtils$1.handle(SQLUtils.java:80)
	at org.openconcerto.sql.utils.SQLUtils$2.handle(SQLUtils.java:147)
	at org.openconcerto.sql.model.ConnectionHandler.compute(ConnectionHandler.java:55)
	at org.openconcerto.sql.model.SQLDataSource.useConnection(SQLDataSource.java:844)
	at org.openconcerto.sql.model.SQLDataSource.useConnection(SQLDataSource.java:812)
	at org.openconcerto.sql.utils.SQLUtils.executeAtomic(SQLUtils.java:125)
	at org.openconcerto.sql.utils.SQLUtils.executeAtomic(SQLUtils.java:97)
	at org.openconcerto.sql.utils.SQLUtils.executeAtomic(SQLUtils.java:77)
	at org.openconcerto.erp.core.sales.pos.Caisse.commitAll(Caisse.java:152)
	... 38 more
Caused by: java.sql.SQLException: unable to insert SQLRowValues on /PIECE/ : {NOM=Ticket 0209031600001(class java.lang.String)} using {NOM=Ticket 0209031600001}
	at org.openconcerto.sql.model.SQLRowValues.insertJustThis(SQLRowValues.java:1758)
	at org.openconcerto.sql.model.SQLRowValuesCluster$Insert.execOn(SQLRowValuesCluster.java:1461)
	at org.openconcerto.sql.model.SQLRowValuesCluster$Node.store(SQLRowValuesCluster.java:1373)
	at org.openconcerto.sql.model.SQLRowValuesCluster$Node.access$3(SQLRowValuesCluster.java:1371)
	at org.openconcerto.sql.model.SQLRowValuesCluster$2.handle(SQLRowValuesCluster.java:450)
	at org.openconcerto.sql.model.SQLRowValuesCluster$2.handle(SQLRowValuesCluster.java:1)
	at org.openconcerto.sql.utils.SQLUtils$2.handle(SQLUtils.java:147)
	at org.openconcerto.sql.model.ConnectionHandler.compute(ConnectionHandler.java:55)
	at org.openconcerto.sql.model.SQLDataSource.useConnection(SQLDataSource.java:844)
	at org.openconcerto.sql.model.SQLDataSource.useConnection(SQLDataSource.java:812)
	at org.openconcerto.sql.utils.SQLUtils.executeAtomic(SQLUtils.java:125)
	at org.openconcerto.sql.model.SQLRowValuesCluster.store(SQLRowValuesCluster.java:417)
	at org.openconcerto.sql.model.SQLRowValuesCluster.store(SQLRowValuesCluster.java:367)
	at org.openconcerto.sql.model.SQLRowValues.insert(SQLRowValues.java:1729)
	at org.openconcerto.sql.model.SQLRowValues.insert(SQLRowValues.java:1713)
	at org.openconcerto.erp.generationEcritures.GenerationEcritures.getNewMouvement(GenerationEcritures.java:355)
	at org.openconcerto.erp.generationEcritures.GenerationEcritures.getNewMouvement(GenerationEcritures.java:364)
	at org.openconcerto.erp.generationEcritures.GenerationMvtTicketCaisse$1.call(GenerationMvtTicketCaisse.java:77)
	at org.openconcerto.erp.generationEcritures.GenerationMvtTicketCaisse$1.call(GenerationMvtTicketCaisse.java:1)
	at org.openconcerto.erp.core.sales.pos.Caisse$1.create(Caisse.java:244)
	... 47 more
Caused by: java.sql.SQLException: Unable to insert prep15: INSERT INTO "OpenConcerto"."OpenConcerto48"."PIECE" ("MODIFICATION_DATE", "ID_USER_COMMON_MODIFY", "CREATION_DATE", "ID_USER_COMMON_CREATE", "NOM", "ORDRE") select ?, ?, ?, ?, ?, COALESCE(MAX("ORDRE"), 0) + 1 FROM "OpenConcerto"."OpenConcerto48"."PIECE" {1: TIMESTAMP '2016-03-09 20:20:09.159', 2: 17, 3: TIMESTAMP '2016-03-09 20:20:09.159', 4: 17, 5: 'Ticket 0209031600001'}
	at org.openconcerto.sql.model.SQLRowValues$6.handle(SQLRowValues.java:1746)
	at org.openconcerto.sql.model.SQLRowValues$6.handle(SQLRowValues.java:1)
	at org.openconcerto.sql.model.ConnectionHandler.compute(ConnectionHandler.java:55)
	at org.openconcerto.sql.model.SQLDataSource.useConnection(SQLDataSource.java:844)
	at org.openconcerto.sql.model.SQLDataSource.useConnection(SQLDataSource.java:812)
	at org.openconcerto.sql.model.SQLRowValues.insertJustThis(SQLRowValues.java:1736)
	... 66 more
Caused by: org.h2.jdbc.JdbcSQLException: Unique index or primary key violation: "PRIMARY KEY ON ""OpenConcerto48"".PIECE(ID)"; SQL statement:
INSERT INTO "OpenConcerto"."OpenConcerto48"."PIECE" ("MODIFICATION_DATE", "ID_USER_COMMON_MODIFY", "CREATION_DATE", "ID_USER_COMMON_CREATE", "NOM", "ORDRE") select ?, ?, ?, ?, ?, COALESCE(MAX("ORDRE"), 0) + 1 FROM "OpenConcerto"."OpenConcerto48"."PIECE" [23505-175]
	at org.h2.message.DbException.getJdbcSQLException(DbException.java:332)
	at org.h2.message.DbException.get(DbException.java:172)
	at org.h2.message.DbException.get(DbException.java:149)
	at org.h2.index.PageDataIndex.getNewDuplicateKeyException(PageDataIndex.java:165)
	at org.h2.index.PageDataIndex.add(PageDataIndex.java:143)
	at org.h2.table.RegularTable.addRow(RegularTable.java:119)
	at org.h2.command.dml.Insert.addRow(Insert.java:199)
	at org.h2.command.dml.Insert.insertRows(Insert.java:173)
	at org.h2.command.dml.Insert.update(Insert.java:115)
	at org.h2.command.CommandContainer.update(CommandContainer.java:79)
	at org.h2.command.Command.executeUpdate(Command.java:253)
	at org.h2.jdbc.JdbcPreparedStatement.execute(JdbcPreparedStatement.java:193)
	at org.apache.commons.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
	at org.openconcerto.sql.model.SQLRowValues.insert(SQLRowValues.java:2191)
	at org.openconcerto.sql.model.SQLRowValues$6.handle(SQLRowValues.java:1741)
	... 71 more
Donc bon... Je n'en sais pas plus, désolé.
ludovic
Messages : 265
Enregistré le : ven. avr. 15, 2011 2:32 pm

jeu. mars 10, 2016 7:58 am

Bonjour,

Vous avez une violation d'unicité de la clé primaire sur la table "OpenConcerto48"."PIECE". Il faut corriger la séquence associée via la console H2.
http://www.openconcerto.org/forum/viewt ... f=9&t=1041

Cordialement,
Ludovic.
Répondre