Any ideas if this Java driver 1.x can work with a 5.x server ?
I haven’t tried it, and I haven’t been around long enough to know how the Java client has changed from 1.x to 2.x, but I’m not surprised you’re running into issues; the 1.x client reached EOL back in April of 2016.
Depending on how urgently you need to upgrade, you might consider waiting before starting that heavy lift. If you can hold out a little longer, you might be able to skip Java client 2.x and go directly to 3.x; it’s available now in alpha (apis not solidified yet), with a GA release coming around the start of next year.
We’ve not touched this in some time, but I would expect the 1.x client to work generally.
The symptom doesn’t quite match this, but if you’re using a brand new 5.x cluster, you need to setup the users in a very specific way to be compatible with clients that are not RBAC ready.
Starting in 5.0, you need to create a user with the same name as the bucket for compatibility and give that user permissions to access the bucket. You can no longer create passwords directly on buckets in 5.0. Using a password is required.