java.lang.IllegalArgumentException: Cannot format given Object as a Number

Kuali JIRA | Kris Keithly | 4 years ago
  1. 0

    When creating a new asset, the fields for accumulated depreciation and period depreciation amounts are defaulted to (null) in CM_AST_PAYMENT_T. This causes issues with the assetDepreciationBatchJob as it is expecting a number to use for the depreciation calculation. The following stack trace occurs in the depr log: 4] u:/d: INFO org.kuali.kfs.module.cam.document.dataaccess.impl.DepreciableAssetsDaoOjb :: DEPRECIATION BATCH - Getting assets payment row count, depreciation base amount, accumulated depreciation amount, and every months depreciation amount. 2013-04-30 10:41:08,208 [scheduler_Worker-4] u:/d: ERROR org.kuali.kfs.module.cam.batch.service.impl.AssetDepreciationServiceImpl :: Error occurred 2013-04-30 10:41:08,208 [scheduler_Worker-4] u:/d: ERROR org.kuali.kfs.module.cam.batch.service.impl.AssetDepreciationServiceImpl :: DEPRECIATION BATCH - ************************************************************************** 2013-04-30 10:41:08,209 [scheduler_Worker-4] u:/d: ERROR org.kuali.kfs.module.cam.batch.service.impl.AssetDepreciationServiceImpl :: DEPRECIATION BATCH - AN ERROR HAS OCCURRED! - ERROR: Cannot format given Object as a Number java.lang.IllegalArgumentException: Cannot format given Object as a Number at java.text.DecimalFormat.format(DecimalFormat.java:486) at java.text.Format.format(Format.java:140) at org.kuali.kfs.module.cam.document.dataaccess.impl.DepreciableAssetsDaoOjb.generateStatistics(DepreciableAssetsDaoOjb.java:161) at org.kuali.kfs.module.cam.batch.service.impl.AssetDepreciationServiceImpl.runDepreciation(AssetDepreciationServiceImpl.java:177) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318) 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 $Proxy496.runDepreciation(Unknown Source) at org.kuali.kfs.module.cam.batch.AssetDepreciationStep.execute(AssetDepreciationStep.java:35) at org.kuali.kfs.sys.batch.Job.runStep(Job.java:175) at org.kuali.kfs.sys.batch.Job.execute(Job.java:121) at org.quartz.core.JobRunShell.run(JobRunShell.java:216) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549) I did a SQL update to replace the (null)s with zeros and the batch job succeeded and posted correctly. To keep consistency in this table, these fields should default to zero rather than (null)

    Kuali JIRA | 4 years ago | Kris Keithly
    java.lang.IllegalArgumentException: Cannot format given Object as a Number
  2. 0

    When creating a new asset, the fields for accumulated depreciation and period depreciation amounts are defaulted to (null) in CM_AST_PAYMENT_T. This causes issues with the assetDepreciationBatchJob as it is expecting a number to use for the depreciation calculation. The following stack trace occurs in the depr log: 4] u:/d: INFO org.kuali.kfs.module.cam.document.dataaccess.impl.DepreciableAssetsDaoOjb :: DEPRECIATION BATCH - Getting assets payment row count, depreciation base amount, accumulated depreciation amount, and every months depreciation amount. 2013-04-30 10:41:08,208 [scheduler_Worker-4] u:/d: ERROR org.kuali.kfs.module.cam.batch.service.impl.AssetDepreciationServiceImpl :: Error occurred 2013-04-30 10:41:08,208 [scheduler_Worker-4] u:/d: ERROR org.kuali.kfs.module.cam.batch.service.impl.AssetDepreciationServiceImpl :: DEPRECIATION BATCH - ************************************************************************** 2013-04-30 10:41:08,209 [scheduler_Worker-4] u:/d: ERROR org.kuali.kfs.module.cam.batch.service.impl.AssetDepreciationServiceImpl :: DEPRECIATION BATCH - AN ERROR HAS OCCURRED! - ERROR: Cannot format given Object as a Number java.lang.IllegalArgumentException: Cannot format given Object as a Number at java.text.DecimalFormat.format(DecimalFormat.java:486) at java.text.Format.format(Format.java:140) at org.kuali.kfs.module.cam.document.dataaccess.impl.DepreciableAssetsDaoOjb.generateStatistics(DepreciableAssetsDaoOjb.java:161) at org.kuali.kfs.module.cam.batch.service.impl.AssetDepreciationServiceImpl.runDepreciation(AssetDepreciationServiceImpl.java:177) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318) 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 $Proxy496.runDepreciation(Unknown Source) at org.kuali.kfs.module.cam.batch.AssetDepreciationStep.execute(AssetDepreciationStep.java:35) at org.kuali.kfs.sys.batch.Job.runStep(Job.java:175) at org.kuali.kfs.sys.batch.Job.execute(Job.java:121) at org.quartz.core.JobRunShell.run(JobRunShell.java:216) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549) I did a SQL update to replace the (null)s with zeros and the batch job succeeded and posted correctly. To keep consistency in this table, these fields should default to zero rather than (null)

    Kuali JIRA | 4 years ago | Kris Keithly
    java.lang.IllegalArgumentException: Cannot format given Object as a Number
  3. 0

    When creating a new asset, the fields for accumulated depreciation and period depreciation amounts are defaulted to (null) in CM_AST_PAYMENT_T. This causes issues with the assetDepreciationBatchJob as it is expecting a number to use for the depreciation calculation. The following stack trace occurs in the depr log: 4] u:/d: INFO org.kuali.kfs.module.cam.document.dataaccess.impl.DepreciableAssetsDaoOjb :: DEPRECIATION BATCH - Getting assets payment row count, depreciation base amount, accumulated depreciation amount, and every months depreciation amount. 2013-04-30 10:41:08,208 [scheduler_Worker-4] u:/d: ERROR org.kuali.kfs.module.cam.batch.service.impl.AssetDepreciationServiceImpl :: Error occurred 2013-04-30 10:41:08,208 [scheduler_Worker-4] u:/d: ERROR org.kuali.kfs.module.cam.batch.service.impl.AssetDepreciationServiceImpl :: DEPRECIATION BATCH - ************************************************************************** 2013-04-30 10:41:08,209 [scheduler_Worker-4] u:/d: ERROR org.kuali.kfs.module.cam.batch.service.impl.AssetDepreciationServiceImpl :: DEPRECIATION BATCH - AN ERROR HAS OCCURRED! - ERROR: Cannot format given Object as a Number java.lang.IllegalArgumentException: Cannot format given Object as a Number at java.text.DecimalFormat.format(DecimalFormat.java:486) at java.text.Format.format(Format.java:140) at org.kuali.kfs.module.cam.document.dataaccess.impl.DepreciableAssetsDaoOjb.generateStatistics(DepreciableAssetsDaoOjb.java:161) at org.kuali.kfs.module.cam.batch.service.impl.AssetDepreciationServiceImpl.runDepreciation(AssetDepreciationServiceImpl.java:177) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318) 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 $Proxy496.runDepreciation(Unknown Source) at org.kuali.kfs.module.cam.batch.AssetDepreciationStep.execute(AssetDepreciationStep.java:35) at org.kuali.kfs.sys.batch.Job.runStep(Job.java:175) at org.kuali.kfs.sys.batch.Job.execute(Job.java:121) at org.quartz.core.JobRunShell.run(JobRunShell.java:216) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549) I did a SQL update to replace the (null)s with zeros and the batch job succeeded and posted correctly. To keep consistency in this table, these fields should default to zero rather than (null)

    Kuali JIRA | 4 years ago | Kris Keithly
    java.lang.IllegalArgumentException: Cannot format given Object as a Number
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Illegal Argument Exception

    Stack Overflow | 3 years ago | user2954611
    java.lang.IllegalArgumentException: Cannot format given Object as a Number
  6. 0

    How to format string in java with Formatter

    Stack Overflow | 4 years ago | Scorpion
    java.lang.IllegalArgumentException: Cannot format given Object as a Number

  1. DoktorDoener666 3 times, last 1 week ago
  2. ajinkya_w 1 times, last 2 months ago
  3. MoYapro 12 times, last 2 months ago
  4. Stefan Braune 6 times, last 4 months ago
  5. adawolfs 1 times, last 5 months ago
