Projects tigase _server server-core Issues #563
Tigase unable to write component users to database (#563)
Closed
Daniel Wisnewski opened 9 years ago

Fresh install (default config) of b3995 has multiple errors on start when attempting to write to database.

2015-09-03 09:08:25.843 [main]             UserRepoRepository.setProperties()  SEVERE:  Problem with adding 'tigase-monitor' user to the database
tigase.db.TigaseDBException: Error adding user to repository: 
	at tigase.db.jdbc.JDBCRepository.addUser(JDBCRepository.java:211)
	at tigase.db.UserRepositoryMDImpl.addUser(UserRepositoryMDImpl.java:87)
	at tigase.db.comp.UserRepoRepository.setProperties(UserRepoRepository.java:200)
	at tigase.monitor.MonitorComponent.setProperties(MonitorComponent.java:135)
	at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:540)
	at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:177)
	at tigase.conf.Configurator.componentAdded(Configurator.java:50)
	at tigase.conf.Configurator.componentAdded(Configurator.java:33)
	at tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java:116)
	at tigase.server.MessageRouter.addComponent(MessageRouter.java:108)
	at tigase.server.MessageRouter.addRouter(MessageRouter.java:145)
	at tigase.server.MessageRouter.setProperties(MessageRouter.java:698)
	at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:540)
	at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:177)
	at tigase.conf.Configurator.componentAdded(Configurator.java:50)
	at tigase.conf.Configurator.componentAdded(Configurator.java:33)
	at tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java:116)
	at tigase.server.MessageRouter.addRegistrator(MessageRouter.java:131)
	at tigase.server.MessageRouter.setConfig(MessageRouter.java:597)
	at tigase.server.XMPPServer.start(XMPPServer.java:142)
	at tigase.server.XMPPServer.main(XMPPServer.java:112)
Caused by: java.sql.SQLException: Statement.executeQuery() cannot be called with a statement that returns a row count.
	at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
	at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
	at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
	at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
	at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedCallableStatement.executeStatement(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeQuery(Unknown Source)
	at tigase.db.jdbc.JDBCRepository.addUserRepo(JDBCRepository.java:965)
	at tigase.db.jdbc.JDBCRepository.addUser(JDBCRepository.java:209)
	at tigase.db.UserRepositoryMDImpl.addUser(UserRepositoryMDImpl.java:87)
	at tigase.db.comp.UserRepoRepository.setProperties(UserRepoRepository.java:200)
	at tigase.monitor.MonitorComponent.setProperties(MonitorComponent.java:135)
	at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:540)
	at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:177)
	at tigase.conf.Configurator.componentAdded(Configurator.java:50)
	at tigase.conf.Configurator.componentAdded(Configurator.java:33)
	at tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java:116)
	at tigase.server.MessageRouter.addComponent(MessageRouter.java:108)
	at tigase.server.MessageRouter.addRouter(MessageRouter.java:145)
	at tigase.server.MessageRouter.setProperties(MessageRouter.java:698)
	at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:540)
	at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:177)
	at tigase.conf.Configurator.componentAdded(Configurator.java:50)
	at tigase.conf.Configurator.componentAdded(Configurator.java:33)
	at tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java:116)
	at tigase.server.MessageRouter.addRegistrator(MessageRouter.java:131)
	at tigase.server.MessageRouter.setConfig(MessageRouter.java:597)
	at tigase.server.XMPPServer.start(XMPPServer.java:142)
	at tigase.server.XMPPServer.main(XMPPServer.java:112)
Caused by: ERROR X0Y78: Statement.executeQuery() cannot be called with a statement that returns a row count.
	at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
	at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedCallableStatement.executeStatement(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeQuery(Unknown Source)
	at tigase.db.jdbc.JDBCRepository.addUserRepo(JDBCRepository.java:965)
	at tigase.db.jdbc.JDBCRepository.addUser(JDBCRepository.java:209)
	at tigase.db.UserRepositoryMDImpl.addUser(UserRepositoryMDImpl.java:87)
	at tigase.db.comp.UserRepoRepository.setProperties(UserRepoRepository.java:200)
	at tigase.monitor.MonitorComponent.setProperties(MonitorComponent.java:135)
	at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:540)
	at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:177)
	at tigase.conf.Configurator.componentAdded(Configurator.java:50)
	at tigase.conf.Configurator.componentAdded(Configurator.java:33)
	at tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java:116)
	at tigase.server.MessageRouter.addComponent(MessageRouter.java:108)
	at tigase.server.MessageRouter.addRouter(MessageRouter.java:145)
	at tigase.server.MessageRouter.setProperties(MessageRouter.java:698)
	at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:540)
	at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:177)
	at tigase.conf.Configurator.componentAdded(Configurator.java:50)
	at tigase.conf.Configurator.componentAdded(Configurator.java:33)
	at tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java:116)
	at tigase.server.MessageRouter.addRegistrator(MessageRouter.java:131)
	at tigase.server.MessageRouter.setConfig(MessageRouter.java:597)
	at tigase.server.XMPPServer.start(XMPPServer.java:142)
	at tigase.server.XMPPServer.main(XMPPServer.java:112)

Error occurs the same with following users; vhost-manager, rest@rest, dns-webservice@rest, server@rest, setup@rest, ui@rest, admin@rest

Possibly related, also receive this error on startup

