NullPointerException can occur if price location lookup fails

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major
    • Component/s: Price
    • None

      Found this exception when the price location lookup service failed to return for some reason:

      2011-11-05 17:26:07 INFO node.job.DatumDataSourceLoggerJob - Got Datum to persist: PriceDatum

      {locationId=null,sourceId=HAY2201,price=66.9}

      2011-11-05 17:26:07 ERROR node.job.DatumDataSourceLoggerJob - Exception in job [DatumDataSourceLoggerJob]: java.lang.NullPointerException
      java.lang.NullPointerException
      at net.solarnetwork.node.dao.jdbc.price.JdbcPriceDatumDao.setStoreStatementValues(JdbcPriceDatumDao.java:193)
      at net.solarnetwork.node.dao.jdbc.price.JdbcPriceDatumDao.setStoreStatementValues(JdbcPriceDatumDao.java:88)
      at net.solarnetwork.node.dao.jdbc.AbstractJdbcDao$1.createPreparedStatement(AbstractJdbcDao.java:123)
      at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:580)
      at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:842)
      at net.solarnetwork.node.dao.jdbc.AbstractJdbcDao.storeDomainObject(AbstractJdbcDao.java:118)
      at net.solarnetwork.node.dao.jdbc.AbstractJdbcDatumDao.storeDomainObject(AbstractJdbcDatumDao.java:305)
      at net.solarnetwork.node.dao.jdbc.price.JdbcPriceDatumDao.storeDatum(JdbcPriceDatumDao.java:150)
      at net.solarnetwork.node.dao.jdbc.price.JdbcPriceDatumDao.storeDatum(JdbcPriceDatumDao.java:88)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:616)
      at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
      at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
      at $Proxy49.storeDatum(Unknown Source)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:616)
      at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
      at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58)
      at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
      at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:56)
      at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:39)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      at org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
      at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
      at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
      at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
      at $Proxy11.storeDatum(Unknown Source)
      at net.solarnetwork.node.job.DatumDataSourceLoggerJob.executeInternal(DatumDataSourceLoggerJob.java:119)
      at net.solarnetwork.node.job.AbstractJob.execute(AbstractJob.java:58)
      at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
      at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:525)

            Assignee:
            Matt Magoffin
            Reporter:
            Matt Magoffin
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: