Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
I am getting an error while running CalciteRemoteDriverTest.testRemotePrepareExecute because Avatica is trying to serialize the field CalcitePrepare.CalciteSignature.rowType to JSON. The field has the annotation @JsonIgnore but I surmise that that annotation is being ignored because Jackson is being shaded inside Avatica.
Here is the error stack:
java.lang.AssertionError at org.apache.calcite.rel.type.RelDataTypeImpl.getFieldList(RelDataTypeImpl.java:146) 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.apache.calcite.avatica.com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:654) at org.apache.calcite.avatica.com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:675) at org.apache.calcite.avatica.com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:157) at org.apache.calcite.avatica.com.fasterxml.jackson.databind.ser.impl.MapEntrySerializer.serializeDynamic(MapEntrySerializer.java:252) at org.apache.calcite.avatica.com.fasterxml.jackson.databind.ser.impl.MapEntrySerializer.serialize(MapEntrySerializer.java:197) at org.apache.calcite.avatica.com.fasterxml.jackson.databind.ser.impl.MapEntrySerializer.serialize(MapEntrySerializer.java:19) at org.apache.calcite.avatica.com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serializeContents(IndexedListSerializer.java:119) at org.apache.calcite.avatica.com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serialize(IndexedListSerializer.java:79) at org.apache.calcite.avatica.com.fasterxml.jackson.databind.ser.impl.IndexedListSerializer.serialize(IndexedListSerializer.java:18) at org.apache.calcite.avatica.com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:693) at org.apache.calcite.avatica.com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:675) at org.apache.calcite.avatica.com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:157) at org.apache.calcite.avatica.com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:693) at org.apache.calcite.avatica.com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:675) at org.apache.calcite.avatica.com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:157) at org.apache.calcite.avatica.com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:693) at org.apache.calcite.avatica.com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:675) at org.apache.calcite.avatica.com.fasterxml.jackson.databind.ser.BeanSerializer.serialize(BeanSerializer.java:157) at org.apache.calcite.avatica.com.fasterxml.jackson.databind.ser.BeanPropertyWriter.serializeAsField(BeanPropertyWriter.java:693) at org.apache.calcite.avatica.com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:675) at org.apache.calcite.avatica.com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeWithType(BeanSerializerBase.java:566) at org.apache.calcite.avatica.com.fasterxml.jackson.databind.ser.impl.TypeWrappedSerializer.serialize(TypeWrappedSerializer.java:32) at org.apache.calcite.avatica.com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.serializeValue(DefaultSerializerProvider.java:130) at org.apache.calcite.avatica.com.fasterxml.jackson.databind.ObjectMapper._configAndWriteValue(ObjectMapper.java:3559) at org.apache.calcite.avatica.com.fasterxml.jackson.databind.ObjectMapper.writeValue(ObjectMapper.java:2909) at org.apache.calcite.avatica.remote.JsonHandler.encode(JsonHandler.java:70) at org.apache.calcite.avatica.remote.JsonHandler.encode(JsonHandler.java:37) at org.apache.calcite.avatica.remote.AbstractHandler.apply(AbstractHandler.java:96) at org.apache.calcite.avatica.remote.JsonHandler.apply(JsonHandler.java:52) at org.apache.calcite.avatica.server.AvaticaJsonHandler.handle(AvaticaJsonHandler.java:129) at org.eclipse.jetty.server.handler.HandlerList.handle(HandlerList.java:52) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97) at org.eclipse.jetty.server.Server.handle(Server.java:499) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257) at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635) at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555) at java.lang.Thread.run(Thread.java:745) java.sql.SQLException: while preparing SQL: select * from "hr"."emps" at org.apache.calcite.avatica.Helper.createException(Helper.java:56) at org.apache.calcite.avatica.Helper.createException(Helper.java:41) at org.apache.calcite.avatica.AvaticaConnection.prepareStatement(AvaticaConnection.java:329) at org.apache.calcite.avatica.AvaticaConnection.prepareStatement(AvaticaConnection.java:165) at org.apache.calcite.jdbc.CalciteRemoteDriverTest.testRemotePrepareExecute(CalciteRemoteDriverTest.java:499) 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.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.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) 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:117) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:42) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:262) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:84) 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 com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) Caused by: java.lang.RuntimeException: org.apache.calcite.avatica.com.fasterxml.jackson.core.JsonParseException: Unexpected character ('<' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null') at [Source: <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/> <title>Error 500 </title> </head> <body> <h2>HTTP ERROR: 500</h2> <p>Problem accessing /. Reason: <pre> java.lang.AssertionError</pre></p> <hr /><i><small>Powered by Jetty://</small></i> </body> </html> ; line: 1, column: 2] at org.apache.calcite.avatica.remote.JsonService.handle(JsonService.java:71) at org.apache.calcite.avatica.remote.JsonService.apply(JsonService.java:126) at org.apache.calcite.avatica.remote.RemoteMeta$12.call(RemoteMeta.java:240) at org.apache.calcite.avatica.remote.RemoteMeta$12.call(RemoteMeta.java:236) at org.apache.calcite.avatica.AvaticaConnection.invokeWithRetries(AvaticaConnection.java:733) at org.apache.calcite.avatica.remote.RemoteMeta.prepare(RemoteMeta.java:235) at org.apache.calcite.avatica.AvaticaConnection.prepareStatement(AvaticaConnection.java:325) ... 31 more Caused by: org.apache.calcite.avatica.com.fasterxml.jackson.core.JsonParseException: Unexpected character ('<' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null') at [Source: <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"/> <title>Error 500 </title> </head> <body> <h2>HTTP ERROR: 500</h2> <p>Problem accessing /. Reason: <pre> java.lang.AssertionError</pre></p> <hr /><i><small>Powered by Jetty://</small></i> </body> </html> ; line: 1, column: 2] at org.apache.calcite.avatica.com.fasterxml.jackson.core.JsonParser._constructError(JsonParser.java:1581) at org.apache.calcite.avatica.com.fasterxml.jackson.core.base.ParserMinimalBase._reportError(ParserMinimalBase.java:533) at org.apache.calcite.avatica.com.fasterxml.jackson.core.base.ParserMinimalBase._reportUnexpectedChar(ParserMinimalBase.java:462) at org.apache.calcite.avatica.com.fasterxml.jackson.core.json.ReaderBasedJsonParser._handleOddValue(ReaderBasedJsonParser.java:1624) at org.apache.calcite.avatica.com.fasterxml.jackson.core.json.ReaderBasedJsonParser.nextToken(ReaderBasedJsonParser.java:689) at org.apache.calcite.avatica.com.fasterxml.jackson.databind.ObjectMapper._initForReading(ObjectMapper.java:3776) at org.apache.calcite.avatica.com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3721) at org.apache.calcite.avatica.com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2726) at org.apache.calcite.avatica.remote.JsonService.decode(JsonService.java:53) at org.apache.calcite.avatica.remote.JsonService.apply(JsonService.java:124) ... 36 more
Attachments
Attachments
Issue Links
- duplicates
-
CALCITE-1270 Upgrade Calcite to avatica-1.9
- Closed