How to fix bug? I get ClassNotFound
in atlassian-confluence.log
file:
import com.atlassian.httpclient.api.HttpClient;
import com.atlassian.httpclient.api.Request;
import com.atlassian.util.concurrent.Promise;
import com.atlassian.httpclient.api.Response;
import com.atlassian.httpclient.api.ResponsePromise;
private Promise<Response> sendPusherEvent(String channel, String event, String message) {
long timestamp = System.currentTimeMillis() / 1000;
String body = "{\"name\":\"" + event + "\", \"channel\":\"" + channel + "\", \"data\":\"" + message + "\"}";
String signature = generateSignature(body, timestamp);
String url = "https://" + cluster + ".pusher/apps/" + appId + "/events"
+ "?auth_key=" + key + "&auth_timestamp=" + timestamp + "&auth_version=1.0&auth_signature=" + signature;
// Create and execute request correctly
ResponsePromise requestBuilder = httpClient.newRequest(url, "application/json", body).post();
// FIX: Convert ResponsePromise to Promise<Response>
return requestBuilder;
}
I just want to use Pusher but I can't use it's official Java API in Confluence 9, because Atlassian is made 3rd APIs to not work.