You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
An exception is thrown if an SQL query is run against a map containing custom classes.
Tested using 5.2.0-SNAPSHOT
Encountered an unexpected exception while executing the query:
Failed to deserialize query result value: java.lang.ClassNotFoundException: hazelcast.platform.demos.banking.trademonitor.NasdaqFinancialStatus
com.hazelcast.nio.serialization.HazelcastSerializationException: Failed to deserialize query result value: java.lang.ClassNotFoundException: hazelcast.platform.demos.banking.trademonitor.NasdaqFinancialStatus
at com.hazelcast.sql.impl.SqlRowImpl.getObject0(SqlRowImpl.java:76)
at com.hazelcast.sql.impl.SqlRowImpl.getObject(SqlRowImpl.java:50)
at com.hazelcast.client.console.SqlConsole.printRow(SqlConsole.java:429)
at com.hazelcast.client.console.SqlConsole.executeSqlCmd(SqlConsole.java:205)
at com.hazelcast.client.console.SqlConsole.run(SqlConsole.java:168)
at com.hazelcast.function.ConsumerEx.accept(ConsumerEx.java:47)
at com.hazelcast.client.console.HazelcastCommandLine.runWithHazelcast(HazelcastCommandLine.java:449)
at com.hazelcast.client.console.HazelcastCommandLine.sql(HazelcastCommandLine.java:149)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:577)
at picocli.CommandLine.executeUserObject(CommandLine.java:1972)
at picocli.CommandLine.access$1300(CommandLine.java:145)
at picocli.CommandLine$RunAll.recursivelyExecuteUserObject(CommandLine.java:2431)
at picocli.CommandLine$RunAll.recursivelyExecuteUserObject(CommandLine.java:2433)
at picocli.CommandLine$RunAll.handle(CommandLine.java:2428)
at picocli.CommandLine$RunAll.handle(CommandLine.java:2389)
at picocli.CommandLine$AbstractParseResultHandler.handleParseResult(CommandLine.java:2172)
at picocli.CommandLine.parseWithHandlers(CommandLine.java:2559)
at com.hazelcast.client.console.HazelcastCommandLine.runCommandLine(HazelcastCommandLine.java:553)
at com.hazelcast.client.console.HazelcastCommandLine.main(HazelcastCommandLine.java:133)
Additional context
Superficially this is user-error. The classes aren't on the classpath of hz-cli.
However, since the SQL runs serverside and returns standard columns - text and numerics - deserialization should run serverside (which has the classes).
The text was updated successfully, but these errors were encountered:
Describe the bug
An exception is thrown if an SQL query is run against a map containing custom classes.
Tested using 5.2.0-SNAPSHOT
Expected behavior
No exception to be thrown
To Reproduce
Create a custom class - eg. https://github.com/hazelcast/hazelcast-platform-demos/blob/master/banking/trade-monitor/custom-classes/src/main/java/hazelcast/platform/demos/banking/trademonitor/SymbolInfo.java
Insert it into a map
Run
SELECT * FROM map
from hz-cliAdditional context
Superficially this is user-error. The classes aren't on the classpath of hz-cli.
However, since the SQL runs serverside and returns standard columns - text and numerics - deserialization should run serverside (which has the classes).
The text was updated successfully, but these errors were encountered: