[infinispan-issues] [JBoss JIRA] (IPROTO-52) ProtoSchemaBuilder fails with Date and Instant fields that have a default value defined

Adrian Nistor (JIRA) issues at jboss.org
Mon Apr 23 12:00:00 EDT 2018


     [ https://issues.jboss.org/browse/IPROTO-52?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Adrian Nistor updated IPROTO-52:
--------------------------------
    Fix Version/s: 4.2.1.Final
                   4.1.5.Final


> ProtoSchemaBuilder fails with Date and Instant fields that have a default value defined
> ---------------------------------------------------------------------------------------
>
>                 Key: IPROTO-52
>                 URL: https://issues.jboss.org/browse/IPROTO-52
>             Project: Infinispan ProtoStream
>          Issue Type: Bug
>    Affects Versions: 4.0.0.Final
>            Reporter: Adrian Nistor
>            Assignee: Adrian Nistor
>             Fix For: 4.3.0.Alpha1, 4.3.0.Final, 4.2.1.Final, 4.1.5.Final
>
>
> {code}
> org.infinispan.protostream.annotations.ProtoSchemaBuilderException: Failed to generate marshaller implementation class
> 	at org.infinispan.protostream.annotations.impl.ProtoSchemaGenerator.generateAndRegister(ProtoSchemaGenerator.java:127)
> 	at org.infinispan.protostream.annotations.ProtoSchemaBuilder.build(ProtoSchemaBuilder.java:202)
> 	at org.infinispan.protostream.annotations.impl.ProtoSchemaBuilderTest.testAllFieldTypes(ProtoSchemaBuilderTest.java:781)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:498)
> 	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
> 	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> 	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
> 	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
> 	at org.junit.rules.ExpectedException$ExpectedExceptionStatement.evaluate(ExpectedException.java:239)
> 	at org.junit.rules.RunRules.evaluate(RunRules.java:20)
> 	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
> 	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
> 	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
> 	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
> 	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
> 	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
> 	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
> 	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
> 	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
> 	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
> 	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
> 	at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
> 	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
> 	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
> Caused by: javassist.CannotCompileException: [source error] cannot find constructor java.util.Date(java.util.Date)
> 	at javassist.CtBehavior.setBody(CtBehavior.java:446)
> 	at javassist.CtBehavior.setBody(CtBehavior.java:412)
> 	at org.infinispan.protostream.annotations.impl.MarshallerCodeGenerator.generateMessageMarshaller(MarshallerCodeGenerator.java:210)
> 	at org.infinispan.protostream.annotations.impl.ProtoSchemaGenerator.generateMarshallers(ProtoSchemaGenerator.java:154)
> 	at org.infinispan.protostream.annotations.impl.ProtoSchemaGenerator.generateAndRegister(ProtoSchemaGenerator.java:125)
> 	... 26 more
> Caused by: compile error: cannot find constructor java.util.Date(java.util.Date)
> 	at javassist.compiler.TypeChecker.atMethodCallCore(TypeChecker.java:749)
> 	at javassist.compiler.TypeChecker.atNewExpr(TypeChecker.java:149)
> 	at javassist.compiler.ast.NewExpr.accept(NewExpr.java:73)
> 	at javassist.compiler.TypeChecker.atFieldAssign(TypeChecker.java:276)
> 	at javassist.compiler.JvstTypeChecker.atFieldAssign(JvstTypeChecker.java:84)
> 	at javassist.compiler.TypeChecker.atAssignExpr(TypeChecker.java:230)
> 	at javassist.compiler.ast.AssignExpr.accept(AssignExpr.java:39)
> 	at javassist.compiler.CodeGen.doTypeCheck(CodeGen.java:242)
> 	at javassist.compiler.CodeGen.atStmnt(CodeGen.java:330)
> 	at javassist.compiler.ast.Stmnt.accept(Stmnt.java:50)
> 	at javassist.compiler.CodeGen.atStmnt(CodeGen.java:351)
> 	at javassist.compiler.ast.Stmnt.accept(Stmnt.java:50)
> 	at javassist.compiler.CodeGen.atIfStmnt(CodeGen.java:398)
> 	at javassist.compiler.CodeGen.atStmnt(CodeGen.java:355)
> 	at javassist.compiler.ast.Stmnt.accept(Stmnt.java:50)
> 	at javassist.compiler.CodeGen.atStmnt(CodeGen.java:351)
> 	at javassist.compiler.ast.Stmnt.accept(Stmnt.java:50)
> 	at javassist.compiler.CodeGen.atMethodBody(CodeGen.java:292)
> 	at javassist.compiler.Javac.compileBody(Javac.java:223)
> 	at javassist.CtBehavior.setBody(CtBehavior.java:438)
> 	... 30 more
> {code}



--
This message was sent by Atlassian JIRA
(v7.5.0#75005)


More information about the infinispan-issues mailing list