Add git commit identifier to errors

Issue #85 resolved
Xavier Poinsard created an issue

I discovered in Jigit logs that somes commits were missing the author, but no clue is given to retrieve them.

Could you include the git commit id in the error log ?

Here is a log sample :

2019-09-13 11:59:48,447 jigit-indexer-1 ERROR ServiceRunner     [jigit.indexer.JigitIndexer] Couldn't index repo: GitLab OP: Devs/ContractPricer
java.lang.IllegalArgumentException: Cannot set non-null String field AUTHOR to ''
        at org.apache.commons.lang3.Validate.isTrue(Validate.java:158)
        at net.java.ao.EntityManager.create(EntityManager.java:347)
        at com.atlassian.activeobjects.internal.EntityManagedActiveObjects.create(EntityManagedActiveObjects.java:92)
        at com.atlassian.activeobjects.osgi.TenantAwareActiveObjects.create(TenantAwareActiveObjects.java:279)
        at sun.reflect.GeneratedMethodAccessor2862.invoke(Unknown Source)
        ... 1 filtered
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
        at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)
        at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
        at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:136)
        at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
        at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70)
        at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
        at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
        at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:136)
        at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
        at com.sun.proxy.$Proxy3443.create(Unknown Source)
        at jigit.ao.CommitManagerImpl.create(CommitManagerImpl.java:70)
        at jigit.ao.CommitManagerImpl.persist(CommitManagerImpl.java:179)
        ... 2 filtered
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.atlassian.activeobjects.tx.TransactionalProxy.invoke(TransactionalProxy.java:60)
        at com.atlassian.activeobjects.tx.TransactionalProxy.access$000(TransactionalProxy.java:18)
        at com.atlassian.activeobjects.tx.TransactionalProxy$1.doInTransaction(TransactionalProxy.java:49)
        at com.atlassian.sal.core.transaction.HostContextTransactionTemplate$1.doInTransaction(HostContextTransactionTemplate.java:21)
        at com.atlassian.jira.DefaultHostContextAccessor.doInTransaction(DefaultHostContextAccessor.java:50)
        ... 2 filtered
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)
        at com.sun.proxy.$Proxy503.doInTransaction(Unknown Source)
        ... 2 filtered
        at java.lang.reflect.Method.invoke(Method.java:498)
        at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:131)
        at com.sun.proxy.$Proxy503.doInTransaction(Unknown Source)
        at com.atlassian.sal.core.transaction.HostContextTransactionTemplate.execute(HostContextTransactionTemplate.java:18)
        ... 2 filtered
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
        at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)
        at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
        at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:136)
        at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
        at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70)
        at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
        at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
        at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:136)
        at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
        at com.sun.proxy.$Proxy997.execute(Unknown Source)
        at com.atlassian.activeobjects.internal.SalTransactionManager.inTransaction(SalTransactionManager.java:42)
        at com.atlassian.activeobjects.internal.AbstractLoggingTransactionManager.doInTransaction(AbstractLoggingTransactionManager.java:16)
        at com.atlassian.activeobjects.internal.EntityManagedActiveObjects.executeInTransaction(EntityManagedActiveObjects.java:204)
        at com.atlassian.activeobjects.osgi.TenantAwareActiveObjects.executeInTransaction(TenantAwareActiveObjects.java:349)
        ... 2 filtered
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:343)
        at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)
        at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
        at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:136)
        at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
        at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70)
        at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
        at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
        at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:136)
        at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:124)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:185)
        at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
        at com.sun.proxy.$Proxy3443.executeInTransaction(Unknown Source)
        at com.atlassian.activeobjects.tx.TransactionalProxy.executeInTransaction(TransactionalProxy.java:46)
        at com.atlassian.activeobjects.tx.TransactionalProxy.invokeInTransaction(TransactionalProxy.java:39)
        at com.atlassian.activeobjects.tx.TransactionalProxy.invoke(TransactionalProxy.java:31)
        at com.sun.proxy.$Proxy3444.persist(Unknown Source)
        at jigit.indexer.PersistStrategyFactoryImpl$PersistAllDataStrategy.persist(PersistStrategyFactoryImpl.java:50)
        at jigit.indexer.IndexingWorker.indexFromCommit(IndexingWorker.java:152)
        at jigit.indexer.IndexingWorker.indexRepoBranch(IndexingWorker.java:99)
        at jigit.indexer.IndexingWorker.handleBranchMode(IndexingWorker.java:68)
        at jigit.indexer.IndexingWorker.call(IndexingWorker.java:52)
        at jigit.indexer.IndexingWorker.call(IndexingWorker.java:20)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)

