Projects tigase _server server-core Issues #810
Caused by: ERROR 42Y03: 'TIGACCOUNTSTATUS' is not recognized as a function or procedure. (#810)
wojciech.kapcia@tigase.net opened 8 years ago
Due Date
2017-04-27

Looks like changes from #5315/49d1ad2c doesn't work well with derby:

2017-04-24 18:22:38.152 [main]             Kernel.injectDependencies()             CONFIG:   Can't inject dependency to bean default (class: class tigase.db.beans.AuthRepositoryMDPoolBean$AuthRepositoryConfigBean) unloading bean default
java.lang.reflect.InvocationTargetException
	at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
	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$DelayedDependenciesInjection.inject(Kernel.java:1344)
	at tigase.kernel.core.Kernel.finishDependecyDelayedInjection(Kernel.java:1013)
	at tigase.db.beans.MDPoolConfigBean.beanConfigurationChanged(MDPoolConfigBean.java:115)
	at tigase.db.beans.AuthUserRepositoryConfigBean.beanConfigurationChanged(AuthUserRepositoryConfigBean.java:84)
	at tigase.db.beans.MDPoolConfigBean.initialize(MDPoolConfigBean.java:140)
	at tigase.db.beans.AuthUserRepositoryConfigBean.initialize(AuthUserRepositoryConfigBean.java:106)
	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.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: java.lang.RuntimeException: Could not initialize tigase.db.jdbc.TigaseCustomAuth for name 'default'
	at tigase.db.beans.MDPoolConfigBean.setInstances(MDPoolConfigBean.java:169)
	at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
	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$DelayedDependenciesInjection.inject(Kernel.java:1344)
	at tigase.kernel.core.Kernel.finishDependecyDelayedInjection(Kernel.java:1013)
	at tigase.db.beans.MDPoolConfigBean.beanConfigurationChanged(MDPoolConfigBean.java:115)
	at tigase.db.beans.AuthUserRepositoryConfigBean.beanConfigurationChanged(AuthUserRepositoryConfigBean.java:84)
	at tigase.db.beans.MDPoolConfigBean.initialize(MDPoolConfigBean.java:140)
	at tigase.db.beans.AuthUserRepositoryConfigBean.initialize(AuthUserRepositoryConfigBean.java:106)
	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.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: tigase.db.DBInitException: Problem initializing jdbc connection: jdbc:derby:tigase72tts;create=true
	at tigase.db.jdbc.TigaseCustomAuth.initRepository(TigaseCustomAuth.java:621)
	at tigase.db.beans.MDPoolConfigBean.initRepository(MDPoolConfigBean.java:181)
	at tigase.db.beans.AuthUserRepositoryConfigBean.initRepository(AuthUserRepositoryConfigBean.java:69)
	at tigase.db.beans.MDPoolConfigBean.setInstances(MDPoolConfigBean.java:167)
	at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
	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$DelayedDependenciesInjection.inject(Kernel.java:1344)
	at tigase.kernel.core.Kernel.finishDependecyDelayedInjection(Kernel.java:1013)
	at tigase.db.beans.MDPoolConfigBean.beanConfigurationChanged(MDPoolConfigBean.java:115)
	at tigase.db.beans.AuthUserRepositoryConfigBean.beanConfigurationChanged(AuthUserRepositoryConfigBean.java:84)
	at tigase.db.beans.MDPoolConfigBean.initialize(MDPoolConfigBean.java:140)
	at tigase.db.beans.AuthUserRepositoryConfigBean.initialize(AuthUserRepositoryConfigBean.java:106)
	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.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: java.sql.SQLSyntaxErrorException: 'TIGACCOUNTSTATUS' 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.db.jdbc.TigaseCustomAuth.initRepository(TigaseCustomAuth.java:609)
	at tigase.db.beans.MDPoolConfigBean.initRepository(MDPoolConfigBean.java:181)
	at tigase.db.beans.AuthUserRepositoryConfigBean.initRepository(AuthUserRepositoryConfigBean.java:69)
	at tigase.db.beans.MDPoolConfigBean.setInstances(MDPoolConfigBean.java:167)
	at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
	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$DelayedDependenciesInjection.inject(Kernel.java:1344)
	at tigase.kernel.core.Kernel.finishDependecyDelayedInjection(Kernel.java:1013)
	at tigase.db.beans.MDPoolConfigBean.beanConfigurationChanged(MDPoolConfigBean.java:115)
	at tigase.db.beans.AuthUserRepositoryConfigBean.beanConfigurationChanged(AuthUserRepositoryConfigBean.java:84)
	at tigase.db.beans.MDPoolConfigBean.initialize(MDPoolConfigBean.java:140)
	at tigase.db.beans.AuthUserRepositoryConfigBean.initialize(AuthUserRepositoryConfigBean.java:106)
	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.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: 'TIGACCOUNTSTATUS' 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.db.jdbc.TigaseCustomAuth.initRepository(TigaseCustomAuth.java:609)
	at tigase.db.beans.MDPoolConfigBean.initRepository(MDPoolConfigBean.java:181)
	at tigase.db.beans.AuthUserRepositoryConfigBean.initRepository(AuthUserRepositoryConfigBean.java:69)
	at tigase.db.beans.MDPoolConfigBean.setInstances(MDPoolConfigBean.java:167)
	at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
	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$DelayedDependenciesInjection.inject(Kernel.java:1344)
	at tigase.kernel.core.Kernel.finishDependecyDelayedInjection(Kernel.java:1013)
	at tigase.db.beans.MDPoolConfigBean.beanConfigurationChanged(MDPoolConfigBean.java:115)
	at tigase.db.beans.AuthUserRepositoryConfigBean.beanConfigurationChanged(AuthUserRepositoryConfigBean.java:84)
	at tigase.db.beans.MDPoolConfigBean.initialize(MDPoolConfigBean.java:140)
	at tigase.db.beans.AuthUserRepositoryConfigBean.initialize(AuthUserRepositoryConfigBean.java:106)
	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.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)
