Hazelcast Management Center 4.2 - SQL Browser - hazelcast-sql module

467 views
Skip to first unread message

René Avontuur

unread,
Jun 14, 2021, 10:06:44 AM6/14/21
to Hazelcast

After pressing the button 'Execute Query'  in the SQL Browser of the Hazelcast Management Center 4.2, I get the following error:
'Cannot execute SQL query because "hazelcast-sql" module is not in the classpath.'

My first guess: Downloading the hazelcast-sql-4.2 jar from https://mvnrepository.com/artifact/com.hazelcast/hazelcast-sql/4.2
and adding this to the classpath does not resolve this issue.

I am running the following command:
/usr/lib/jvm/java-8-openjdk-amd64/bin/java -Dhazelcast.mc.http.port=8083 -cp "hazelcast-management-center-4.2021.04.jar:lib/*" com.hazelcast.webmonitor.Launcher

How to get this work?
It seems to me a very useful feature.

Bence Eros

unread,
Jun 14, 2021, 10:26:12 AM6/14/21
to haze...@googlegroups.com
Hello René,

you have to add the hazelcast-sql module to the member classpath, not MC classpath.

Kind regards,

--
You received this message because you are subscribed to the Google Groups "Hazelcast" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hazelcast+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hazelcast/2157c855-bb12-4a00-abe0-57bc798cfcd0n%40googlegroups.com.

This message contains confidential information and is intended only for the individuals named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmission cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required, please request a hard-copy version. -Hazelcast

René Avontuur

unread,
Jun 14, 2021, 11:43:41 AM6/14/21
to Hazelcast
Hi Bence,

Thanks a lot, your answer helped me further.

This works now fine:

SELECT id, publicationDate FROM "article"

But if I add a field which is a enum, for example:

SELECT id, state FROM "article"

then I get an error:
Failed to deserialize query result value: java.lang.ClassNotFoundException: x.x.article.State

Is the Management Center client doing the 'deserialization'?


René

Op maandag 14 juni 2021 om 16:26:12 UTC+2 schreef bence...@hazelcast.com:

René Avontuur

unread,
Jun 15, 2021, 4:38:58 AM6/15/21
to Hazelcast
Above problem with enum-classes is solved by adding the jars with the domain classes to the lib-folder, and starting the man-center with the command:

/usr/lib/jvm/java-8-openjdk-amd64/bin/java -Dhazelcast.mc.http.port=8083 -cp "hazelcast-management-center-4.2021.04.jar:lib/*" com.hazelcast.webmonitor.Launcher

But:
SELECT id, publicationDate, authors FROM "article"

This fails with:
Failed to deserialize query result value: There is no suitable de-serializer for type 3004. This exception is likely caused by differences in the serialization configuration between members or between clients and members.

How do I configure the custom Smile-serializers in man-center?

Op maandag 14 juni 2021 om 17:43:41 UTC+2 schreef René Avontuur:

Bence Eros

unread,
Jun 15, 2021, 5:24:01 AM6/15/21
to haze...@googlegroups.com
Hello René, 

When you set up your cluster connection in MC, you can click the "Upload Config File" button, where you can set up the connection by uploading a client configuration file. In the client config, you can specify your custom serializer configuration (which should be the same as on the members).

Kind regards,

Naveen Baghel

unread,
Oct 13, 2022, 10:12:38 AM10/13/22
to Hazelcast
Hi Guys,

Can you tell me how to set hazelcast-sql module to member classpath ? I am kinda stuck here.

Regards
Naveen Baghel

Reply all
Reply to author
Forward
0 new messages