java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.lang.Boolean

JIRA | 7 years ago
  1. 0

    Action: test opal-221 -- Implement the export to Excel command Step: 1) create fresh databases 'opal' and 'key' for opal 1.0.1 2) issue an upgrade 3) import a zip file with 1 completed interview exported from onyx1.6.4 cohort ontario (please check the attachment, it's a non-encrypted zip file) 4) show variable table list 5) export tables to an excel file based on the listed tables Result: in step 4), the listed tables shown as follows: opal-keys opal-keys.keys opal-data-ohs opal-data-ohs.Participants opal-data-ohs.CIPreliminaryQuestionnaire opal-data-ohs.BloodSamplesCollection opal-data-ohs.HealthQuestionnaireNurse opal-data-ohs.Weight opal-data-ohs.BoneDensity opal-data-ohs.SalivaSamplesCollection opal-data-ohs.BloodPressure opal-data-ohs.ArmSpan opal-data-ohs.SittingHeight opal-data-ohs.GripStrength opal-data-ohs.AnkleBrachial opal-data-ohs.UrineSamplesCollection opal-data-ohs.HealthQuestionnaireTouchScreen opal-data-ohs.Impedance418 opal-data-ohs.ConclusionQuestionnaire opal-data-ohs.Instruments opal-data-ohs.Consent opal-data-ohs.StandingHeight opal-data-ohs.Hips opal-data-ohs.Spirometry opal-data-ohs.Waist opal-data-ohs.Workstations opal-data in step 5) among the tables, 3 kinds of errors happened when 7 of them being exported (others were exported correctly): --> Error 1: happened in tables: opal-data-ohs.BloodSamplesCollection opal-data-ohs.SalivaSamplesCollection opal-data-ohs.UrineSamplesCollection Error info from opal-error.log java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.lang.Boolean at org.obiba.magma.datasource.excel.support.ExcelUtil.setCellValue(ExcelUtil.java:30) at org.obiba.magma.datasource.excel.ExcelValueTableWriter$ExcelValueSetWriter.writeValue(ExcelValueTableWriter.java:229) at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:182) at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:158) at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:138) at org.obiba.opal.core.service.impl.DefaultExportServiceImpl.exportTablesToDatasource(DefaultExportServiceImpl.java:70) at org.obiba.opal.core.service.impl.DefaultExportServiceImpl.exportTablesToDatasource(DefaultExportServiceImpl.java:52) at org.obiba.opal.core.service.impl.DefaultExportServiceImpl.exportTablesToExcelFile(DefaultExportServiceImpl.java:87) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy47.exportTablesToExcelFile(Unknown Source) at org.obiba.opal.cli.client.command.ExportCommand.execute(ExportCommand.java:35) at org.obiba.opal.cli.client.OpalConsole.prompt(OpalConsole.java:136) at org.obiba.opal.cli.client.OpalConsole.<init>(OpalConsole.java:103) at org.obiba.opal.cli.client.OpalConsole.main(OpalConsole.java:185) --> Error 2: happened in table: opal-data-ohs.Participants Error info from opal-error.log: java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.lang.Long at org.obiba.magma.datasource.excel.support.ExcelUtil.setCellValue(ExcelUtil.java:36) at org.obiba.magma.datasource.excel.ExcelValueTableWriter$ExcelValueSetWriter.writeValue(ExcelValueTableWriter.java:229) at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:182) at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:158) at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:138) at org.obiba.opal.core.service.impl.DefaultExportServiceImpl.exportTablesToDatasource(DefaultExportServiceImpl.java:70) at org.obiba.opal.core.service.impl.DefaultExportServiceImpl.exportTablesToDatasource(DefaultExportServiceImpl.java:52) at org.obiba.opal.core.service.impl.DefaultExportServiceImpl.exportTablesToExcelFile(DefaultExportServiceImpl.java:87) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy39.exportTablesToExcelFile(Unknown Source) at org.obiba.opal.cli.client.command.ExportCommand.execute(ExportCommand.java:35) at org.obiba.opal.cli.client.OpalConsole.prompt(OpalConsole.java:136) at org.obiba.opal.cli.client.OpalConsole.<init>(OpalConsole.java:103) at org.obiba.opal.cli.client.OpalConsole.main(OpalConsole.java:185) --> Error 3: happened in tables: opal-data-ohs.CIPreliminaryQuestionnaire opal-data-ohs.HealthQuestionnaireNurse opal-data-ohs.HealthQuestionnaireTouchScreen Error info from opal-error.log: java.lang.IllegalArgumentException: Invalid column index (256). Allowable column range for BIFF8 is (0..255) or ('A'..'IV') at org.apache.poi.hssf.usermodel.HSSFCell.checkBounds(HSSFCell.java:926) at org.apache.poi.hssf.usermodel.HSSFCell.<init>(HSSFCell.java:162) at org.apache.poi.hssf.usermodel.HSSFRow.createCell(HSSFRow.java:141) at org.apache.poi.hssf.usermodel.HSSFRow.createCell(HSSFRow.java:38) at org.obiba.magma.datasource.excel.ExcelValueTable.getVariableColumn(ExcelValueTable.java:85) at org.obiba.magma.datasource.excel.ExcelValueTableWriter$ExcelVariableWriter.writeVariable(ExcelValueTableWriter.java:68) at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:170) at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:148) at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:138) at org.obiba.opal.core.service.impl.DefaultExportServiceImpl.exportTablesToDatasource(DefaultExportServiceImpl.java:70) at org.obiba.opal.core.service.impl.DefaultExportServiceImpl.exportTablesToDatasource(DefaultExportServiceImpl.java:52) at org.obiba.opal.core.service.impl.DefaultExportServiceImpl.exportTablesToExcelFile(DefaultExportServiceImpl.java:87) at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy47.exportTablesToExcelFile(Unknown Source) at org.obiba.opal.cli.client.command.ExportCommand.execute(ExportCommand.java:35) at org.obiba.opal.cli.client.OpalConsole.prompt(OpalConsole.java:136) at org.obiba.opal.cli.client.OpalConsole.<init>(OpalConsole.java:103) at org.obiba.opal.cli.client.OpalConsole.main(OpalConsole.java:185)

    JIRA | 7 years ago
    java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.lang.Boolean
  2. 0

    1) Import some Onyx data (attached file) into Opal 2) Define the following view in opal-config.xml : <org.obiba.magma.views.View> <name>testJoin3</name> <from class="org.obiba.magma.views.JoinTable"> <tables> <org.obiba.magma.support.ValueTableReference> <reference>a-datasource-with-views.Consent</reference> </org.obiba.magma.support.ValueTableReference> <org.obiba.magma.support.ValueTableReference> <reference>opal-data.Participants</reference> </org.obiba.magma.support.ValueTableReference> </tables> </from> </org.obiba.magma.views.View> 3) copy -o testmerge.xls a-datasource-with-views.testJoin The following Exception is thrown by Opal : java.lang.ClassCastException: org.obiba.magma.views.ValueSetWrapper cannot be cast to org.obiba.magma.datasource.hibernate.HibernateValueTable$HibernateValueSet at org.obiba.magma.datasource.hibernate.HibernateVariableValueSourceFactory$HibernateVariableValueSource.getValue(HibernateVariableValueSourceFactory.java:82) at org.obiba.magma.support.AbstractValueTable.getValue(AbstractValueTable.java:86) at org.obiba.magma.support.AbstractValueTableWrapper.getValue(AbstractValueTableWrapper.java:30) at org.obiba.magma.views.JoinTable.getValue(JoinTable.java:96) at org.obiba.magma.support.AbstractValueTableWrapper.getValue(AbstractValueTableWrapper.java:30) at org.obiba.magma.views.View.getValue(View.java:205) at org.obiba.magma.support.AbstractValueTableWrapper.getValue(AbstractValueTableWrapper.java:30) at org.obiba.magma.views.View.getValue(View.java:205) at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:186) at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:164) at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:144) at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:130) at org.obiba.opal.core.service.impl.DefaultExportServiceImpl.exportTablesToDatasource(DefaultExportServiceImpl.java:71) 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:307) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy38.exportTablesToDatasource(Unknown Source) at org.obiba.opal.shell.commands.CopyCommand.execute(CopyCommand.java:58) at org.obiba.opal.shell.AbstractOpalShell.executeCommand(AbstractOpalShell.java:94) at org.obiba.opal.shell.AbstractOpalShell.run(AbstractOpalShell.java:49) at java.lang.Thread.run(Thread.java:619)

    JIRA | 7 years ago | Martin Boulanger
    java.lang.ClassCastException: org.obiba.magma.views.ValueSetWrapper cannot be cast to org.obiba.magma.datasource.hibernate.HibernateValueTable$HibernateValueSet
  3. 0

    1) Import some Onyx data (attached file) into Opal 2) Define the following view in opal-config.xml : <org.obiba.magma.views.View> <name>testJoin3</name> <from class="org.obiba.magma.views.JoinTable"> <tables> <org.obiba.magma.support.ValueTableReference> <reference>a-datasource-with-views.Consent</reference> </org.obiba.magma.support.ValueTableReference> <org.obiba.magma.support.ValueTableReference> <reference>opal-data.Participants</reference> </org.obiba.magma.support.ValueTableReference> </tables> </from> </org.obiba.magma.views.View> 3) copy -o testmerge.xls a-datasource-with-views.testJoin The following Exception is thrown by Opal : java.lang.ClassCastException: org.obiba.magma.views.ValueSetWrapper cannot be cast to org.obiba.magma.datasource.hibernate.HibernateValueTable$HibernateValueSet at org.obiba.magma.datasource.hibernate.HibernateVariableValueSourceFactory$HibernateVariableValueSource.getValue(HibernateVariableValueSourceFactory.java:82) at org.obiba.magma.support.AbstractValueTable.getValue(AbstractValueTable.java:86) at org.obiba.magma.support.AbstractValueTableWrapper.getValue(AbstractValueTableWrapper.java:30) at org.obiba.magma.views.JoinTable.getValue(JoinTable.java:96) at org.obiba.magma.support.AbstractValueTableWrapper.getValue(AbstractValueTableWrapper.java:30) at org.obiba.magma.views.View.getValue(View.java:205) at org.obiba.magma.support.AbstractValueTableWrapper.getValue(AbstractValueTableWrapper.java:30) at org.obiba.magma.views.View.getValue(View.java:205) at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:186) at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:164) at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:144) at org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:130) at org.obiba.opal.core.service.impl.DefaultExportServiceImpl.exportTablesToDatasource(DefaultExportServiceImpl.java:71) 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:307) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy38.exportTablesToDatasource(Unknown Source) at org.obiba.opal.shell.commands.CopyCommand.execute(CopyCommand.java:58) at org.obiba.opal.shell.AbstractOpalShell.executeCommand(AbstractOpalShell.java:94) at org.obiba.opal.shell.AbstractOpalShell.run(AbstractOpalShell.java:49) at java.lang.Thread.run(Thread.java:619)

    JIRA | 7 years ago | Martin Boulanger
    java.lang.ClassCastException: org.obiba.magma.views.ValueSetWrapper cannot be cast to org.obiba.magma.datasource.hibernate.HibernateValueTable$HibernateValueSet
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Java Deserialization and ArrayList weird Exception

    Stack Overflow | 3 years ago | user3344570
    java.lang.ClassCastException: java.lang.Boolean cannot be cast to java.util.ArrayList
  6. 0

    Parsing of JSON schema with required properties fails

    GitHub | 4 months ago | benjaminbauer
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal de.androbit:raml-converter-maven-plugin:0.12:html (default) on project global_identifier_service: Execution default of goal de.androbit:raml-converter-maven-plugin:0.12:html failed: raml_template:64:19: java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.lang.Boolean raml_template:64:19

    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.ClassCastException

      java.util.ArrayList cannot be cast to java.lang.Boolean

      at org.obiba.magma.datasource.excel.support.ExcelUtil.setCellValue()
    2. org.obiba.magma
      DatasourceCopier.copy
      1. org.obiba.magma.datasource.excel.support.ExcelUtil.setCellValue(ExcelUtil.java:30)
      2. org.obiba.magma.datasource.excel.ExcelValueTableWriter$ExcelValueSetWriter.writeValue(ExcelValueTableWriter.java:229)
      3. org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:182)
      4. org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:158)
      5. org.obiba.magma.support.DatasourceCopier.copy(DatasourceCopier.java:138)
      5 frames
    3. org.obiba.opal
      DefaultExportServiceImpl.exportTablesToExcelFile
      1. org.obiba.opal.core.service.impl.DefaultExportServiceImpl.exportTablesToDatasource(DefaultExportServiceImpl.java:70)
      2. org.obiba.opal.core.service.impl.DefaultExportServiceImpl.exportTablesToDatasource(DefaultExportServiceImpl.java:52)
      3. org.obiba.opal.core.service.impl.DefaultExportServiceImpl.exportTablesToExcelFile(DefaultExportServiceImpl.java:87)
      3 frames
    4. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      4. java.lang.reflect.Method.invoke(Unknown Source)
      4 frames
    5. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
      2. org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
      3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
      3 frames
    6. Spring Tx
      TransactionInterceptor.invoke
      1. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
      1 frame
    7. Spring AOP
      JdkDynamicAopProxy.invoke
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      2 frames
    8. Unknown
      $Proxy47.exportTablesToExcelFile
      1. $Proxy47.exportTablesToExcelFile(Unknown Source)
      1 frame
    9. org.obiba.opal
      OpalConsole.main
      1. org.obiba.opal.cli.client.command.ExportCommand.execute(ExportCommand.java:35)
      2. org.obiba.opal.cli.client.OpalConsole.prompt(OpalConsole.java:136)
      3. org.obiba.opal.cli.client.OpalConsole.<init>(OpalConsole.java:103)
      4. org.obiba.opal.cli.client.OpalConsole.main(OpalConsole.java:185)
      4 frames