Uploaded image for project: 'Cayenne'
  1. Cayenne
  2. CAY-2607

java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Long

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Cannot Reproduce
    • 4.1.B2
    • 4.2.B1
    • Modeler

    Description

      I have a PK property in table of oracle database, type NUMERIC(19).

      Modeler generate correct the type this property to Long, but a runtime Exception when cast Objet to Long.

      I dont know when this error occurs, because any times this error dont occurs.

       

      The Log Error is:

      Caused by: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.LongCaused by: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Long at br.com.getnet.portais.minhaconta.atendimento.domain.minhaconta.model.auto._CodigoVerificacaoEntity.writePropertyDirectly(_CodigoVerificacaoEntity.java:128) at org.apache.cayenne.reflect.generic.DataObjectBaseProperty.writePropertyDirectly(DataObjectBaseProperty.java:84) at org.apache.cayenne.access.DataDomainSyncBucket.postprocess(DataDomainSyncBucket.java:178) at org.apache.cayenne.access.DataDomainInsertBucket.postprocess(DataDomainInsertBucket.java:214) at org.apache.cayenne.access.DataDomainFlushAction.postprocess(DataDomainFlushAction.java:248) at org.apache.cayenne.access.DataDomainFlushAction.flush(DataDomainFlushAction.java:155) at org.apache.cayenne.access.DataDomain.onSyncFlush(DataDomain.java:624) at org.apache.cayenne.access.DataDomain.onSyncNoFilters(DataDomain.java:594) at org.apache.cayenne.access.DataDomain$DataDomainSyncFilterChain.onSync(DataDomain.java:822) at org.apache.cayenne.tx.TransactionFilter.lambda$onSync$0(TransactionFilter.java:61) at org.apache.cayenne.tx.DefaultTransactionManager$BaseTransactionHandler.performInTransaction(DefaultTransactionManager.java:183) at org.apache.cayenne.tx.DefaultTransactionManager$BaseTransactionHandler.performInNewTransaction(DefaultTransactionManager.java:155) at org.apache.cayenne.tx.DefaultTransactionManager$NestedTransactionHandler.handle(DefaultTransactionManager.java:98) at org.apache.cayenne.tx.DefaultTransactionManager.performInTransaction(DefaultTransactionManager.java:65) at org.apache.cayenne.tx.DefaultTransactionManager.performInTransaction(DefaultTransactionManager.java:43) at org.apache.cayenne.tx.TransactionFilter.onSync(TransactionFilter.java:61) at org.apache.cayenne.access.DataDomain$DataDomainSyncFilterChain.onSync(DataDomain.java:821) at org.apache.cayenne.access.DataDomain.onSync(DataDomain.java:581) at org.apache.cayenne.access.DataContext.flushToParent(DataContext.java:742) ... 53 more

      Attachments

        1. cayenne - error Cast Int to Long.PNG
          104 kB
          MAX JEISON PRASS

        Activity

          People

            ntimofeev Nikita Timofeev
            jeisonmp MAX JEISON PRASS
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: