Re: Problems using java client against karaf/hawtio hosted Jolokia
The problem is, that hawat.io used as karaf feature doesn't do plain Basic Authentication, but has more complex initial handshake.
I opened an issue: https://github.com/rhuss/jolokia/issues/141 The implementation for this is already finished, in the meantime you could create an HttpClient on your own and send an empty POST request to /hawtio/auth/login with the Header 'Authorization' set properly as for BasicAuthentication. Then you receive a session Cookie which needs to be used for the Jolokia Request.
I'll come back as soon as the implementation is finished. This will go into 1.2.2