« Return to Thread: Notification fails in secure mode

Notification fails in secure mode

by Satyavrat A. Prabhune :: Rate this Message:

Reply to Author | View in Thread

Hi,

I am using Muse 2.2.0 for generating notifications.

When consumer registers with "http" address for callback notification, notifications go through as expected.  But when consumer registers with "https" address, notification fails on server side with following message in muse.log:

=======
INFO: There was an error while processing a request:

java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty

        org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClient.java:298)
        org.apache.muse.core.AbstractResourceClient.invoke(AbstractResourceClient.java:254)
        org.apache.muse.ws.notification.remote.NotificationConsumerClient.notify(NotificationConsumerClient.java:99)
        org.apache.muse.ws.notification.impl.SimpleSubscriptionManager.publish(SimpleSubscriptionManager.java:267)
        org.apache.muse.ws.notification.impl.SimpleNotificationProducer.publish(SimpleNotificationProducer.java:445)
        org.apache.muse.ws.notification.impl.SimpleNotificationProducer.publish(SimpleNotificationProducer.java:420)
        com.mycompany.api.impl.APINotificationProducer.publish(APINotificationProducer.java:171)
=======

I have registered my socket factory using following code:
        Protocol myHttps = new Protocol("https", MyHttpsSocketFactory.getInstance(), 443);
        Protocol.registerProtocol("https", myHttps);

I tested secure call to tomcat on consumer machine using following code and it works as expected (so there is no issue with certificate and certificate store):
        HttpClient httpclient = new HttpClient();
        GetMethod httpget = new GetMethod("https://tsbu-ctmpc2:8443/");
        try {
            init(); // register socket factory.
            httpclient.executeMethod(httpget);
            System.out.println("responser=" + httpget.getStatusLine());
        } catch(Exception ex) {
            System.out.println(ex);
            ex.printStackTrace();
        } finally {
            httpget.releaseConnection();
        }        

Any pointers on how to resolve this?

Thanks.



     

 « Return to Thread: Notification fails in secure mode