grails - ERROR errors.GrailsExceptionResolver - when sending notification to Firebase -
i getting error when sending notification request fcm using httpclient request.
getting following error:
error | 2017-09-11 11:37:21,399 [http-bio-8080-exec-9] error errors.grailsexceptionresolver - nosuchalgorithmexception occurred when processing request: [get] class configured trustmanagerfactory (provider: trustingprovider) not public.. stacktrace follows: message: class configured trustmanagerfactory (provider: trustingprovider) not public. line | method ->> 1284 | getimplclass in java.security.provider$service - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | 1237 | newinstance in '' | 138 | getinstance . . . . . . . . . in javax.net.ssl.trustmanagerfactory | 188 | createsslcontext in org.apache.http.conn.ssl.sslsocketfactory | 209 | createdefaultsslcontext . . . in '' | 333 | <init> in '' | 165 | getsocketfactory . . . . . . in '' | 45 | createdefault in org.apache.http.impl.conn.schemeregistryfactory | 294 | createclientconnectionmanager in org.apache.http.impl.client.abstracthttpclient | 445 | getconnectionmanager in '' | 274 | createhttpcontext . . . . . . in '' | 797 | execute in '' | 754 | execute . . . . . . . . . . . in '' | 732 | execute in '' | 41 | pushfcm . . . . . . . . . . . in api.fcm.pushservice | 178 | updateremark in att.remarkcontroller | 195 | dofilter . . . . . . . . . . in grails.plugin.cache.web.filter.pagefragmentcachingfilter | 63 | dofilter in grails.plugin.cache.web.filter.abstractfilter | 1145 | runworker . . . . . . . . . . in java.util.concurrent.threadpoolexecutor | 615 | run in java.util.concurrent.threadpoolexecutor$worker ^ 745 | run . . . . . . . . . . . . . in java.lang.thread httpclient request code
httpclient client = new defaulthttpclient(); httppost post = new httppost('https://fcm.googleapis.com/fcm/send'); post.setheader('content-type', 'application/json'); post.setheader('authorization', 'key=ai....'); jsonobject message = new jsonobject(); message.put('to', firebaseid); message.put('priority', 'high'); jsonobject notification = new jsonobject(); notification.put('title', title); notification.put('body', notificationmsg); message.put('notification', notification); post.setentity(new stringentity(message.tostring(), 'utf-8')); httpresponse response = client.execute(post); please me out. in advance help.
Comments
Post a Comment