Projects tigase _server server-core Issues #374
Exceptions in initialization of JDBCMsgRepository on DerbyDB (#374)
Closed
Andrzej Wójcik (Tigase) opened 10 years ago
Due Date
2014-10-06

After recent changes new version fails of Tigase XMPP Server fails to initialize instance of JDBCMsgRepository if DerbyDB is used as a database.

2014-10-06 18:32:53.975 [main]             VHostManager.setProperties()       WARNING:  {coffeebean.local=Domain: coffeebean.local, enabled: true, anonym: true, register: true, maxusers: 0, tls: false, s2sSecret: a037e17b-1a68-40c2-9ece-fdaf75ab204c, domainFilter: ALL, c2sPortsAllowed: null, saslAllowedMechanisms: null}
2014-10-06 18:32:54.265 [main]             JDBCMsgRepository.initRepository()  WARNING: MsgRepository not initialized due to exception
java.sql.SQLSyntaxErrorException: Syntax error: Encountered ")" at line 1, column 82.
	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.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.EmbedPreparedStatement20.<init>(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedPreparedStatement40.<init>(Unknown Source)
	at org.apache.derby.jdbc.Driver40.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:515)
	at tigase.db.jdbc.DataRepositoryImpl.initStatement(DataRepositoryImpl.java:464)
	at tigase.db.jdbc.DataRepositoryImpl.initPreparedStatement(DataRepositoryImpl.java:251)
	at tigase.db.DataRepositoryPool.initPreparedStatement(DataRepositoryPool.java:222)
	at tigase.server.amp.JDBCMsgRepository.initRepository(JDBCMsgRepository.java:376)
	at tigase.server.amp.action.Store.setProperties(Store.java:227)
	at tigase.server.amp.AmpComponent.setProperties(AmpComponent.java:331)
	at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:580)
	at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:183)
	at tigase.conf.Configurator.componentAdded(Configurator.java:50)
	at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:1)
	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:807)
	at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:580)
	at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:183)
	at tigase.conf.Configurator.componentAdded(Configurator.java:50)
	at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:1)
	at tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java:116)
	at tigase.server.MessageRouter.addRegistrator(MessageRouter.java:131)
	at tigase.server.MessageRouter.setConfig(MessageRouter.java:700)
	at tigase.server.XMPPServer.start(XMPPServer.java:142)
	at tigase.server.XMPPServer.main(XMPPServer.java:112)
Caused by: java.sql.SQLException: Syntax error: Encountered ")" at line 1, column 82.
	at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.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.EmbedPreparedStatement20.<init>(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedPreparedStatement40.<init>(Unknown Source)
	at org.apache.derby.jdbc.Driver40.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:515)
	at tigase.db.jdbc.DataRepositoryImpl.initStatement(DataRepositoryImpl.java:464)
	at tigase.db.jdbc.DataRepositoryImpl.initPreparedStatement(DataRepositoryImpl.java:251)
	at tigase.db.DataRepositoryPool.initPreparedStatement(DataRepositoryPool.java:222)
	at tigase.server.amp.JDBCMsgRepository.initRepository(JDBCMsgRepository.java:376)
	at tigase.server.amp.action.Store.setProperties(Store.java:227)
	at tigase.server.amp.AmpComponent.setProperties(AmpComponent.java:331)
	at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:580)
	at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:183)
	at tigase.conf.Configurator.componentAdded(Configurator.java:50)
	at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:1)
	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:807)
	at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:580)
	at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:183)
	at tigase.conf.Configurator.componentAdded(Configurator.java:50)
	at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:1)
	at tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java:116)
	at tigase.server.MessageRouter.addRegistrator(MessageRouter.java:131)
	at tigase.server.MessageRouter.setConfig(MessageRouter.java:700)
	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 82.
	at org.apache.derby.iapi.error.StandardException.newException(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.EmbedPreparedStatement20.<init>(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedPreparedStatement30.<init>(Unknown Source)
	at org.apache.derby.impl.jdbc.EmbedPreparedStatement40.<init>(Unknown Source)
	at org.apache.derby.jdbc.Driver40.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:515)
	at tigase.db.jdbc.DataRepositoryImpl.initStatement(DataRepositoryImpl.java:464)
	at tigase.db.jdbc.DataRepositoryImpl.initPreparedStatement(DataRepositoryImpl.java:251)
	at tigase.db.DataRepositoryPool.initPreparedStatement(DataRepositoryPool.java:222)
	at tigase.server.amp.JDBCMsgRepository.initRepository(JDBCMsgRepository.java:376)
	at tigase.server.amp.action.Store.setProperties(Store.java:227)
	at tigase.server.amp.AmpComponent.setProperties(AmpComponent.java:331)
	at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:580)
	at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:183)
	at tigase.conf.Configurator.componentAdded(Configurator.java:50)
	at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:1)
	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:807)
	at tigase.conf.ConfiguratorAbstract.setup(ConfiguratorAbstract.java:580)
	at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:183)
	at tigase.conf.Configurator.componentAdded(Configurator.java:50)
	at tigase.conf.ConfiguratorAbstract.componentAdded(ConfiguratorAbstract.java:1)
	at tigase.server.AbstractComponentRegistrator.addComponent(AbstractComponentRegistrator.java:116)
	at tigase.server.MessageRouter.addRegistrator(MessageRouter.java:131)
	at tigase.server.MessageRouter.setConfig(MessageRouter.java:700)
	at tigase.server.XMPPServer.start(XMPPServer.java:142)
	at tigase.server.XMPPServer.main(XMPPServer.java:112)
Loading component: amp :: componentInfo{Class=tigase.server.amp.AmpComponent}
Loading component: bosh :: componentInfo{Class=tigase.server.bosh.BoshConnectionManager}
Loading component: c2s :: componentInfo{Class=tigase.server.xmppclient.ClientConnectionManager}
Loading component: monitor :: componentInfo{Class=tigase.server.monitor.MonitorComponent}
Loading component: pubsub :: componentInfo{Class=tigase.pubsub.PubSubComponent}
Loading component: s2s :: componentInfo{Class=tigase.server.xmppserver.S2SConnectionManager}
Andrzej Wójcik (Tigase) commented 10 years ago

I fixed issue by providing custom support for DerbyDB in JDBCMsgRepository.

Bartek, please verify this issue as you brought it up to my attention.

Bartosz Małkowski commented 10 years ago

Works

issue 1 of 1
Type
Bug
Priority
Normal
Assignee
RedmineID
2325
Version
tigase-server-7.0.0
Spent time
15h
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#374
Please wait...
Page is in error, reload to recover