2015-09-03 09:08:25.728 [main]             JDBCMessageArchiveRepository.initRepository()  WARNING: MessageArchiveDB initialization exception
java.sql.SQLSyntaxErrorException: Syntax error: Encountered ")" at line 1, column 348.
	at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
	at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
	at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
	at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
	at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedPreparedStatement42.<init>(Unknown Source)
	at org.apache.derby.jdbc.Driver42.newEmbedPreparedStatement(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
	at tigase.db.jdbc.DataRepositoryImpl.prepareQuery(DataRepositoryImpl.java:457)
	at tigase.db.jdbc.DataRepositoryImpl.initStatement(DataRepositoryImpl.java:406)
	at tigase.db.jdbc.DataRepositoryImpl.initPreparedStatement(DataRepositoryImpl.java:210)
	at tigase.db.DataRepositoryPool.initPreparedStatement(DataRepositoryPool.java:170)
	at tigase.archive.db.JDBCMessageArchiveRepository.initPreparedStatements(JDBCMessageArchiveRepository.java:588)
	at tigase.archive.db.JDBCMessageArchiveRepository.initRepository(JDBCMessageArchiveRepository.java:533)
	at tigase.archive.MessageArchiveComponent.setProperties(MessageArchiveComponent.java:216)
	at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:540)
	at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:177)
	at tigase.conf.Configurator.componentAdded(Configurator.java:50)
	at tigase.conf.Configurator.componentAdded(Configurator.java:33)
	at tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java:116)
	at tigase.server.MessageRouter.addComponent(MessageRouter.java:108)
	at tigase.server.MessageRouter.addRouter(MessageRouter.java:145)
	at tigase.server.MessageRouter.setProperties(MessageRouter.java:698)
	at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:540)
	at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:177)
	at tigase.conf.Configurator.componentAdded(Configurator.java:50)
	at tigase.conf.Configurator.componentAdded(Configurator.java:33)
	at tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java:116)
	at tigase.server.MessageRouter.addRegistrator(MessageRouter.java:131)
	at tigase.server.MessageRouter.setConfig(MessageRouter.java:597)
	at tigase.server.XMPPServer.start(XMPPServer.java:142)
	at tigase.server.XMPPServer.main(XMPPServer.java:112)
Caused by: ERROR 42X01: Syntax error: Encountered ")" at line 1, column 348.
	at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
	at org.apache.derby.iapi.error.StandardException.newException(Unknown Source)
	at org.apache.derby.impl.sql.compile.ParserImpl.parseStatementOrSearchCondition(Unknown Source)
	at org.apache.derby.impl.sql.compile.ParserImpl.parseStatement(Unknown Source)
	at org.apache.derby.impl.sql.GenericStatement.prepMinion(Unknown Source)
	at org.apache.derby.impl.sql.GenericStatement.prepare(Unknown Source)
	at org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.prepareInternalStatement(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedPreparedStatement.<init>(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedPreparedStatement42.<init>(Unknown Source)
	at org.apache.derby.jdbc.Driver42.newEmbedPreparedStatement(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedConnection.prepareStatement(Unknown Source)
	at tigase.db.jdbc.DataRepositoryImpl.prepareQuery(DataRepositoryImpl.java:457)
	at tigase.db.jdbc.DataRepositoryImpl.initStatement(DataRepositoryImpl.java:406)
	at tigase.db.jdbc.DataRepositoryImpl.initPreparedStatement(DataRepositoryImpl.java:210)
	at tigase.db.DataRepositoryPool.initPreparedStatement(DataRepositoryPool.java:170)
	at tigase.archive.db.JDBCMessageArchiveRepository.initPreparedStatements(JDBCMessageArchiveRepository.java:588)
	at tigase.archive.db.JDBCMessageArchiveRepository.initRepository(JDBCMessageArchiveRepository.java:533)
	at tigase.archive.MessageArchiveComponent.setProperties(MessageArchiveComponent.java:216)
	at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:540)
	at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:177)
	at tigase.conf.Configurator.componentAdded(Configurator.java:50)
	at tigase.conf.Configurator.componentAdded(Configurator.java:33)
	at tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java:116)
	at tigase.server.MessageRouter.addComponent(MessageRouter.java:108)
	at tigase.server.MessageRouter.addRouter(MessageRouter.java:145)
	at tigase.server.MessageRouter.setProperties(MessageRouter.java:698)
	at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:540)
	at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:177)
	at tigase.conf.Configurator.componentAdded(Configurator.java:50)
	at tigase.conf.Configurator.componentAdded(Configurator.java:33)
	at tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java:116)
	at tigase.server.MessageRouter.addRegistrator(MessageRouter.java:131)
	at tigase.server.MessageRouter.setConfig(MessageRouter.java:597)
	at tigase.server.XMPPServer.start(XMPPServer.java:142)
	at tigase.server.XMPPServer.main(XMPPServer.java:112)

errors come from default config from installer, no custom changes made. Full tigase-console.log attached.

Possibly related to issue #3402

tigase-console.log

Daniel Wisnewski commented 9 years ago

b3988 is the last build to not have these errors, b3990 (2015-08-28) is the first.

Daniel Wisnewski commented 9 years ago

Issue resolved with #3386 being fixed and closed. Closing issue.

issue 1 of 1
Type
Bug
Priority
Major
Assignee
RedmineID
3481
Spent time
13h 48m
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#563
Please wait...
Page is in error, reload to recover