Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

validate group and password in Hibernate integration module #7978

gAmUssA opened this issue Apr 19, 2016 · 2 comments


None yet
4 participants
Copy link

commented Apr 19, 2016

Hazelcast Hibernate module
User didn't specify

<property name="hibernate.cache.hazelcast.native_client_group">dev</property>
<property name="hibernate.cache.hazelcast.native_client_password">dev-pass</property>

NPE thrown during establisging a connection to the cluster

[4/18/16 15:29:46:289 EDT] 0000008d ClusterListen 3 
com.hazelcast.client.spi.impl.ClusterListenerSupport Trying to connect to 
[4/18/16 15:29:46:297 EDT] 0000008d ClientConnect W 
com.hazelcast.client.connection.nio.ClientConnection Connection 
[/] lost. Reason: java.lang.NullPointerException[null] 
[4/18/16 15:29:46:297 EDT] 0000008d ClusterListen 3 
com.hazelcast.client.spi.impl.ClusterListenerSupport Exception during 
initial connection to / 

This comment has been minimized.

Copy link

commented Apr 19, 2016

@gAmUssA An extra validation is not required in this case. Because if group name and password is not provided in hibernate config, default values in client config are used which are dev and dev-pass. See the code :

Also client config does not allow null values and does its validation correctly. I checked out user's configuration even though they do not provide
<property name="hibernate.cache.hazelcast.native_client_group">dev</property>
<property name="hibernate.cache.hazelcast.native_client_password">dev-pass</property>
in their hibernate config xml, they provide
<property name="cache.hazelcast.configuration_file_path"> /hazelcast-client.xml</property>
property which loads client config from an external xml file and if you check that you can see the group name and password are set in there.

I do not know the reason of NPE right now (maybe client/member version mismatch) , I can say group name and password are not required fields in hibernate config if not provided default values are used. So we do not need extra validation.

@emre-aydin emre-aydin self-assigned this Dec 15, 2016

@emre-aydin emre-aydin added this to the 3.8 milestone Dec 15, 2016


This comment has been minimized.

Copy link

commented Dec 15, 2016

Closing this as the reported problem does not occur.

@emre-aydin emre-aydin closed this Dec 15, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.