java.lang.RuntimeException

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.

  • If the {{ssp}} webapp starts up before {{ssp-platform}}, you'll get the following stack trace b/c the coach sync job fires effectively right away: {noformat} java.lang.RuntimeException: java.lang.NullPointerException at org.jasig.portlet.utils.rest.SimpleCrossContextRestApiInvoker.doInvoke(SimpleCrossContextRestApiInvoker.java:183) ~[portal-rest-api-1.0.0-M3.jar:1.0.0-M3] at org.jasig.portlet.utils.rest.SimpleCrossContextRestApiInvoker.invoke(SimpleCrossContextRestApiInvoker.java:93) ~[portal-rest-api-1.0.0-M3.jar:1.0.0-M3] at org.jasig.ssp.service.impl.UPortalPersonAttributesService.searchForUsers(UPortalPersonAttributesService.java:209) ~[UPortalPersonAttributesService.class:na] at org.jasig.ssp.service.impl.UPortalPersonAttributesService.getCoaches(UPortalPersonAttributesService.java:260) ~[UPortalPersonAttributesService.class:na] at org.jasig.ssp.service.impl.PersonServiceImpl.getAllCoachUsernamesFromDirectory(PersonServiceImpl.java:553) ~[PersonServiceImpl.class:na] at org.jasig.ssp.service.impl.PersonServiceImpl.syncCoaches(PersonServiceImpl.java:619) ~[PersonServiceImpl.class:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_45] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[na:1.6.0_45] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_45] at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_45] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:319) ~[spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) ~[spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) ~[spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) ~[spring-tx-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) ~[spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) ~[spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at com.sun.proxy.$Proxy52.syncCoaches(Unknown Source) ~[na:na] at org.jasig.ssp.service.impl.ScheduledTaskWrapperServiceImpl.syncCoaches(ScheduledTaskWrapperServiceImpl.java:87) ~[ScheduledTaskWrapperServiceImpl.class:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_45] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[na:1.6.0_45] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_45] at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_45] at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:64) ~[spring-context-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:53) ~[spring-context-3.1.2.RELEASE.jar:3.1.2.RELEASE] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439) [na:1.6.0_45] at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) [na:1.6.0_45] at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) [na:1.6.0_45] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) [na:1.6.0_45] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180) [na:1.6.0_45] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204) [na:1.6.0_45] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) [na:1.6.0_45] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) [na:1.6.0_45] at java.lang.Thread.run(Thread.java:662) [na:1.6.0_45] Caused by: java.lang.NullPointerException: null at org.jasig.portlet.utils.rest.SimpleCrossContextRestApiInvoker.doInvoke(SimpleCrossContextRestApiInvoker.java:175) ~[portal-rest-api-1.0.0-M3.jar:1.0.0-M3] ... 32 common frames omitted {noformat} There's been concern expressed that this is a needless distraction for deployers b/c the error eventually "goes away". I.e. by the next time the coach sync job fires, platform will have started up. This is a bit of a tough one. The servlet spec has nothing to say about webapp startup ordering. So we can't stipulate via config that {{ssp-platform}} should always start ahead of {{ssp}}. (This was one motivation for Sakai "components", for example.) And we can't just swallow the exception as a rule b/c it's harmless except when it's not. I.e. while it usually represents a transient failure, if it happens repeatedly or any time _after_ {{ssp-platform}} startup, it does represent a serious problem worthy of stack trace logging. What probably needs to happen is one or both of two things: # Delay firing of the coach sync job to give {{ssp-platform}} a chance to start up # When invoking {{ssp-platform}} from a background job (where you have the luxury of retries), detect this particular failure mode and implement a backoff/retry loop that will fire up to a configurable limit.
    via by Dan McCallum,
  • If the {{ssp}} webapp starts up before {{ssp-platform}}, you'll get the following stack trace b/c the coach sync job fires effectively right away: {noformat} java.lang.RuntimeException: java.lang.NullPointerException at org.jasig.portlet.utils.rest.SimpleCrossContextRestApiInvoker.doInvoke(SimpleCrossContextRestApiInvoker.java:183) ~[portal-rest-api-1.0.0-M3.jar:1.0.0-M3] at org.jasig.portlet.utils.rest.SimpleCrossContextRestApiInvoker.invoke(SimpleCrossContextRestApiInvoker.java:93) ~[portal-rest-api-1.0.0-M3.jar:1.0.0-M3] at org.jasig.ssp.service.impl.UPortalPersonAttributesService.searchForUsers(UPortalPersonAttributesService.java:209) ~[UPortalPersonAttributesService.class:na] at org.jasig.ssp.service.impl.UPortalPersonAttributesService.getCoaches(UPortalPersonAttributesService.java:260) ~[UPortalPersonAttributesService.class:na] at org.jasig.ssp.service.impl.PersonServiceImpl.getAllCoachUsernamesFromDirectory(PersonServiceImpl.java:553) ~[PersonServiceImpl.class:na] at org.jasig.ssp.service.impl.PersonServiceImpl.syncCoaches(PersonServiceImpl.java:619) ~[PersonServiceImpl.class:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_45] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[na:1.6.0_45] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_45] at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_45] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:319) ~[spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183) ~[spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150) ~[spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110) ~[spring-tx-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) ~[spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) ~[spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at com.sun.proxy.$Proxy52.syncCoaches(Unknown Source) ~[na:na] at org.jasig.ssp.service.impl.ScheduledTaskWrapperServiceImpl.syncCoaches(ScheduledTaskWrapperServiceImpl.java:87) ~[ScheduledTaskWrapperServiceImpl.class:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.6.0_45] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) ~[na:1.6.0_45] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_45] at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_45] at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:64) ~[spring-context-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:53) ~[spring-context-3.1.2.RELEASE.jar:3.1.2.RELEASE] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439) [na:1.6.0_45] at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) [na:1.6.0_45] at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) [na:1.6.0_45] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) [na:1.6.0_45] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180) [na:1.6.0_45] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204) [na:1.6.0_45] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) [na:1.6.0_45] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) [na:1.6.0_45] at java.lang.Thread.run(Thread.java:662) [na:1.6.0_45] Caused by: java.lang.NullPointerException: null at org.jasig.portlet.utils.rest.SimpleCrossContextRestApiInvoker.doInvoke(SimpleCrossContextRestApiInvoker.java:175) ~[portal-rest-api-1.0.0-M3.jar:1.0.0-M3] ... 32 common frames omitted {noformat} There's been concern expressed that this is a needless distraction for deployers b/c the error eventually "goes away". I.e. by the next time the coach sync job fires, platform will have started up. This is a bit of a tough one. The servlet spec has nothing to say about webapp startup ordering. So we can't stipulate via config that {{ssp-platform}} should always start ahead of {{ssp}}. (This was one motivation for Sakai "components", for example.) And we can't just swallow the exception as a rule b/c it's harmless except when it's not. I.e. while it usually represents a transient failure, if it happens repeatedly or any time _after_ {{ssp-platform}} startup, it does represent a serious problem worthy of stack trace logging. What probably needs to happen is one or both of two things: # Delay firing of the coach sync job to give {{ssp-platform}} a chance to start up # When invoking {{ssp-platform}} from a background job (where you have the luxury of retries), detect this particular failure mode and implement a backoff/retry loop that will fire up to a configurable limit.
    via by Dan McCallum,
    • java.lang.RuntimeException: java.lang.NullPointerException at org.jasig.portlet.utils.rest.SimpleCrossContextRestApiInvoker.doInvoke(SimpleCrossContextRestApiInvoker.java:183)[portal-rest-api-1.0.0-M3.jar:1.0.0-M3] at org.jasig.portlet.utils.rest.SimpleCrossContextRestApiInvoker.invoke(SimpleCrossContextRestApiInvoker.java:93)[portal-rest-api-1.0.0-M3.jar:1.0.0-M3] at org.jasig.ssp.service.impl.UPortalPersonAttributesService.searchForUsers(UPortalPersonAttributesService.java:209)[UPortalPersonAttributesService.class:na] at org.jasig.ssp.service.impl.UPortalPersonAttributesService.getCoaches(UPortalPersonAttributesService.java:260)[UPortalPersonAttributesService.class:na] at org.jasig.ssp.service.impl.PersonServiceImpl.getAllCoachUsernamesFromDirectory(PersonServiceImpl.java:553)[PersonServiceImpl.class:na] at org.jasig.ssp.service.impl.PersonServiceImpl.syncCoaches(PersonServiceImpl.java:619)[PersonServiceImpl.class:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.6.0_45] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[na:1.6.0_45] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[na:1.6.0_45] at java.lang.reflect.Method.invoke(Method.java:597)[na:1.6.0_45] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:319)[spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)[spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)[spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)[spring-tx-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)[spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)[spring-aop-3.1.2.RELEASE.jar:3.1.2.RELEASE] at com.sun.proxy.$Proxy52.syncCoaches(Unknown Source)[na:na] at org.jasig.ssp.service.impl.ScheduledTaskWrapperServiceImpl.syncCoaches(ScheduledTaskWrapperServiceImpl.java:87)[ScheduledTaskWrapperServiceImpl.class:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[na:1.6.0_45] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)[na:1.6.0_45] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[na:1.6.0_45] at java.lang.reflect.Method.invoke(Method.java:597)[na:1.6.0_45] at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:64)[spring-context-3.1.2.RELEASE.jar:3.1.2.RELEASE] at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:53)[spring-context-3.1.2.RELEASE.jar:3.1.2.RELEASE] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)[na:1.6.0_45] at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)[na:1.6.0_45] at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)[na:1.6.0_45] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)[na:1.6.0_45] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)[na:1.6.0_45] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)[na:1.6.0_45] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)[na:1.6.0_45] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)[na:1.6.0_45] at java.lang.Thread.run(Thread.java:662)[na:1.6.0_45] Caused by: java.lang.NullPointerException: null at org.jasig.portlet.utils.rest.SimpleCrossContextRestApiInvoker.doInvoke(SimpleCrossContextRestApiInvoker.java:175)[portal-rest-api-1.0.0-M3.jar:1.0.0-M3] ... 32 more
    No Bugmate found.