3 more registered users
8 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.IllegalArgumentException

    Cannot format given Object as a Number

    at java.text.DecimalFormat.format()
  2. Java RT
    Format.format
    1. java.text.DecimalFormat.format(DecimalFormat.java:486)
    2. java.text.Format.format(Format.java:140)
    2 frames
  3. org.kuali.kfs
    AssetDepreciationServiceImpl.runDepreciation
    1. org.kuali.kfs.module.cam.document.dataaccess.impl.DepreciableAssetsDaoOjb.generateStatistics(DepreciableAssetsDaoOjb.java:161)
    2. org.kuali.kfs.module.cam.batch.service.impl.AssetDepreciationServiceImpl.runDepreciation(AssetDepreciationServiceImpl.java:177)
    2 frames
  4. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    4. java.lang.reflect.Method.invoke(Method.java:597)
    4 frames
  5. Spring AOP
    ReflectiveMethodInvocation.proceed
    1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:318)
    2. org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
    3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
    3 frames
  6. Spring Tx
    TransactionInterceptor.invoke
    1. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
    1 frame
  7. Spring AOP
    JdkDynamicAopProxy.invoke
    1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
    2 frames
  8. Unknown
    $Proxy496.runDepreciation
    1. $Proxy496.runDepreciation(Unknown Source)
    1 frame
  9. org.kuali.kfs
    Job.execute
    1. org.kuali.kfs.module.cam.batch.AssetDepreciationStep.execute(AssetDepreciationStep.java:35)
    2. org.kuali.kfs.sys.batch.Job.runStep(Job.java:175)
    3. org.kuali.kfs.sys.batch.Job.execute(Job.java:121)
    3 frames
  10. quartz
    SimpleThreadPool$WorkerThread.run
    1. org.quartz.core.JobRunShell.run(JobRunShell.java:216)
    2. org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549)
    2 frames