I am trying to add 2d points (x and y axis) and 3d points (x,y,z axis) as a property to a node and want to add it as a parameter to the cypher statement.
I had create 2 class
class Point2D implements Point{}
class Point3D implements Point{}
where Point is an interface from neo4j.driver.types.
When I tried to run the cypher statement for the same I got this error
Caused by: java.io.IOException: Unknown type: type: class org.testing.controller.Point2D, value: point({x:1.0, y:2.0})
at org.neo4j.driver.internal.messaging.common.CommonValuePacker.packPoint(CommonValuePacker.java:269)
at org.neo4j.driver.internal.messaging.common.CommonValuePacker.packInternalValue(CommonValuePacker.java:142)
at org.neo4j.driver.internal.messaging.common.CommonValuePacker.pack(CommonValuePacker.java:95)
at org.neo4j.driver.internal.messaging.common.CommonValuePacker.pack(CommonValuePacker.java:115)
at org.neo4j.driver.internal.messaging.encode.RunWithMetadataMessageEncoder.encode(RunWithMetadataMessageEncoder.java:39)
at org.neo4j.driver.internal.messaging.AbstractMessageWriter.write(AbstractMessageWriter.java:46)
at org.neo4j.driver.internal.async.outbound.OutboundMessageHandler.encode(OutboundMessageHandler.java:74)
at org.neo4j.driver.internal.async.outbound.OutboundMessageHandler.encode(OutboundMessageHandler.java:37)
at org.neo4j.driver.internal.shaded.io.netty.handler.codec.MessageToMessageEncoder.write(MessageToMessageEncoder.java:89)
at org.neo4j.driver.internal.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717)
at org.neo4j.driver.internal.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:709)
at org.neo4j.driver.internal.shaded.io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:792)
at org.neo4j.driver.internal.shaded.io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:702)
at org.neo4j.driver.internal.shaded.io.netty.channel.DefaultChannelPipeline.write(DefaultChannelPipeline.java:1015)
at org.neo4j.driver.internal.shaded.io.netty.channel.AbstractChannel.write(AbstractChannel.java:301)
at org.neo4j.driver.internal.async.NetworkConnection.lambda$writeMessageInEventLoop$1(NetworkConnection.java:242)
at org.neo4j.driver.internal.shaded.io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164)
at org.neo4j.driver.internal.shaded.io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472)
at org.neo4j.driver.internal.shaded.io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500)
at org.neo4j.driver.internal.shaded.io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
at org.neo4j.driver.internal.shaded.io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at org.neo4j.driver.internal.shaded.io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:834)
Please help me with correct implementation for this.