Ah, I forgot you are using the latest and greatest and not Hessian. Looks like I will have to figure this one out on my own for now, or else do a build off of master and implement something similar to what you have below.
I haven't had time to make a project just to show the issue... swamped with trying to make this application demoable by Tuesday ;) -Adam ________________________________________ From: Aristedes Maniatis <a...@maniatis.org> Sent: Sunday, April 10, 2016 12:24 AM To: user@cayenne.apache.org Subject: Re: NPE on ROP connect after upgrading from 4.0.M2 to 4.0.M3 On 10/04/2016 2:39am, Adam Boyle wrote: > What does your client connection code look like in your ROP setup? Are you > using BASIC auth on your server end point? There's a bit of custom code in the below to show UI dialogs, but you should get the general idea... String value = "Basic " + B64Code.encode(user + ":" + token + ':' + pass, StandardCharsets.ISO_8859_1); httpClient.start(); Request request = httpClient.newRequest(currentServer + ServletPath.SECURE.path()) .header(REQUEST_HEADER_LOGIN, Boolean.TRUE.toString()) .header("Authorization", value); if (kickOutConcurrents) { request.param(REQUEST_HEADER_KICK_OUT, Boolean.TRUE.toString()); } ContentResponse response = request.send(); switch (response.getStatus()) { case SC_OK: break; case SC_CONFLICT: logger.warn("Concurrent session detected for user:" + user); if (showGui) { showKickOutDialog(user, pass, token, host, port, isSsl, clientVersionString); } return; case SC_TOO_MANY_USERS: logger.warn("Login attempt for user:" + user + " failed, too many concurrent users"); resetAndShake("Too many concurrent users", null, showGui, false); return; default: logger.warn("Login attempt for user:" + user + " failed, response code from server:" + response.getStatus()); resetAndShake("Authentication failed.", null, showGui, false); return; } sessionId = httpClient.getCookieStore().getCookies().stream().filter(c -> "JSESSIONID".equals(c.getName())).findFirst().get().getValue(); We also subclass org.apache.cayenne.CayenneContext in order to override commitChanges(), performQuery(Query query) and other things and catch some of the exceptions we get back in order to show more helpful UI to the users. Ari -- --------------------------> Aristedes Maniatis GPG fingerprint CBFB 84B4 738D 4E87 5E5C 5EFA EF6A 7D2E 3E49 102A