Project

General

Profile

SQL exception during Tigase 7.0.0 startup

Gianluca Lorenzin
Added almost 4 years ago

Hi,

during tigase initialization there are follow exceptions:

java.sql.SQLSyntaxErrorException: Syntax error: Encountered ";" at line 1, column 50.
    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.EmbedStatement.execute(Unknown Source)
    at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
    at tigase.server.amp.JDBCMsgRepository.checkDB(JDBCMsgRepository.java:970)
    at tigase.server.amp.JDBCMsgRepository.initRepository(JDBCMsgRepository.java:362)
    at tigase.server.amp.action.Store.setProperties(Store.java:190)
    at tigase.server.amp.AmpComponent.setProperties(AmpComponent.java:259)
    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:704)
    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:603)
    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 50.
    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.EmbedStatement.execute(Unknown Source)
    at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
    at tigase.server.amp.JDBCMsgRepository.checkDB(JDBCMsgRepository.java:970)
    at tigase.server.amp.JDBCMsgRepository.initRepository(JDBCMsgRepository.java:362)
    at tigase.server.amp.action.Store.setProperties(Store.java:190)
    at tigase.server.amp.AmpComponent.setProperties(AmpComponent.java:259)
    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:704)
    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:603)
    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 50.
    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.EmbedStatement.execute(Unknown Source)
    at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
    at tigase.server.amp.JDBCMsgRepository.checkDB(JDBCMsgRepository.java:970)
    at tigase.server.amp.JDBCMsgRepository.initRepository(JDBCMsgRepository.java:362)
    at tigase.server.amp.action.Store.setProperties(Store.java:190)
    at tigase.server.amp.AmpComponent.setProperties(AmpComponent.java:259)
    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:704)
    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:603)
    at tigase.server.XMPPServer.start(XMPPServer.java:142)
    at tigase.server.XMPPServer.main(XMPPServer.java:112)

the used DB is Derby, how can I solve this problem?

Thanks in advance.


Replies (1)

Added by Wojciech Kapcia TigaseTeam almost 4 years ago

There was an addition of column in new version. Please manually execute following SQL on your database to fix the issue:

alter table msg_history add msg_type int NOT NULL

    (1-1/1)