wojciech.kapcia@tigase.net commented 8 years ago

OK, I've fixed loading of the procedure (it was missing due to additional space in QUERY START directive…):

2017-04-28 13:15:30.289 [main]             DBSchemaLoader.validateDBSchema()       FINEST:   Executing query: CREATE PROCEDURE TigUpdateAccountStatus("userId" VARCHAR(2049), "status" INT) PARAMETER STYLE JAVA LANGUAGE JAVA MODIFIES SQL DATA EXTERNAL NAME 'tigase.db.derby.StoredProcedures.tigUpdateAccountStatus'
2017-04-28 13:21:20.161 [main]             Kernel.injectDependencies()             WARNING:  Can't inject dependency to bean default (class: class tigase.db.beans.AuthRepositoryMDPoolBean$AuthRepositoryConfigBean) unloading bean default
RootCause:
   -> java.lang.RuntimeException: Could not initialize tigase.db.jdbc.TigaseCustomAuth for name 'default'
      [tigase.db.beans.MDPoolConfigBean.setInstances(MDPoolConfigBean.java:169)]
      -> tigase.db.DBInitException: Problem initializing jdbc connection: jdbc:derby:/Users/wojtek/dev/tigase/tigase-testsuite/tigase_test_db;create=true
         [tigase.db.jdbc.TigaseCustomAuth.initRepository(TigaseCustomAuth.java:621)]
         -> java.sql.SQLSyntaxErrorException: No method was found that matched the method call tigase.db.derby.StoredProcedures.tigAccountStatus(java.lang.String, java.sql.ResultSet[]), 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.
            [org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)]
            -> ERROR 42X50: No method was found that matched the method call tigase.db.derby.StoredProcedures.tigAccountStatus(java.lang.String, java.sql.ResultSet[]), 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.
               [org.apache.derby.iapi.error.StandardException.newException(Unknown Source)]

please resolve it and verify that database prepared with:

java -cp "jars/*" tigase.db.util.DBSchemaLoader  -T derby -U tigase72tts -P tigase72tts -D tigase72tts -L ALL
Bartosz Małkowski commented 8 years ago

Fixed

wojciech.kapcia@tigase.net commented 8 years ago

Works now, thank you!

Referenced from commit 1 year ago
Changed access level from private to public for methods getDomains and getDomainsList, closes #810.
git-svn-id: file:///home/svn/repos/tigase-server/trunk@3003 7d282ba1-3ae6-0310-8f9b-c9008a0864d2
kobit committed 1 decade ago
issue 1 of 1
Type
Bug
Priority
Normal
Assignee
RedmineID
5416
Version
tigase-server-8.0.0
Spent time
5h
Issue Votes (0)
Watchers (0)
Reference
tigase/_server/server-core#810
Please wait...
Page is in error, reload to recover