11 Replies Latest reply on Apr 17, 2014 6:39 PM by bas.kuis

    Detail: Key (oauthcodeid)=(0) is not present in table "jiveoauth2code".;  (Issue when jive attempt to batch and send activity to configured webhook)

    bas.kuis

      Hi,

       

      Our jive instance is running into some trouble generating activity to send to configured web-hooks. I pulled this from the application log:

      2014-04-07 14:28:33,488 [TaskEngineWorker-pool-1] [::] ERROR com.jivesoftware.community.webhooks.impl.WebhookQueueConsumer - Error sending webhook callback for URL: https://pipscalable-xxxxxxxxxx.rhcloud.com/RSIntegration/update

      java.lang.RuntimeException: java.lang.RuntimeException: An error occurred executing webhook endpoint (status=408 Request Timeout)

          at com.jivesoftware.community.webhooks.impl.WebhookClient.send(WebhookClient.java:44)

          at com.jivesoftware.community.webhooks.impl.WebhookQueueConsumer.sendBatchNotification(WebhookQueueConsumer.java:259)

          at com.jivesoftware.community.webhooks.impl.WebhookQueueConsumer.consume(WebhookQueueConsumer.java:137)

          at com.jivesoftware.community.webhooks.impl.WebhookQueueConsumerTask.run(WebhookQueueConsumerTask.java:19)

          at sun.reflect.GeneratedMethodAccessor838.invoke(Unknown Source)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

          at java.lang.reflect.Method.invoke(Method.java:606)

          at com.jivesoftware.base.taskmanager.impl.BeanTaskRunnable.run(BeanTaskRunnable.java:46)

          at com.jivesoftware.base.taskmanager.impl.LocalExecutor$3.call(LocalExecutor.java:143)

          at com.jivesoftware.community.aaa.authz.SystemExecutor.executeCallable(SystemExecutor.java:42)

          at com.jivesoftware.base.taskmanager.impl.LocalExecutor.runInSystemContext(LocalExecutor.java:139)

          at com.jivesoftware.base.taskmanager.impl.LocalExecutor.access$2(LocalExecutor.java:126)

          at com.jivesoftware.base.taskmanager.impl.LocalExecutor$1.run(LocalExecutor.java:92)

          at com.jivesoftware.util.task.TaskEngineRunnable.run(TaskEngineRunnable.java:57)

          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)

          at java.util.concurrent.FutureTask.run(FutureTask.java:262)

          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

          at java.lang.Thread.run(Thread.java:744)

      Caused by: java.lang.RuntimeException: An error occurred executing webhook endpoint (status=408 Request Timeout)

          at com.jivesoftware.community.webhooks.impl.WebhookClient.send(WebhookClient.java:39)

          ... 18 more

      2014-04-07 14:28:33,495 [TaskEngineWorker-pool-1] [::] ERROR com.jivesoftware.base.taskmanager.impl.LocalExecutor - Failed to execute task

      java.lang.RuntimeException: java.lang.reflect.InvocationTargetException

          at com.jivesoftware.base.taskmanager.impl.BeanTaskRunnable.run(BeanTaskRunnable.java:49)

          at com.jivesoftware.base.taskmanager.impl.LocalExecutor$3.call(LocalExecutor.java:143)

          at com.jivesoftware.community.aaa.authz.SystemExecutor.executeCallable(SystemExecutor.java:42)

          at com.jivesoftware.base.taskmanager.impl.LocalExecutor.runInSystemContext(LocalExecutor.java:139)

          at com.jivesoftware.base.taskmanager.impl.LocalExecutor.access$2(LocalExecutor.java:126)

          at com.jivesoftware.base.taskmanager.impl.LocalExecutor$1.run(LocalExecutor.java:92)

          at com.jivesoftware.util.task.TaskEngineRunnable.run(TaskEngineRunnable.java:57)

          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)

          at java.util.concurrent.FutureTask.run(FutureTask.java:262)

          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)

          at java.lang.Thread.run(Thread.java:744)

      Caused by: java.lang.reflect.InvocationTargetException

          at sun.reflect.GeneratedMethodAccessor838.invoke(Unknown Source)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

          at java.lang.reflect.Method.invoke(Method.java:606)

          at com.jivesoftware.base.taskmanager.impl.BeanTaskRunnable.run(BeanTaskRunnable.java:46)

          ... 11 more

      Caused by: com.jivesoftware.base.database.dao.DAOException: Object WebhookImpl{ID=17930, url='https://pipscalable-radioshack.rhcloud.com/RSIntegration/update', fields='null', ownerID=2089, listenAs=-1, types=[], creationDate=Mon Apr 07 13:45:46 PDT 2014, modificationDate=Mon Apr 07 13:45:46 PDT 2014, container=DbCommunity{ID=2024, parentCommunityID=2002, name='GPS & Car', displayName='gps-car', description=' ', creationDate=Fri Feb 21 08:50:24 PST 2014, modificationDate=Mon Apr 07 13:57:27 PDT 2014, localeCode='null', workflowID=-1, properties={contentType.1464927464=false, contentType.18=false, contentType.600=false, contentType.1606291040=false, contentType.37=true, contentType.96891546=true, contentType.120=false, contentType.102=true, contentType.1=true, contentType.801=false, contentType.800=false, contentType.1100=false, contentType.602=false, contentType.1501=false, contentType.9876=false, contentType.-960826044=false, contentType.2800=false, contentType.1527402675=false}, types=[com.jivesoftware.community.objecttype.impl.BlogContentType@7c46bcae, com.jivesoftware.community.impl.DocumentContentType@17798514, com.jivesoftware.community.impl.ForumThreadContentType@5ea486b6, com.jivesoftware.community.ext.event.EventObjectType@198caacc], taggableTypes=null}, object=null, user=null, connectionTimeout=-1, readTimeout=-1, enabled=true, internal=false, buggy=true, buggyDate=Mon Apr 07 14:28:33 PDT 2014, bugDetail=java.lang.RuntimeException: An error occurred executing webhook endpoint (status=408 Request Timeout)} could not be updated in the database.

          at com.jivesoftware.community.objecttype.impl.AbstractJiveObjectDAO.update(AbstractJiveObjectDAO.java:276)

          at com.jivesoftware.community.webhooks.impl.WebhookManagerImpl.doUpdate(WebhookManagerImpl.java:326)

          at com.jivesoftware.community.webhooks.impl.WebhookManagerImpl.doUpdate(WebhookManagerImpl.java:1)

          at com.jivesoftware.community.objecttype.impl.AbstractJiveObjectManager.update(AbstractJiveObjectManager.java:154)

          at com.jivesoftware.community.webhooks.impl.WebhookManagerImpl.setBuggyInfo(WebhookManagerImpl.java:224)

          at com.jivesoftware.community.webhooks.impl.WebhookQueueConsumer.consume(WebhookQueueConsumer.java:152)

          at com.jivesoftware.community.webhooks.impl.WebhookQueueConsumerTask.run(WebhookQueueConsumerTask.java:19)

          ... 15 more

      Caused by: org.springframework.dao.DataIntegrityViolationException: PreparedStatementCallback; SQL [UPDATE jiveWebHook SET userid=?, listenAs=?, url=?, oauthCodeId=?, types=?, typesMD5=?, containerType=?, containerID=?, objectType=?, objectID=?, fields=?, enabled=?, internal=?, buggy=?, buggyDate=?, bugDetail=?,connectionTimeout=?, readTimeout=?, modificationDate=? WHERE hookID=?]; ERROR: insert or update on table "jivewebhook" violates foreign key constraint "jivewebhookoauth2_fk"

        Detail: Key (oauthcodeid)=(0) is not present in table "jiveoauth2code".; nested exception is org.postgresql.util.PSQLException: ERROR: insert or update on table "jivewebhook" violates foreign key constraint "jivewebhookoauth2_fk"

        Detail: Key (oauthcodeid)=(0) is not present in table "jiveoauth2code".

          at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:245)

          at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:72)

          at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:603)

          at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:812)

          at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:868)

          at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:876)

          at org.springframework.jdbc.core.simple.SimpleJdbcTemplate.update(SimpleJdbcTemplate.java:251)

          at com.jivesoftware.base.database.dao.JiveJdbcOperationsTemplate.update(JiveJdbcOperationsTemplate.java:189)

          at com.jivesoftware.community.webhooks.dao.impl.WebhookDAOImpl.doUpdate(WebhookDAOImpl.java:236)

          at com.jivesoftware.community.webhooks.dao.impl.WebhookDAOImpl.doUpdate(WebhookDAOImpl.java:1)

          at com.jivesoftware.community.objecttype.impl.AbstractJiveObjectDAO.update(AbstractJiveObjectDAO.java:265)

          ... 21 more

      Caused by: org.postgresql.util.PSQLException: ERROR: insert or update on table "jivewebhook" violates foreign key constraint "jivewebhookoauth2_fk"

        Detail: Key (oauthcodeid)=(0) is not present in table "jiveoauth2code".

      If anybody has experience with this and knows of some things to try that would be greatly appreciated!