2015-06-03 12:51:47.343 [in_5-pubsub] CachedPubSubRepository$NodeSaver.save() WARNING: Problem saving pubsub data:
tigase.pubsub.repository.RepositoryException: Node subscribers writing error
at tigase.pubsub.repository.PubSubDAOJDBC.updateNodeAffiliation(PubSubDAOJDBC.java:944)
at tigase.pubsub.repository.PubSubDAOJDBC.updateNodeAffiliation(PubSubDAOJDBC.java:59)
at tigase.pubsub.repository.PubSubDAOPool.updateNodeAffiliation(PubSubDAOPool.java:482)
at tigase.pubsub.repository.cached.CachedPubSubRepository$NodeSaver.save(CachedPubSubRepository.java:82)
at tigase.pubsub.repository.cached.CachedPubSubRepository$NodeSaver.save(CachedPubSubRepository.java:48)
at tigase.pubsub.repository.cached.CachedPubSubRepository.update(CachedPubSubRepository.java:692)
at tigase.pubsub.modules.SubscribeNodeModule.process(SubscribeNodeModule.java:265)
at tigase.component2.modules.ModulesManager.process(ModulesManager.java:114)
at tigase.component2.AbstractComponent.processStanzaPacket(AbstractComponent.java:248)
at tigase.component2.AbstractComponent.processPacket(AbstractComponent.java:236)
at tigase.pubsub.PubSubComponent.processPacket(PubSubComponent.java:635)
at tigase.pubsub.cluster.PubSubComponentClustered.processPacket(SourceFile:191)
at tigase.server.AbstractMessageReceiver$QueueListener.run(AbstractMessageReceiver.java:1431)
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '49-182' for key 'PRIMARY'
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
at com.mysql.jdbc.Util.getInstance(Util.java:381)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1038)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3563)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3495)
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:2693)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2102)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2261)
at com.mysql.jdbc.CallableStatement.executeQuery(CallableStatement.java:912)
at tigase.pubsub.repository.PubSubDAOJDBC.updateNodeAffiliation(PubSubDAOJDBC.java:931)
at tigase.pubsub.repository.PubSubDAOJDBC.updateNodeAffiliation(PubSubDAOJDBC.java:59)
at tigase.pubsub.repository.PubSubDAOPool.updateNodeAffiliation(PubSubDAOPool.java:482)
at tigase.pubsub.repository.cached.CachedPubSubRepository$NodeSaver.save(CachedPubSubRepository.java:82)
at tigase.pubsub.repository.cached.CachedPubSubRepository$NodeSaver.save(CachedPubSubRepository.java:48)
at tigase.pubsub.repository.cached.CachedPubSubRepository.update(CachedPubSubRepository.java:692)
at tigase.pubsub.modules.SubscribeNodeModule.process(SubscribeNodeModule.java:265)
at tigase.component2.modules.ModulesManager.process(ModulesManager.java:114)
at tigase.component2.AbstractComponent.processStanzaPacket(AbstractComponent.java:248)
at tigase.component2.AbstractComponent.processPacket(AbstractComponent.java:236)
at tigase.pubsub.PubSubComponent.processPacket(PubSubComponent.java:635)
at tigase.pubsub.cluster.PubSubComponentClustered.processPacket(SourceFile:191)
at tigase.server.AbstractMessageReceiver$QueueListener.run(AbstractMessageReceiver.java:1431)
tigase.pubsub.repository.RepositoryException: Problem saving pubsub data
at tigase.pubsub.repository.cached.CachedPubSubRepository$NodeSaver.save(CachedPubSubRepository.java:118)
at tigase.pubsub.repository.cached.CachedPubSubRepository$NodeSaver.save(CachedPubSubRepository.java:48)
at tigase.pubsub.repository.cached.CachedPubSubRepository.update(CachedPubSubRepository.java:692)
at tigase.pubsub.modules.SubscribeNodeModule.process(SubscribeNodeModule.java:265)
at tigase.component2.modules.ModulesManager.process(ModulesManager.java:114)
at tigase.component2.AbstractComponent.processStanzaPacket(AbstractComponent.java:248)
at tigase.component2.AbstractComponent.processPacket(AbstractComponent.java:236)
at tigase.pubsub.PubSubComponent.processPacket(PubSubComponent.java:635)
at tigase.pubsub.cluster.PubSubComponentClustered.processPacket(SourceFile:191)
at tigase.server.AbstractMessageReceiver$QueueListener.run(AbstractMessageReceiver.java:1431)
Caused by: tigase.pubsub.repository.RepositoryException: Node subscribers writing error
at tigase.pubsub.repository.PubSubDAOJDBC.updateNodeAffiliation(PubSubDAOJDBC.java:944)
at tigase.pubsub.repository.PubSubDAOJDBC.updateNodeAffiliation(PubSubDAOJDBC.java:59)
at tigase.pubsub.repository.PubSubDAOPool.updateNodeAffiliation(PubSubDAOPool.java:482)
at tigase.pubsub.repository.cached.CachedPubSubRepository$NodeSaver.save(CachedPubSubRepository.java:82)
... 9 more
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '49-182' for key 'PRIMARY'
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
at com.mysql.jdbc.Util.getInstance(Util.java:381)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1038)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3563)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3495)
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:2693)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2102)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2261)
at com.mysql.jdbc.CallableStatement.executeQuery(CallableStatement.java:912)
at tigase.pubsub.repository.PubSubDAOJDBC.updateNodeAffiliation(PubSubDAOJDBC.java:931)
... 12 more
wojciech.kapcia@tigase.net commented 9 years ago
Stored Procedures in MySQL are not executed in transactions by default, added transactions to solve the issue in the cluster.