1. Sebastian Sebastian
  2. scm-manager
  3. Issues

Issues

Issue #451 resolved

scm.notify could not send notification

Anonymous created an issue
[Hook-0] ERROR sonia.scm.notify.DefaultNotifyHandler - could not send notification
com.google.inject.ProvisionException: Guice provision errors:

1) Error in custom provider, com.google.inject.OutOfScopeException: Cannot access scoped object. Either we are not currently inside an HTTP Servlet request, or you may have
forgotten to apply com.google.inject.servlet.GuiceFilter as a servlet filter for this request.
  at sonia.scm.web.HgServletModule.configureServlets(HgServletModule.java:69)
  while locating sonia.scm.repository.HgContext

1 error
        at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:987) ~[guice-3.0.jar:na]
        at sonia.scm.repository.HgRepositoryHandler.getHgContext(HgRepositoryHandler.java:321) ~[scm-hg-plugin-1.33.jar:na]
        at sonia.scm.repository.spi.HgCommandContext.<init>(HgCommandContext.java:79) ~[scm-hg-plugin-1.33.jar:na]
        at sonia.scm.repository.spi.HgRepositoryServiceProvider.<init>(HgRepositoryServiceProvider.java:100) ~[scm-hg-plugin-1.33.jar:na]
        at sonia.scm.repository.spi.HgRepositoryServiceResolver.reslove(HgRepositoryServiceResolver.java:91) ~[scm-hg-plugin-1.33.jar:na]
        at sonia.scm.repository.spi.HgRepositoryServiceResolver.reslove(HgRepositoryServiceResolver.java:49) ~[scm-hg-plugin-1.33.jar:na]
        at sonia.scm.repository.api.RepositoryServiceFactory.create(RepositoryServiceFactory.java:284) ~[scm-core-1.33.jar:na]
        at sonia.scm.notify.ChangesetTemplateWrapperHelper.<init>(ChangesetTemplateWrapperHelper.java:107) ~[scm-notify-plugin-1.3.jar:na]
        at sonia.scm.notify.FreemarkerContentBuilder.createContent(FreemarkerContentBuilder.java:128) ~[scm-notify-plugin-1.3.jar:na]
        at sonia.scm.notify.DefaultNotifyHandler.createMessage(DefaultNotifyHandler.java:190) ~[scm-notify-plugin-1.3.jar:na]
        at sonia.scm.notify.DefaultNotifyHandler.send(DefaultNotifyHandler.java:118) ~[scm-notify-plugin-1.3.jar:na]
        at sonia.scm.notify.NotifyRepositoryHook.handleEvent(NotifyRepositoryHook.java:175) [scm-notify-plugin-1.3.jar:na]
        at sonia.scm.notify.NotifyRepositoryHook.handleEvent(NotifyRepositoryHook.java:128) [scm-notify-plugin-1.3.jar:na]
        at sonia.scm.notify.NotifyRepositoryHook.onEvent(NotifyRepositoryHook.java:103) [scm-notify-plugin-1.3.jar:na]
        at sonia.scm.repository.RepositoryHookTask.run(RepositoryHookTask.java:84) [scm-core-1.33.jar:na]
        at org.apache.shiro.subject.support.SubjectRunnable.doRun(SubjectRunnable.java:120) [shiro-core-1.2.2.jar:1.2.2]
        at org.apache.shiro.subject.support.SubjectRunnable.run(SubjectRunnable.java:108) [shiro-core-1.2.2.jar:1.2.2]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146) [na:1.6.0_27]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.6.0_27]
        at java.lang.Thread.run(Thread.java:679) [na:1.6.0_27]
Caused by: com.google.inject.OutOfScopeException: Cannot access scoped object. Either we are not currently inside an HTTP Servlet request, or you may have forgotten to apply
 com.google.inject.servlet.GuiceFilter as a servlet filter for this request.
        at com.google.inject.servlet.GuiceFilter.getContext(GuiceFilter.java:135) ~[guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.GuiceFilter.getRequest(GuiceFilter.java:121) ~[guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.ServletScopes$1$1.get(ServletScopes.java:78) ~[guice-servlet-3.0.jar:na]
        at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:40) ~[guice-3.0.jar:na]
        at com.google.inject.internal.InjectorImpl$4$1.call(InjectorImpl.java:978) ~[guice-3.0.jar:na]
        at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1024) ~[guice-3.0.jar:na]
        at com.google.inject.internal.InjectorImpl$4.get(InjectorImpl.java:974) ~[guice-3.0.jar:na]
        ... 19 common frames omitted

Comments (8)

  1. Bartosz Luczynski

    I can confirm that I also get this issue when using hg (TortoiseHg to be exact). To add an important detail: it seems to happen only if you set "Maximum Diff Lines" to a non-zero value. If that parameter is 0 (meaning diffs are turned off), it seems to work fine. The value I was using was 1024.

  2. Log in to comment