java.lang.NullPointerException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • GitHub comment 84#164212176
    via GitHub by leiguorui
    ,
  • GitHub comment 2263#189694404
    via GitHub by wing328
    ,
  • GitHub comment 650#262592437
    via GitHub by luis100
    ,
  • Loading resource fails at server-side
    via Stack Overflow by nKognito
    ,
  • h3. Summary When Bitbucket Server attempts to send certain analytics, it can fail with a {{NullPointerException}}. h3. Steps to Reproduce It's not entirely clear how this is reproduced reliably. h3. Expected Results The exception is not thrown and the analytics are sent without error. h3. Actual Results The below exception is thrown: {code}2016-01-22 14:07:36,044 ERROR [localScheduler_Worker-1] c.a.scheduler.core.JobLauncher Scheduled job with ID 'PluginScheduler:com.atlassian.analytics.client.upload.Remot eFilterRead:job' failed com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.NullPointerException at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:149) ~[atlassian-util-concurrent-3.0.0.jar:na] at com.atlassian.util.concurrent.LazyReference.get(LazyReference.java:112) ~[atlassian-util-concurrent-3.0.0.jar:na] at com.atlassian.util.concurrent.ResettableLazyReference.get(ResettableLazyReference.java:87) ~[atlassian-util-concurrent-3.0.0.jar:na] at com.atlassian.analytics.client.hash.BcryptAnalyticsEmailHasher.readRemoteInstructions(BcryptAnalyticsEmailHasher.java:123) ~[na:na] at com.atlassian.analytics.client.upload.RemoteFilterRead.execute(RemoteFilterRead.java:61) ~[na:na] at com.atlassian.scheduler.compat.local.LocalOnlyPluginJob.execute(LocalOnlyPluginJob.java:30) ~[na:na] at com.atlassian.stash.internal.sal.scheduling.PluginSchedulerAdapter$JobDescriptor.runJob(PluginSchedulerAdapter.java:128) ~[bitbucket-platform-4.2.0.jar:na] at com.atlassian.stash.internal.sal.scheduling.PluginSchedulerAdapter.runJob(PluginSchedulerAdapter.java:85) ~[bitbucket-platform-4.2.0.jar:na] at com.atlassian.scheduler.core.JobLauncher.runJob(JobLauncher.java:153) [atlassian-scheduler-core-1.6.0.jar:na] at com.atlassian.scheduler.core.JobLauncher.launchAndBuildResponse(JobLauncher.java:118) [atlassian-scheduler-core-1.6.0.jar:na] at com.atlassian.scheduler.core.JobLauncher.launch(JobLauncher.java:97) [atlassian-scheduler-core-1.6.0.jar:na] at com.atlassian.scheduler.quartz2.Quartz2Job.execute(Quartz2Job.java:32) [atlassian-scheduler-quartz2-1.6.0.jar:na] at org.quartz.core.JobRunShell.run(JobRunShell.java:202) [quartz-2.2.1.jar:na] at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) [quartz-2.2.1.jar:na] Caused by: java.lang.NullPointerException: null at java.io.Reader.<init>(Unknown Source) ~[na:1.8.0_51] at java.io.InputStreamReader.<init>(Unknown Source) ~[na:1.8.0_51] at org.apache.commons.io.IOUtils.copy(IOUtils.java:1906) ~[commons-io-2.4.jar:2.4] at org.apache.commons.io.IOUtils.toString(IOUtils.java:778) ~[commons-io-2.4.jar:2.4] at org.apache.commons.io.IOUtils.toString(IOUtils.java:759) ~[commons-io-2.4.jar:2.4] at com.atlassian.analytics.client.hash.reader.RemoteHashingInstructionsReader.readInstructions(RemoteHashingInstructionsReader.java:27) ~[na:na] at com.atlassian.analytics.client.hash.BcryptAnalyticsEmailHasher$HashingInstructionsResettableLazyReference.create(BcryptAnalyticsEmailHasher.java:154) ~[na:na] at com.atlassian.analytics.client.hash.BcryptAnalyticsEmailHasher$HashingInstructionsResettableLazyReference.create(BcryptAnalyticsEmailHasher.java:144) ~[na:na] at com.atlassian.util.concurrent.ResettableLazyReference$InternalReference.create(ResettableLazyReference.java:140) ~[atlassian-util-concurrent-3.0.0.jar:na] at com.atlassian.util.concurrent.LazyReference$Sync.run(LazyReference.java:321) ~[atlassian-util-concurrent-3.0.0.jar:na] at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:143) ~[atlassian-util-concurrent-3.0.0.jar:na] ... 13 common frames omitted {code} h3. Workaround Disabling the Analytics and the below add-ons will prevent this exception from being thrown. Please note it's a spurious exception that prevents analytics being thrown however will not affect how Bitbucket Server operates outside of sending analytics. * Atlassian Stash Analytics Whitelist Plugin * Analytics Client Plugin and * Analytics Whitelist Plugin h3. Notes: - Only reported happens *after an upgrade* to Bitbucket Server 4.2.0
    via by Peter Koczan,
    • java.lang.NullPointerException: null at java.io.Reader.<init>(Reader.java:78)[na:1.8.0_91] at java.io.InputStreamReader.<init>(InputStreamReader.java:113)[na:1.8.0_91] at com.sdl.odata.client.caller.BasicEndpointCaller.getResponse(BasicEndpointCaller.java:210)[odata_client-2.0.5-1002.jar:2.0.5-1002] at com.sdl.odata.client.caller.BasicEndpointCaller.callEndpoint(BasicEndpointCaller.java:86)[odata_client-2.0.5-1002.jar:2.0.5-1002] at com.sdl.odata.client.DefaultODataClient.getODataResponse(DefaultODataClient.java:141)[odata_client-2.0.5-1002.jar:2.0.5-1002] at com.sdl.odata.client.DefaultODataClient.getEntity(DefaultODataClient.java:69)[odata_client-2.0.5-1002.jar:2.0.5-1002] at com.sdl.context.odata.client.ODataContextEngineProxy.resolve(ODataContextEngineProxy.java:104)[cwd_odata_client-8.1.1-1014.jar:8.1.1-1014] at com.sdl.context.odata.client.api.ODataContextEngine.resolve(ODataContextEngine.java:44)[cwd_odata_client-8.1.1-1014.jar:8.1.1-1014] at com.sdl.webapp.tridion.contextengine.ContextServiceClaimsProvider.getContextClaims(ContextServiceClaimsProvider.java:87)[dxa-web8-provider-1.4.0.jar:1.4.0] at com.sdl.webapp.common.impl.contextengine.ContextEngineImpl.getClaims(ContextEngineImpl.java:41)[dxa-common-impl-1.4.0.jar:1.4.0] at com.sdl.webapp.common.impl.WebRequestContextImpl.getDisplayWidth(WebRequestContextImpl.java:128)[dxa-common-impl-1.4.0.jar:1.4.0] at com.sdl.webapp.common.impl.WebRequestContextImpl$$FastClassByCGLIB$$2bfec188.invoke(<generated>)[cglib-2.2.2.jar:1.4.0] at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)[cglib-2.2.2.jar:na] at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:689)[spring-aop-3.1.4.RELEASE.jar:3.1.4.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)[spring-aop-3.1.4.RELEASE.jar:3.1.4.RELEASE] at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)[spring-aop-3.1.4.RELEASE.jar:3.1.4.RELEASE] at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)[spring-aop-3.1.4.RELEASE.jar:3.1.4.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)[spring-aop-3.1.4.RELEASE.jar:3.1.4.RELEASE] at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:622)[spring-aop-3.1.4.RELEASE.jar:3.1.4.RELEASE] at com.sdl.webapp.common.impl.WebRequestContextImpl$$EnhancerByCGLIB$$726d2d34.getDisplayWidth(<generated>)[cglib-2.2.2.jar:1.4.0] at com.sdl.webapp.common.impl.DefaultMediaHelper.getScreenWidth(DefaultMediaHelper.java:158)[dxa-common-impl-1.4.0.jar:1.4.0] at com.sdl.webapp.common.controller.PageController.handleGetPage(PageController.java:149)[dxa-common-api-1.4.0.jar:1.4.0] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.8.0_91] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[na:1.8.0_91] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[na:1.8.0_91] at java.lang.reflect.Method.invoke(Method.java:498)[na:1.8.0_91] at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:219)[spring-web-3.1.4.RELEASE.jar:3.1.4.RELEASE] at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)[spring-web-3.1.4.RELEASE.jar:3.1.4.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:100)[spring-webmvc-3.1.4.RELEASE.jar:3.1.4.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:604)[spring-webmvc-3.1.4.RELEASE.jar:3.1.4.RELEASE] at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:565)[spring-webmvc-3.1.4.RELEASE.jar:3.1.4.RELEASE] at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:80)[spring-webmvc-3.1.4.RELEASE.jar:3.1.4.RELEASE] at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:923)[spring-webmvc-3.1.4.RELEASE.jar:3.1.4.RELEASE] at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)[spring-webmvc-3.1.4.RELEASE.jar:3.1.4.RELEASE] at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)[spring-webmvc-3.1.4.RELEASE.jar:3.1.4.RELEASE] at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)[spring-webmvc-3.1.4.RELEASE.jar:3.1.4.RELEASE] at javax.servlet.http.HttpServlet.service(HttpServlet.java:622)[servlet-api.jar:na] at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)[servlet-api.jar:na] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)[catalina.jar:8.0.35] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)[catalina.jar:8.0.35] at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)[tomcat-websocket.jar:8.0.35] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)[catalina.jar:8.0.35] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)[catalina.jar:8.0.35] at com.tridion.ambientdata.web.AbstractAmbientDataServletFilter.doFilter(AbstractAmbientDataServletFilter.java:286)[web-ambient-client-8.1.1-1005.jar:8.1.1-1005] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)[catalina.jar:8.0.35] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)[catalina.jar:8.0.35] at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)[spring-web-3.1.4.RELEASE.jar:3.1.4.RELEASE] at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)[spring-web-3.1.4.RELEASE.jar:3.1.4.RELEASE] at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)[catalina.jar:8.0.35] at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)[catalina.jar:8.0.35] at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)[catalina.jar:8.0.35] at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)[catalina.jar:8.0.35] at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)[catalina.jar:8.0.35] at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)[catalina.jar:8.0.35] at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)[catalina.jar:8.0.35] at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)[catalina.jar:8.0.35] at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)[catalina.jar:8.0.35] at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:528)[catalina.jar:8.0.35] at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1099)[tomcat-coyote.jar:8.0.35] at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672)[tomcat-coyote.jar:8.0.35] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520)[tomcat-coyote.jar:8.0.35] at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476)[tomcat-coyote.jar:8.0.35] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[na:1.8.0_91] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[na:1.8.0_91] at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)[tomcat-util.jar:8.0.35] at java.lang.Thread.run(Thread.java:745)[na:1.8.0_91]

    Users with the same issue

    SteVio1989SteVio1989
    1 times, last one,
    TahirTahir
    8 times, last one,
    rlovtangenrlovtangen
    2 times, last one,
    zoknizokni
    3 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    41 more bugmates