Error while working with a bundle which consumes web service
I was following article https://helpx.adobe.com/experience-manager/using/creating-cxf-bundles-consume-web.html and https://helpx.adobe.com/experience-manager/using/creating-cq-bundles-consume-web.html to create a bundle so that I could consume web services.
I followed the steps and was able to have my bundle in "Active" status but while rendering it on page, I am getting below error. I tried installing the package too which is attached to one of the articles mentioned above but no luck. I still see the same error. FYI, I am using AEM 5.6.1.
I have already added this line: sling.bootdelegation.com.sun=com.sun.* in my sling.properties file and restarted CQ instance.
Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.sun.proxy.$Proxy48 at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:526) at java.lang.reflect.Proxy.newInstance(Proxy.java:764) at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:755) at com.sun.xml.internal.ws.client.WSServiceDelegate$4.run(WSServiceDelegate.java:612) at java.security.AccessController.doPrivileged(Native Method) at com.sun.xml.internal.ws.client.WSServiceDelegate.createProxy(WSServiceDelegate.java:608) at com.sun.xml.internal.ws.client.WSServiceDelegate.createEndpointIFBaseProxy(WSServiceDelegate.java:593) at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:331) at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:313) at com.sun.xml.internal.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:295) at javax.xml.ws.Service.getPort(Service.java:119) at com.aem.weatherservice.Weather.getWeatherSoap(Weather.java:144) at org.apache.jsp.apps.zebra_002dwww_002dresponsive.components.content.text.text_jsp._jspService(text_jsp.java:248) at org.apache.sling.scripting.jsp.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:502) ... 96 more