sarvagya agarwal
12/13/2022, 5:14 AMjava.lang.RuntimeException: java.rmi.RemoteException: com.fasterxml.jackson.databind.exc.InvalidDefinitionException:Cannot construct instance of `com.arcesium.recon.workflow.domain.BreakAnalysis` (no Creators, like default constructor, exist): cannot deserialize from Object value (no delegate- or property-based Creator)
at [Source: (String)"{
"@UUID" : "46435929-0621-40b9-b623-871dda721fdf",
"breakAnalysisList" : [ {
"@UUID" : "d339332a-babf-49b6-a17e-05584595810b",
"id" : -1,
"key" : {
"@UUID" : "a96c68bb-4f80-49aa-b346-67a34b564123",
"recUnitKey" : "1e364133-a8c1-590f-b13c-41e2f4e661bd",
"componentId" : 67,
"breakAnalysisId" : -1
},
"recGrainId" : 136,
"openDate" : "2022-03-28",
"closeDate" : "2022-04-08",
"amount" : -0.58,
"isChild" : false,
"ttBegin" : "2022-12"[truncated 1484 chars]; line: 4, column: 5] (through reference chain: com.arcesium.recon.workflow.domain.BreakAnalysisRequest["breakAnalysisList"]->java.util.ArrayList[0]). For further assistance, please contact - <mailto:help@arcesium.com|help@arcesium.com> with tracking request id : 3e3453cc-0549-4117-81a7-c34530095500
at com.arcesium.frames.client.RESTfulClient.handleThrowable(RESTfulClient.java:599)
at com.arcesium.frames.client.RESTfulClient.executePost(RESTfulClient.java:479)
at com.arcesium.frames.client.RESTfulClient.executePost(RESTfulClient.java:637)
at com.arcesium.frames.service.util.JavaLightHelper.callRestMethod(JavaLightHelper.java:336)
at com.arcesium.frames.client.api.proxy.ClientProxyUtils.executeApi(ClientProxyUtils.java:298)
at com.arcesium.frames.client.api.proxy.RemoteProxy.invoke(RemoteProxy.java:304)
at com.sun.proxy.$Proxy266.createBreakAnalysis(Unknown Source)
at deshaw.munshi.reconcilers.service.util.BreakSyncUtil.createBreakSync(BreakSyncUtil.kt:181)
at deshaw.munshi.reconcilers.service.util.BreakSyncUtil$$FastClassBySpringCGLIB$$b6334f06.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:793)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:763)
at org.springframework.aop.interceptor.AsyncExecutionInterceptor.lambda$invoke$0(AsyncExecutionInterceptor.java:115)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.rmi.RemoteException: com.fasterxml.jackson.databind.exc.InvalidDefinitionException:Cannot construct instance of `com.arcesium.recon.workflow.domain.BreakAnalysis` (no Creators, like default constructor, exist): cannot deserialize from Object value (no delegate- or property-based Creator)
at [Source: (String)"{
"@UUID" : "46435929-0621-40b9-b623-871dda721fdf",
"breakAnalysisList" : [ {
"@UUID" : "d339332a-babf-49b6-a17e-05584595810b",
"id" : -1,
"key" : {
"@UUID" : "a96c68bb-4f80-49aa-b346-67a34b564123",
"recUnitKey" : "1e364133-a8c1-590f-b13c-41e2f4e661bd",
"componentId" : 67,
"breakAnalysisId" : -1
},
"recGrainId" : 136,
"openDate" : "2022-03-28",
"closeDate" : "2022-04-08",
"amount" : -0.58,
"isChild" : false,
"ttBegin" : "2022-12"[truncated 1484 chars]; line: 4, column: 5] (through reference chain: com.arcesium.recon.workflow.domain.BreakAnalysisRequest["breakAnalysisList"]->java.util.ArrayList[0]).
Adding a default constructor doesn't help , does anyone have any idea how to resolve this ?
This is how my class looks like
data class BreakAnalysis(
var id: Long,
val key: BreakAnalysisKey,
val recGrainId: Int,
val openDate: LocalDate,
val closeDate: LocalDate,
val amount: BigDecimal,
val isChild: Boolean?,
var associatedBreakIds: List<Long>?,
val ttBegin: LocalDateTime,
val ttEnd: LocalDateTime,
val systemInsertionRuleId: Int?,
val groupId: Long,
val partitionDate: LocalDate,
val associatedBreakMetaData: Map<String, Any>?,
val breakMetadata: Map<String, Any>?,
val recTypeFamilyId: Int,
val reasonId: Int,
val ageStartDate: LocalDate,
val cpidDetails: Map<String, Any?>?,
val expressionEvaluationDetails: Map<String, Any?>?,
val grainMap: Map<String, Any?>?,
val clientUserName: String?,
val createdBy: String?,
val updatedBy: String?,
val previousModificationBy: String?,
val isWriteOff: Boolean?,
val comments: String?,
val clientComments: String?,
val wireId: Int?,
val userTranId: String?,
val settlementPrice: BigDecimal?,
val side1Quantity: BigDecimal?,
val side2Quantity: BigDecimal?,
val side1Amount: BigDecimal?,
val side2Amount: BigDecimal?,
val tick: BigDecimal?,
val side1TradePrice: BigDecimal?,
val side2TradePrice: BigDecimal?,
val adminInvestmentCode: String?,
val investmentDescription: String?,
val recStatusId: Int,
val breakAnalysisWorkflow: BreakAnalysisWorkflow?,
val attachments: List<Attachment>,
val workUnitId: Int,
val workUnitTypeId: Int,
val contributedToComponentIds: Set<Int>?,
val reconManifestationId: Long?,
val uiWorkUnitId: Int?
) {
constructor(): this(-1, BreakAnalysisKey(),-1,LocalDate.now(),LocalDate.now(),
BigDecimal.valueOf(0),null,null,LocalDateTime.now(),
LocalDateTime.now(),null,-1,LocalDate.now(),null,
null,1,-1,LocalDate.now(),null,null,
null,null,null,null,null,null,
null,null,null,null,null,null,
null,null,null,null,null,null,
null,null,-1, null, emptyList(),
-1,-1,null,null,null
)
}
Stephan Schröder
12/13/2022, 8:46 AMStephan Schröder
12/13/2022, 8:48 AMStephan Schröder
12/13/2022, 8:52 AMdata class BreakAnalysis(
var id: Long = -1L,
val key: BreakAnalysisKey = BreakAnalysisKey(),
...
}
your solution seems like the more likely solution to apiece jackson expecting every class having an empty constructor though.
So yeah, check out the tutorial or switch to kotlinx.serialization.