Comments (6)

  1. Dmitrii Apanasevich repo owner

    Hi,

    Thank you for the bug report. It would be definitely helpful ot have commit identifier in this message.

    But I don’t think it would help the add-on to index this repository. Maybe, it would be also helpful to ignore empty author name and substitute it with string 'unknown author'? What do you think?

  2. Peter Heitbrock Account Deactivated

    Hi Dmitrii,

    As you know I reported the same issue by mail. I checked the log of the project with

    {noformat}

    git log | grep Author | sort | less

    {noformat}

    but in all entries the Author was set.

    Beside of this I think your suggestion is a fine workaround and should help in any case. I am looking forward to see if that solves the problem.

  3. Dmitrii Apanasevich repo owner

    Check the new fixed version on the Marketplace. Now, Jigit substitutes empty author name with <empty author> string, as well as it writes an error message to log file containing all information related to the problem commit.

  4. Peter Heitbrock Account Deactivated

    Hi Dmitrii,

    Sorry for the delayed answer - I have been in vacation.

    To day I updated to the latest version of JIGIT. The exception in the log are gone but JIGIT tab is still empty 😞

    I disabled and enabled JIGIT than I opened the ticket where I expect to get changes. In the GitLab I can see the changes.

    Here is an excerpt of the log:

    2019-11-05 13:33:50,653 https-jsse-nio-8443-exec-4 INFO ph 813x22100x1 qnz12w 10.0.173.206 /rest/plugins/1.0/com.apanasevich.jira-jigit-plugin-key [c.a.plugin.util.WaitUntil] Plugins that have yet to be enabled: (1): [com.apanasevich.jira-jigit-plugin], 300 seconds remaining
    2019-11-05 13:33:51,726 https-jsse-nio-8443-exec-4 DEBUG ph 813x22100x1 qnz12w 10.0.173.206 /rest/plugins/1.0/com.apanasevich.jira-jigit-plugin-key [c.a.activeobjects.osgi.OsgiServiceUtilsImpl] Registering service net.java.ao.atlassian.AtlassianTableNameConverter@66f2f08c with interface net.java.ao.schema.TableNameConverter and properties {com.atlassian.plugin.key=com.apanasevich.jira-jigit-plugin}
    2019-11-05 13:33:51,729 https-jsse-nio-8443-exec-4 DEBUG ph 813x22100x1 qnz12w 10.0.173.206 /rest/plugins/1.0/com.apanasevich.jira-jigit-plugin-key [c.a.activeobjects.osgi.OsgiServiceUtilsImpl] Registering service com.atlassian.activeobjects.config.internal.DefaultActiveObjectsConfiguration@62f8f382 with interface com.atlassian.activeobjects.config.ActiveObjectsConfiguration and properties {com.atlassian.plugin.key=com.apanasevich.jira-jigit-plugin}
    2019-11-05 13:33:51,730 https-jsse-nio-8443-exec-4 DEBUG ph 813x22100x1 qnz12w 10.0.173.206 /rest/plugins/1.0/com.apanasevich.jira-jigit-plugin-key [c.a.activeobjects.osgi.ActiveObjectsServiceFactory] onPluginModuleEnabledEvent storing unattached <ao> configuration module for [com.apanasevich.jira-jigit-plugin]
    2019-11-05 13:33:51,764 https-jsse-nio-8443-exec-4 DEBUG ph 813x22100x1 qnz12w 10.0.173.206 /rest/plugins/1.0/com.apanasevich.jira-jigit-plugin-key [c.a.activeobjects.osgi.ActiveObjectsServiceFactory] onPluginEnabledEvent attaching unbound <ao> to [com.apanasevich.jira-jigit-plugin]
    2019-11-05 13:33:51,764 https-jsse-nio-8443-exec-4 DEBUG ph 813x22100x1 qnz12w 10.0.173.206 /rest/plugins/1.0/com.apanasevich.jira-jigit-plugin-key [c.a.activeobjects.osgi.TenantAwareActiveObjects] init bundle [com.apanasevich.jira-jigit-plugin]
    2019-11-05 13:33:51,764 https-jsse-nio-8443-exec-4 DEBUG ph 813x22100x1 qnz12w 10.0.173.206 /rest/plugins/1.0/com.apanasevich.jira-jigit-plugin-key [c.a.activeobjects.osgi.TenantAwareActiveObjects] bundle [com.apanasevich.jira-jigit-plugin] loading new AO promise for JiraTenantImpl{id='system'}
    2019-11-05 13:33:51,764 https-jsse-nio-8443-exec-4 DEBUG ph 813x22100x1 qnz12w 10.0.173.206 /rest/plugins/1.0/com.apanasevich.jira-jigit-plugin-key [c.a.activeobjects.osgi.TenantAwareActiveObjects] setAoConfiguration [com.apanasevich.jira-jigit-plugin]
    2019-11-05 13:33:51,764 https-jsse-nio-8443-exec-4 DEBUG ph 813x22100x1 qnz12w 10.0.173.206 /rest/plugins/1.0/com.apanasevich.jira-jigit-plugin-key [c.a.activeobjects.osgi.TenantAwareActiveObjects] bundle [com.apanasevich.jira-jigit-plugin] got ActiveObjectsConfiguration
    2019-11-05 13:33:51,765 active-objects-init-JiraTenantImpl{id='system'}-0 DEBUG ph [c.a.activeobjects.osgi.TenantAwareActiveObjects] bundle [com.apanasevich.jira-jigit-plugin] creating ActiveObjects
    2019-11-05 13:33:52,100 active-objects-init-JiraTenantImpl{id='system'}-0 DEBUG ph [c.a.activeobjects.osgi.TenantAwareActiveObjects] bundle [com.apanasevich.jira-jigit-plugin] created ActiveObjects
    2019-11-05 13:34:25,186 https-jsse-nio-8443-exec-18 DEBUG ph 814x22110x2 qnz12w 10.0.173.206 /browse/DEVFIXHUB-63 [c.a.activeobjects.osgi.ActiveObjectsServiceFactory] getService bundle [com.apanasevich.jira-jigit-plugin]

    Any idea?

  5. Peter Heitbrock Account Deactivated

    Hi Dmitrii,

    Its me again. I have updated Prod and here the tab is filled with one entry. Older ones are missed.

  6. Log in to comment