cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nikita Timofeev (Jira)" <>
Subject [jira] [Commented] (CAY-2607) java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Long
Date Mon, 26 Aug 2019 12:10:00 GMT


Nikita Timofeev commented on CAY-2607:

Hi [~jeisonmp]!
Thanks for your report. Could you please show what does your DB layer look like? I'm interested
in the DB type of ID_COD_VERIF field in the Cayenne model.

> java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Long
> --------------------------------------------------------------------------------
>                 Key: CAY-2607
>                 URL:
>             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
at org.apache.cayenne.reflect.generic.DataObjectBaseProperty.writePropertyDirectly(
at org.apache.cayenne.access.DataDomainSyncBucket.postprocess(
at org.apache.cayenne.access.DataDomainInsertBucket.postprocess(
at org.apache.cayenne.access.DataDomainFlushAction.postprocess(
at org.apache.cayenne.access.DataDomainFlushAction.flush( at
org.apache.cayenne.access.DataDomain.onSyncFlush( at org.apache.cayenne.access.DataDomain.onSyncNoFilters(
at org.apache.cayenne.access.DataDomain$DataDomainSyncFilterChain.onSync(
at org.apache.cayenne.tx.TransactionFilter.lambda$onSync$0( at org.apache.cayenne.tx.DefaultTransactionManager$BaseTransactionHandler.performInTransaction(
at org.apache.cayenne.tx.DefaultTransactionManager$BaseTransactionHandler.performInNewTransaction(
at org.apache.cayenne.tx.DefaultTransactionManager$NestedTransactionHandler.handle(
at org.apache.cayenne.tx.DefaultTransactionManager.performInTransaction(
at org.apache.cayenne.tx.DefaultTransactionManager.performInTransaction(
at org.apache.cayenne.tx.TransactionFilter.onSync( at org.apache.cayenne.access.DataDomain$DataDomainSyncFilterChain.onSync(
at org.apache.cayenne.access.DataDomain.onSync( at org.apache.cayenne.access.DataContext.flushToParent(
... 53 more

This message was sent by Atlassian Jira

View raw message