quarkus: Entity is loaded twice and error happens for the 2nd loading

Hi,

We have migrated our project from Wildfly to Quarkus. When sometimes a fields is marked as eager loading or in a query with “join fetch”, entities may be loaded twice and the exception happens for the 2nd loading. We’ll have to make them all lazy loading or remove “fetch” in the query to workaround them. However, it never happened before the migration. And I have tried hard but still couldn’t reproduce it in a small project.

The stack trace logs where it shows client[ID=127] were loaded twice and the exception throws at the 2nd time. Exception shows org.hibernate.TypeMismatchException: Provided id of the wrong type for class com.britensw.nyx.clients.core.model.Client. Expected: class java.lang.Integer, got class com.britensw.nyx.clients.core.model.Client

This is the detailed log. (executor-thread-203) select securityin0_.id as id2_0_0_, portfolio1_.id as id1_229_1_, securityin0_.account_class as account_1_0_0_, securityin0_.portfolio_id as portfol21_0_0_, portfolio1_.client_id as client_11_229_1_, portfolio1_.client_tag as client_t2_229_1_, portfolio1_.default_management_group_subscription as default12_229_1_, portfolio1_.disposal_method as disposal3_229_1_, portfolio1_.end_date as end_date4_229_1_, portfolio1_.locked_year as locked_y5_229_1_, portfolio1_.long_term_yield_requirement as long_ter6_229_1_, portfolio1_.purchase_allowed as purchase7_229_1_, portfolio1_.roa_date as roa_date8_229_1_, portfolio1_.sale_allowed as sale_all9_229_1_, portfolio1_.start_date as start_d10_229_1_ from pluto.account securityin0_ inner join pluto.portfolio portfolio1_ on securityin0_.portfolio_id=portfolio1_.id cross join pluto.client client4_ where securityin0_.account_class=6 and portfolio1_.client_id=client4_.id and securityin0_.account_class=? and (securityin0_.id in (select account2_.income_account from pluto.account account2_ cross join pluto.account account3_ where account2_.account_class in (11, 40, 37, 25, 21, 32, 10, 30, 29, 14, 22, 28, 13, 36, 44, 3, 20, 27, 33, 17, 7, 46, 39, 15, 47, 42, 34, 45, 26, 19, 9, 6, 38, 24, 43, 41, 23, 4, 8, 2, 35, 12) and account2_.income_account=account3_.id and account2_.account_class=? and account2_.security=?)) and securityin0_.portfolio_id=? and (client4_.date_left is null) and client4_.example_client=false 2020-10-19 10:28:43,278 DEBUG [org.hib.loa.Loader] (executor-thread-203) Result set row: 0 2020-10-19 10:28:43,278 DEBUG [org.hib.loa.Loader] (executor-thread-203) Result row: EntityKey[com.britensw.nyx.portfolio.model.accounts.SecurityIncomeAccount#653807], EntityKey[com.britensw.nyx.portfolio.model.Portfolio#116] 2020-10-19 10:28:43,278 DEBUG [org.hib.loa.Loader] (executor-thread-203) Result set row: 1 2020-10-19 10:28:43,278 DEBUG [org.hib.loa.Loader] (executor-thread-203) Result row: EntityKey[com.britensw.nyx.portfolio.model.accounts.SecurityIncomeAccount#652135], EntityKey[com.britensw.nyx.portfolio.model.Portfolio#116] 2020-10-19 10:28:43,278 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Resolving attributes for [com.britensw.nyx.portfolio.model.Portfolio#116] 2020-10-19 10:28:43,278 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Processing attribute brokerAccounts : value = <un-fetched> 2020-10-19 10:28:43,278 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Resolving <un-fetched> attribute : brokerAccounts 2020-10-19 10:28:43,278 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Processing attribute client : value = 127 2020-10-19 10:28:43,278 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Attribute (client) - enhanced for lazy-loading? - false 2020-10-19 10:28:43,278 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Processing attribute clientTag : value = WHOLE_SALE 2020-10-19 10:28:43,278 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Attribute (clientTag) - enhanced for lazy-loading? - false 2020-10-19 10:28:43,278 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Processing attribute defaultManagementGroupSubscription : value = 90 2020-10-19 10:28:43,278 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Attribute (defaultManagementGroupSubscription) - enhanced for lazy-loading? - false 2020-10-19 10:28:43,278 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Processing attribute disposalMethod : value = MINIMISE_GAIN 2020-10-19 10:28:43,278 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Attribute (disposalMethod) - enhanced for lazy-loading? - false 2020-10-19 10:28:43,278 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Processing attribute endDate : value = null 2020-10-19 10:28:43,278 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Attribute (endDate) - enhanced for lazy-loading? - false 2020-10-19 10:28:43,278 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Processing attribute lockedYear : value = null 2020-10-19 10:28:43,278 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Attribute (lockedYear) - enhanced for lazy-loading? - false 2020-10-19 10:28:43,278 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Processing attribute longTermYieldRequirement : value = null 2020-10-19 10:28:43,278 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Attribute (longTermYieldRequirement) - enhanced for lazy-loading? - false 2020-10-19 10:28:43,278 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Processing attribute managementGroupSubscriptions : value = <un-fetched> 2020-10-19 10:28:43,278 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Resolving <un-fetched> attribute : managementGroupSubscriptions 2020-10-19 10:28:43,278 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Processing attribute purchaseAllowed : value = true 2020-10-19 10:28:43,278 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Attribute (purchaseAllowed) - enhanced for lazy-loading? - false 2020-10-19 10:28:43,278 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Processing attribute regularPayments : value = <un-fetched> 2020-10-19 10:28:43,278 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Resolving <un-fetched> attribute : regularPayments 2020-10-19 10:28:43,278 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Processing attribute roaDate : value = null 2020-10-19 10:28:43,279 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Attribute (roaDate) - enhanced for lazy-loading? - false 2020-10-19 10:28:43,279 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Processing attribute saleAllowed : value = true 2020-10-19 10:28:43,279 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Attribute (saleAllowed) - enhanced for lazy-loading? - false 2020-10-19 10:28:43,279 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Processing attribute startDate : value = 2005-07-01 2020-10-19 10:28:43,279 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Attribute (startDate) - enhanced for lazy-loading? - false 2020-10-19 10:28:43,279 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Adding entity to second-level cache: [com.britensw.nyx.portfolio.model.Portfolio#116] 2020-10-19 10:28:43,279 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Done materializing entity [com.britensw.nyx.portfolio.model.Portfolio#116] 2020-10-19 10:28:43,279 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Resolving attributes for [com.britensw.nyx.portfolio.model.accounts.SecurityIncomeAccount#652135] 2020-10-19 10:28:43,279 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Processing attribute accountClass : value = SECURITY_INCOME_ACCOUNT 2020-10-19 10:28:43,279 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Attribute (accountClass) - enhanced for lazy-loading? - false 2020-10-19 10:28:43,279 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Processing attribute accountTransactions : value = <un-fetched> 2020-10-19 10:28:43,279 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Resolving <un-fetched> attribute : accountTransactions 2020-10-19 10:28:43,279 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Processing attribute clientDocuments : value = <un-fetched> 2020-10-19 10:28:43,279 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Resolving <un-fetched> attribute : clientDocuments 2020-10-19 10:28:43,279 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Processing attribute portfolio : value = 116 2020-10-19 10:28:43,279 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Attribute (portfolio) - enhanced for lazy-loading? - false 2020-10-19 10:28:43,279 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Processing attribute securityAccount : value = 652135 2020-10-19 10:28:43,279 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Attribute (securityAccount) - enhanced for lazy-loading? - false 2020-10-19 10:28:43,279 DEBUG [org.hib.loa.Loader] (executor-thread-203) Loading entity: [com.britensw.nyx.portfolio.model.accounts.SecurityAccount#652135] 2020-10-19 10:28:43,279 DEBUG [org.hib.SQL] (executor-thread-203) select securityac0_.id as id2_0_1_, securityac0_.account_class as account_1_0_1_, securityac0_.portfolio_id as portfol21_0_1_, securityac0_.broker_account as broker_33_0_1_, securityac0_.capital_gain_account as capital34_0_1_, securityac0_.drp_account as drp_acc35_0_1_, securityac0_.frozen_till as frozen_16_0_1_, securityac0_.import_allowed as import_17_0_1_, securityac0_.income_account as income_28_0_1_, securityac0_.management_group_subscription as managem24_0_1_, securityac0_.manual_tax_calculation as manual_18_0_1_, securityac0_.security as securit36_0_1_, securityac0_.srn as srn19_0_1_, securityac0_.warrant_liability as warrant37_0_1_, management1_.id as id1_186_0_, management1_.bank_account_id as bank_acc6_186_0_, management1_.default_broker_account as default_7_186_0_, management1_.days_cash_reserve as days_cas2_186_0_, management1_.management_group as manageme8_186_0_, management1_.minimum_trade_size as minimum_3_186_0_, management1_.name as name4_186_0_, management1_.portfolio as portfoli9_186_0_, management1_.reportable as reportab5_186_0_ from pluto.account securityac0_ left outer join pluto.management_group_subscription management1_ on securityac0_.management_group_subscription=management1_.id where securityac0_.income_account=? and securityac0_.account_class=4 2020-10-19 10:28:43,279 DEBUG [org.hib.loa.Loader] (executor-thread-203) Result set row: 0 2020-10-19 10:28:43,279 DEBUG [org.hib.loa.Loader] (executor-thread-203) Result row: EntityKey[com.britensw.nyx.portfolio.model.ManagementGroupSubscription#228], EntityKey[com.britensw.nyx.portfolio.model.accounts.SecurityAccount#652136] 2020-10-19 10:28:43,279 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Resolving attributes for [com.britensw.nyx.portfolio.model.ManagementGroupSubscription#228] 2020-10-19 10:28:43,279 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Processing attribute bankAccount : value = null 2020-10-19 10:28:43,279 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Attribute (bankAccount) - enhanced for lazy-loading? - false 2020-10-19 10:28:43,279 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Processing attribute brokerAccount : value = null 2020-10-19 10:28:43,280 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Attribute (brokerAccount) - enhanced for lazy-loading? - false 2020-10-19 10:28:43,280 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Processing attribute brokerAccounts : value = <un-fetched> 2020-10-19 10:28:43,280 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Resolving <un-fetched> attribute : brokerAccounts 2020-10-19 10:28:43,280 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Processing attribute daysCashReserve : value = 90 2020-10-19 10:28:43,280 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Attribute (daysCashReserve) - enhanced for lazy-loading? - false 2020-10-19 10:28:43,280 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Processing attribute managementGroup : value = 2 2020-10-19 10:28:43,280 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Attribute (managementGroup) - enhanced for lazy-loading? - false 2020-10-19 10:28:43,280 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Processing attribute managementGroupMasterPortfolios : value = <un-fetched> 2020-10-19 10:28:43,280 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Resolving <un-fetched> attribute : managementGroupMasterPortfolios 2020-10-19 10:28:43,280 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Processing attribute managementGroupSubscriptionAssetClassFreezes : value = <un-fetched> 2020-10-19 10:28:43,280 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Resolving <un-fetched> attribute : managementGroupSubscriptionAssetClassFreezes 2020-10-19 10:28:43,280 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Processing attribute managementGroupSubscriptionSecurityFreezes : value = <un-fetched> 2020-10-19 10:28:43,280 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Resolving <un-fetched> attribute : managementGroupSubscriptionSecurityFreezes 2020-10-19 10:28:43,280 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Processing attribute minimumTradeSize : value = null 2020-10-19 10:28:43,280 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Attribute (minimumTradeSize) - enhanced for lazy-loading? - false 2020-10-19 10:28:43,280 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Processing attribute name : value = null 2020-10-19 10:28:43,280 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Attribute (name) - enhanced for lazy-loading? - false 2020-10-19 10:28:43,280 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Processing attribute portfolio : value = 116 2020-10-19 10:28:43,280 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Attribute (portfolio) - enhanced for lazy-loading? - false 2020-10-19 10:28:43,280 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Processing attribute reportable : value = true 2020-10-19 10:28:43,280 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Attribute (reportable) - enhanced for lazy-loading? - false 2020-10-19 10:28:43,280 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Adding entity to second-level cache: [com.britensw.nyx.portfolio.model.ManagementGroupSubscription#228] 2020-10-19 10:28:43,280 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Done materializing entity [com.britensw.nyx.portfolio.model.ManagementGroupSubscription#228] 2020-10-19 10:28:43,280 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Resolving attributes for [com.britensw.nyx.portfolio.model.accounts.SecurityAccount#652136] 2020-10-19 10:28:43,280 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Processing attribute accountClass : value = SECURITY_ACCOUNT 2020-10-19 10:28:43,281 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Attribute (accountClass) - enhanced for lazy-loading? - false 2020-10-19 10:28:43,281 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Processing attribute accountTransactions : value = <un-fetched> 2020-10-19 10:28:43,281 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Resolving <un-fetched> attribute : accountTransactions 2020-10-19 10:28:43,281 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Processing attribute clientDocuments : value = <un-fetched> 2020-10-19 10:28:43,281 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Resolving <un-fetched> attribute : clientDocuments 2020-10-19 10:28:43,281 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Processing attribute portfolio : value = 116 2020-10-19 10:28:43,281 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Attribute (portfolio) - enhanced for lazy-loading? - false 2020-10-19 10:28:43,281 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Processing attribute brokerAccount : value = 80 2020-10-19 10:28:43,281 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Attribute (brokerAccount) - enhanced for lazy-loading? - false 2020-10-19 10:28:43,281 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Processing attribute capitalGainsAccount : value = null 2020-10-19 10:28:43,281 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Attribute (capitalGainsAccount) - enhanced for lazy-loading? - false 2020-10-19 10:28:43,281 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Processing attribute drpAccount : value = null 2020-10-19 10:28:43,281 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Attribute (drpAccount) - enhanced for lazy-loading? - false 2020-10-19 10:28:43,281 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Processing attribute frozenTill : value = null 2020-10-19 10:28:43,281 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Attribute (frozenTill) - enhanced for lazy-loading? - false 2020-10-19 10:28:43,281 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Processing attribute importAllowed : value = true 2020-10-19 10:28:43,281 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Attribute (importAllowed) - enhanced for lazy-loading? - false 2020-10-19 10:28:43,281 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Processing attribute incomeAccount : value = 652135 2020-10-19 10:28:43,281 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Attribute (incomeAccount) - enhanced for lazy-loading? - false 2020-10-19 10:28:43,281 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Processing attribute managementGroupSubscription : value = 228 2020-10-19 10:28:43,281 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Attribute (managementGroupSubscription) - enhanced for lazy-loading? - false 2020-10-19 10:28:43,281 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Processing attribute manualTaxCalculation : value = false 2020-10-19 10:28:43,281 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Attribute (manualTaxCalculation) - enhanced for lazy-loading? - false 2020-10-19 10:28:43,281 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Processing attribute security : value = 24441 2020-10-19 10:28:43,281 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Attribute (security) - enhanced for lazy-loading? - false 2020-10-19 10:28:43,281 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Processing attribute srn : value = null 2020-10-19 10:28:43,281 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Attribute (srn) - enhanced for lazy-loading? - false 2020-10-19 10:28:43,281 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Processing attribute stopLosses : value = <un-fetched> 2020-10-19 10:28:43,281 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Resolving <un-fetched> attribute : stopLosses 2020-10-19 10:28:43,281 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Processing attribute warrantLiability : value = null 2020-10-19 10:28:43,281 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Attribute (warrantLiability) - enhanced for lazy-loading? - false 2020-10-19 10:28:43,281 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Adding entity to second-level cache: [com.britensw.nyx.portfolio.model.accounts.SecurityAccount#652136] 2020-10-19 10:28:43,281 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Done materializing entity [com.britensw.nyx.portfolio.model.accounts.SecurityAccount#652136] 2020-10-19 10:28:43,282 DEBUG [org.hib.eng.jdb.int.JdbcCoordinatorImpl] (executor-thread-203) Skipping aggressive release due to registered resources 2020-10-19 10:28:43,282 DEBUG [org.hib.loa.Loader] (executor-thread-203) Done entity load 2020-10-19 10:28:43,282 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Adding entity to second-level cache: [com.britensw.nyx.portfolio.model.accounts.SecurityIncomeAccount#652135] 2020-10-19 10:28:43,282 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Done materializing entity [com.britensw.nyx.portfolio.model.accounts.SecurityIncomeAccount#652135] 2020-10-19 10:28:43,282 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Resolving attributes for [com.britensw.nyx.portfolio.model.Portfolio#116] 2020-10-19 10:28:43,282 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Processing attribute brokerAccounts : value = <un-fetched> 2020-10-19 10:28:43,282 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Resolving <un-fetched> attribute : brokerAccounts 2020-10-19 10:28:43,282 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Processing attribute client : value = Client [ID: 127] 2020-10-19 10:28:43,282 DEBUG [org.hib.eng.int.TwoPhaseLoad] (executor-thread-203) Attribute (client) - enhanced for lazy-loading? - false 2020-10-19 10:28:43,282 DEBUG [org.hib.res.jdb.int.LogicalConnectionManagedImpl] (executor-thread-203) Initiating JDBC connection release from afterStatement 2020-10-19 10:28:43,283 DEBUG [org.hib.res.jdb.int.LogicalConnectionManagedImpl] (executor-thread-203) Initiating JDBC connection release from afterTransaction 2020-10-19 10:28:43,283 DEBUG [org.hib.eng.tra.int.TransactionImpl] (executor-thread-203) TransactionImpl created on closed Session/EntityManager 2020-10-19 10:28:43,283 DEBUG [org.hib.eng.tra.int.TransactionImpl] (executor-thread-203) On TransactionImpl creation, JpaCompliance#isJpaTransactionComplianceEnabled == false 2020-10-19 10:28:43,290 ERROR [io.und.req.io] (executor-thread-203) Exception handling request 2c0a1f64-46ce-43e2-9367-26c0dcc24f1b-3 to /rest/clients/portfolio/transaction-search/match: org.jboss.resteasy.spi.UnhandledException: java.lang.IllegalArgumentException: org.hibernate.TypeMismatchException: Provided id of the wrong type for class com.britensw.nyx.clients.core.model.Client. Expected: class java.lang.Integer, got class com.britensw.nyx.clients.core.model.Client

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 15 (10 by maintainers)

Most upvoted comments

Fix was merged. This will be fixed in Quarkus when we upgrade to ORM 5.5.4.Final (which must first be released).

@yrodiere +1 for you to take it. Thanks!