Schema import is correct, but server shutdowns completely due to exception in MA
2017-04-19 18:44:23.119 [main] Kernel.getInstance() SEVERE: Exception getting instance
java.lang.RuntimeException: MessageArchiveDB initialization exception
at tigase.archive.db.JDBCMessageArchiveRepository.setDataSource(JDBCMessageArchiveRepository.java:127)
at tigase.archive.db.JDBCMessageArchiveRepository.setDataSource(JDBCMessageArchiveRepository.java:60)
at tigase.db.beans.MDRepositoryBean$MDRepositoryConfigBean.setDataSourceAware(MDRepositoryBean.java:275)
at tigase.db.beans.MDRepositoryBean$MDRepositoryConfigBean.initialize(MDRepositoryBean.java:297)
at tigase.kernel.core.Kernel.initBean(Kernel.java:155)
at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:579)
at tigase.kernel.core.Kernel.initBean(Kernel.java:150)
at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:579)
at tigase.kernel.core.Kernel.initBean(Kernel.java:150)
at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:579)
at tigase.kernel.core.Kernel.initBean(Kernel.java:150)
at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:579)
at tigase.kernel.core.Kernel.initBean(Kernel.java:150)
at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:579)
at tigase.kernel.core.Kernel.initBean(Kernel.java:150)
at tigase.kernel.core.Kernel.getInstance(Kernel.java:385)
at tigase.server.Bootstrap.start(Bootstrap.java:114)
at tigase.server.XMPPServer.start(XMPPServer.java:141)
at tigase.server.XMPPServer.main(XMPPServer.java:122)
Caused by: java.sql.SQLSyntaxErrorException: 'TIG_MA_GETMESSAGES' is not recognized as a function or procedure.
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.EmbedCallableStatement.<init>(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedCallableStatement42.<init>(Unknown Source)
at org.apache.derby.jdbc.Driver42.newEmbedCallableStatement(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.prepareCall(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.prepareCall(Unknown Source)
at tigase.db.jdbc.DataRepositoryImpl.prepareQuery(DataRepositoryImpl.java:475)
at tigase.db.jdbc.DataRepositoryImpl.initStatement(DataRepositoryImpl.java:422)
at tigase.db.jdbc.DataRepositoryImpl.initPreparedStatement(DataRepositoryImpl.java:218)
at tigase.db.DataRepositoryPool.initPreparedStatement(DataRepositoryPool.java:203)
at tigase.archive.db.JDBCMessageArchiveRepository.initPreparedStatements(JDBCMessageArchiveRepository.java:132)
at tigase.archive.db.JDBCMessageArchiveRepository.setDataSource(JDBCMessageArchiveRepository.java:124)
at tigase.archive.db.JDBCMessageArchiveRepository.setDataSource(JDBCMessageArchiveRepository.java:60)
at tigase.db.beans.MDRepositoryBean$MDRepositoryConfigBean.setDataSourceAware(MDRepositoryBean.java:275)
at tigase.db.beans.MDRepositoryBean$MDRepositoryConfigBean.initialize(MDRepositoryBean.java:297)
at tigase.kernel.core.Kernel.initBean(Kernel.java:155)
at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:579)
at tigase.kernel.core.Kernel.initBean(Kernel.java:150)
at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:579)
at tigase.kernel.core.Kernel.initBean(Kernel.java:150)
at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:579)
at tigase.kernel.core.Kernel.initBean(Kernel.java:150)
at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:579)
at tigase.kernel.core.Kernel.initBean(Kernel.java:150)
at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:579)
at tigase.kernel.core.Kernel.initBean(Kernel.java:150)
at tigase.kernel.core.Kernel.getInstance(Kernel.java:385)
at tigase.server.Bootstrap.start(Bootstrap.java:114)
at tigase.server.XMPPServer.start(XMPPServer.java:141)
at tigase.server.XMPPServer.main(XMPPServer.java:122)
Caused by: ERROR 42Y03: 'TIG_MA_GETMESSAGES' is not recognized as a function or procedure.
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.StaticMethodCallNode.bindExpressionMinion(Unknown Source)
at org.apache.derby.impl.sql.compile.StaticMethodCallNode.bindExpression(Unknown Source)
at org.apache.derby.impl.sql.compile.JavaToSQLValueNode.bindExpression(Unknown Source)
at org.apache.derby.impl.sql.compile.CallStatementNode.bindStatement(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.EmbedCallableStatement.<init>(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedCallableStatement42.<init>(Unknown Source)
at org.apache.derby.jdbc.Driver42.newEmbedCallableStatement(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.prepareCall(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.prepareCall(Unknown Source)
at tigase.db.jdbc.DataRepositoryImpl.prepareQuery(DataRepositoryImpl.java:475)
at tigase.db.jdbc.DataRepositoryImpl.initStatement(DataRepositoryImpl.java:422)
at tigase.db.jdbc.DataRepositoryImpl.initPreparedStatement(DataRepositoryImpl.java:218)
at tigase.db.DataRepositoryPool.initPreparedStatement(DataRepositoryPool.java:203)
at tigase.archive.db.JDBCMessageArchiveRepository.initPreparedStatements(JDBCMessageArchiveRepository.java:132)
at tigase.archive.db.JDBCMessageArchiveRepository.setDataSource(JDBCMessageArchiveRepository.java:124)
at tigase.archive.db.JDBCMessageArchiveRepository.setDataSource(JDBCMessageArchiveRepository.java:60)
at tigase.db.beans.MDRepositoryBean$MDRepositoryConfigBean.setDataSourceAware(MDRepositoryBean.java:275)
at tigase.db.beans.MDRepositoryBean$MDRepositoryConfigBean.initialize(MDRepositoryBean.java:297)
at tigase.kernel.core.Kernel.initBean(Kernel.java:155)
at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:579)
at tigase.kernel.core.Kernel.initBean(Kernel.java:150)
at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:579)
at tigase.kernel.core.Kernel.initBean(Kernel.java:150)
at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:579)
at tigase.kernel.core.Kernel.initBean(Kernel.java:150)
at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:579)
at tigase.kernel.core.Kernel.initBean(Kernel.java:150)
at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:579)
at tigase.kernel.core.Kernel.initBean(Kernel.java:150)
at tigase.kernel.core.Kernel.getInstance(Kernel.java:385)
at tigase.server.Bootstrap.start(Bootstrap.java:114)
at tigase.server.XMPPServer.start(XMPPServer.java:141)
at tigase.server.XMPPServer.main(XMPPServer.java:122)
=============================================================================
ERROR! Terminating the server process.
Problem initializing the server: tigase.kernel.KernelException: java.lang.RuntimeException: MessageArchiveDB initialization exception
Please fix the problem and start the server again.
=============================================================================
Andrzej Wójcik (Tigase) commented 8 years ago
I was not able to replicate mentioned issue - server never complained about @TIG_MA_GETMESSAGES@, however I've got following error:
2017-04-20 13:20:19.157 [main] JDBCMsgRepository.setDataSource() WARNING: MsgRepository not initialized due to exception
java.sql.SQLSyntaxErrorException: 'TIG_OFFLINEMESSAGES_GETMESSAGES' is not recognized as a function or procedure.
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.EmbedCallableStatement.<init>(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedCallableStatement42.<init>(Unknown Source)
at org.apache.derby.jdbc.Driver42.newEmbedCallableStatement(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.prepareCall(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.prepareCall(Unknown Source)
at tigase.db.jdbc.DataRepositoryImpl.prepareQuery(DataRepositoryImpl.java:475)
at tigase.db.jdbc.DataRepositoryImpl.initStatement(DataRepositoryImpl.java:422)
at tigase.db.jdbc.DataRepositoryImpl.initPreparedStatement(DataRepositoryImpl.java:218)
at tigase.db.DataRepositoryPool.initPreparedStatement(DataRepositoryPool.java:203)
at tigase.server.amp.db.JDBCMsgRepository.setDataSource(JDBCMsgRepository.java:89)
at tigase.server.amp.db.JDBCMsgRepository.setDataSource(JDBCMsgRepository.java:50)
at tigase.db.beans.MDRepositoryBean$MDRepositoryConfigBean.setDataSourceAware(MDRepositoryBean.java:275)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at tigase.kernel.BeanUtils.setValue(BeanUtils.java:158)
at tigase.kernel.core.Kernel.inject(Kernel.java:556)
at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:627)
at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:769)
at tigase.kernel.core.Kernel.registerBean(Kernel.java:972)
at tigase.kernel.core.BeanConfigBuilder.execWithoutInject(BeanConfigBuilder.java:113)
at tigase.kernel.core.BeanConfigBuilder.exec(BeanConfigBuilder.java:102)
at tigase.db.beans.MDRepositoryBean$MDRepositoryConfigBean.beanConfigurationChanged(MDRepositoryBean.java:247)
at tigase.db.beans.MDRepositoryBean$MDRepositoryConfigBean.initialize(MDRepositoryBean.java:296)
at tigase.kernel.core.Kernel.initBean(Kernel.java:155)
at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:579)
at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:769)
at tigase.kernel.core.Kernel$DelayedDependenciesInjection.inject(Kernel.java:1344)
at tigase.kernel.core.Kernel.finishDependecyDelayedInjection(Kernel.java:1013)
at tigase.kernel.core.Kernel.initBean(Kernel.java:146)
at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:579)
at tigase.kernel.core.Kernel.initBean(Kernel.java:150)
at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:579)
at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:769)
at tigase.kernel.core.Kernel$DelayedDependenciesInjection.inject(Kernel.java:1344)
at tigase.kernel.core.Kernel.finishDependecyDelayedInjection(Kernel.java:1013)
at tigase.kernel.core.Kernel.initBean(Kernel.java:146)
at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:579)
at tigase.kernel.core.Kernel.initBean(Kernel.java:150)
at tigase.kernel.core.Kernel.getInstance(Kernel.java:385)
at tigase.server.Bootstrap.start(Bootstrap.java:114)
at tigase.server.XMPPServer.start(XMPPServer.java:141)
at tigase.server.XMPPServer.main(XMPPServer.java:122)
Caused by: ERROR 42Y03: 'TIG_OFFLINEMESSAGES_GETMESSAGES' is not recognized as a function or procedure.
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.StaticMethodCallNode.bindExpressionMinion(Unknown Source)
at org.apache.derby.impl.sql.compile.StaticMethodCallNode.bindExpression(Unknown Source)
at org.apache.derby.impl.sql.compile.JavaToSQLValueNode.bindExpression(Unknown Source)
at org.apache.derby.impl.sql.compile.CallStatementNode.bindStatement(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.EmbedCallableStatement.<init>(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedCallableStatement42.<init>(Unknown Source)
at org.apache.derby.jdbc.Driver42.newEmbedCallableStatement(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.prepareCall(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.prepareCall(Unknown Source)
at tigase.db.jdbc.DataRepositoryImpl.prepareQuery(DataRepositoryImpl.java:475)
at tigase.db.jdbc.DataRepositoryImpl.initStatement(DataRepositoryImpl.java:422)
at tigase.db.jdbc.DataRepositoryImpl.initPreparedStatement(DataRepositoryImpl.java:218)
at tigase.db.DataRepositoryPool.initPreparedStatement(DataRepositoryPool.java:203)
at tigase.server.amp.db.JDBCMsgRepository.setDataSource(JDBCMsgRepository.java:89)
at tigase.server.amp.db.JDBCMsgRepository.setDataSource(JDBCMsgRepository.java:50)
at tigase.db.beans.MDRepositoryBean$MDRepositoryConfigBean.setDataSourceAware(MDRepositoryBean.java:275)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at tigase.kernel.BeanUtils.setValue(BeanUtils.java:158)
at tigase.kernel.core.Kernel.inject(Kernel.java:556)
at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:627)
at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:769)
at tigase.kernel.core.Kernel.registerBean(Kernel.java:972)
at tigase.kernel.core.BeanConfigBuilder.execWithoutInject(BeanConfigBuilder.java:113)
at tigase.kernel.core.BeanConfigBuilder.exec(BeanConfigBuilder.java:102)
at tigase.db.beans.MDRepositoryBean$MDRepositoryConfigBean.beanConfigurationChanged(MDRepositoryBean.java:247)
at tigase.db.beans.MDRepositoryBean$MDRepositoryConfigBean.initialize(MDRepositoryBean.java:296)
at tigase.kernel.core.Kernel.initBean(Kernel.java:155)
at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:579)
at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:769)
at tigase.kernel.core.Kernel$DelayedDependenciesInjection.inject(Kernel.java:1344)
at tigase.kernel.core.Kernel.finishDependecyDelayedInjection(Kernel.java:1013)
at tigase.kernel.core.Kernel.initBean(Kernel.java:146)
at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:579)
at tigase.kernel.core.Kernel.initBean(Kernel.java:150)
at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:579)
at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:769)
at tigase.kernel.core.Kernel$DelayedDependenciesInjection.inject(Kernel.java:1344)
at tigase.kernel.core.Kernel.finishDependecyDelayedInjection(Kernel.java:1013)
at tigase.kernel.core.Kernel.initBean(Kernel.java:146)
at tigase.kernel.core.Kernel.injectDependencies(Kernel.java:579)
at tigase.kernel.core.Kernel.initBean(Kernel.java:150)
at tigase.kernel.core.Kernel.getInstance(Kernel.java:385)
at tigase.server.Bootstrap.start(Bootstrap.java:114)
at tigase.server.XMPPServer.start(XMPPServer.java:141)
at tigase.server.XMPPServer.main(XMPPServer.java:122)
I've fixed it by adding missing stored procedure TIG_OFFLINEMESSAGES_GETMESSAGES and after that server started properly.
How you loaded schema for MA? I've used our web setup.
wojciech.kapcia@tigase.net commented 8 years ago
I was loading it manually. It seems to work well in latest build via installer.
Schema import is correct, but server shutdowns completely due to exception in MA