cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "MAX JEISON PRASS (Jira)" <j...@apache.org>
Subject [jira] [Updated] (CAY-2607) java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Long
Date Thu, 22 Aug 2019 12:46:00 GMT

     [ https://issues.apache.org/jira/browse/CAY-2607?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

MAX JEISON PRASS updated CAY-2607:
----------------------------------
    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

  was:
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
Objeto to Long.

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

 

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


> java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Long
> --------------------------------------------------------------------------------
>
>                 Key: CAY-2607
>                 URL: https://issues.apache.org/jira/browse/CAY-2607
>             Project: Cayenne
>          Issue Type: Bug
>          Components: Modeler
>    Affects Versions: 4.1.B2
>            Reporter: MAX JEISON PRASS
>            Assignee: Nikita Timofeev
>            Priority: Critical
>              Labels: easyfix
>             Fix For: 4.1.B3, 4.2.M1
>
>         Attachments: cayenne - error Cast Int to Long.PNG
>
>
> 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



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Mime
View raw message