Project

General

Profile

Derby DB issue on upgrade from 5.2.1 to 7.0.2

Gabriel Rossetti
Added almost 4 years ago

Hi,

I am trying to upgrade from 5.2.1 to 7.0.2 and I am getting an error on startup. To upgrade I downloaded the new distribution, I unzipped it, I copied over my config files and did the same with my derby DB folder. The issue is that it cannot find a derby method :

2015-06-19 16:52:19.475 [main]             ConfiguratorAbstract.setProperties()  SEVERE: Can't initialize user default repository:
tigase.db.DBInitException: Problem initializing jdbc connection: jdbc:derby:./derbydb
        at tigase.db.jdbc.JDBCRepository.initRepository(JDBCRepository.java:612)
        at tigase.db.RepositoryFactory.getUserRepository(RepositoryFactory.java:660)
        at tigase.conf.ConfiguratorAbstract.addUserRepo(ConfiguratorAbstract.java:903)
        at tigase.conf.ConfiguratorAbstract.setProperties(ConfiguratorAbstract.java:832)
        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.SQLSyntaxErrorException: No method was found that matched the method call tigase.db.derby.StoredProcedures.tigUpdatePairs(long, long, java.lang.String, java.lang.String), tried all combinations of object and primitive types and any possible type conversion for any  parameters the method call may have. The method might exist but it is not public and/or static, or the parameter types are not method invocation convertible.
        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.EmbedCallableStatement.<init>(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedCallableStatement20.<init>(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedCallableStatement30.<init>(Unknown Source)
        at org.apache.derby.impl.jdbc.EmbedCallableStatement40.<init>(Unknown Source)
        at org.apache.derby.jdbc.Driver40.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:451)
        at tigase.db.jdbc.DataRepositoryImpl.initStatement(DataRepositoryImpl.java:406)
        at tigase.db.jdbc.DataRepositoryImpl.initPreparedStatement(DataRepositoryImpl.java:204)
        at tigase.db.DataRepositoryPool.initPreparedStatement(DataRepositoryPool.java:163)
        at tigase.db.jdbc.JDBCRepository.initRepository(JDBCRepository.java:604)
        at tigase.db.RepositoryFactory.getUserRepository(RepositoryFactory.java:660)
        at tigase.conf.ConfiguratorAbstract.addUserRepo(ConfiguratorAbstract.java:903)
        at tigase.conf.ConfiguratorAbstract.setProperties(ConfiguratorAbstract.java:832)
        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)

I searched for an upgrade document, specifically concerning the DB, but didn't find anything for 7.x, only for 5.x. Can someone point me in the right direction please?

Thanks,

Gabriel


Replies (2)

Added by Wojciech Kapcia TigaseTeam over 3 years ago

Please run following against your DerbyDB:

drop procedure TigUpdatePairs;

CREATE procedure TigUpdatePairs(nid bigint, uid bigint, tkey varchar(255), tval clob) 
    PARAMETER STYLE JAVA
    LANGUAGE JAVA
    MODIFIES SQL DATA
    EXTERNAL NAME 'tigase.db.derby.StoredProcedures.tigUpdatePairs';

Added by Gabriel Rossetti over 3 years ago

Great, thanks

    (1-2/2)