Highlighted

Getting java.lang.ClassNotFoundException: org.apache.cxf.jaxws.spi.ProviderImpl

Avatar

Avatar

akhilat16351269

Avatar

akhilat16351269

akhilat16351269

03-10-2017

Hi All,

We are using CXF API 3.2.0 for accessing SOAP webservice in AEM. We have referred below URL to implement the same. We have included the necessary dependencies mentioned in this URL.

https://github.com/apache/cxf/tree/master/distribution/src/main/release/samples/ws_security/sign_enc

We are getting below exception while invoking the webservice.

at org.apache.sling.scripting.jsp.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)

at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:502)

... 219 common frames omitted

Caused by: java.lang.ClassNotFoundException: org.apache.cxf.jaxws.spi.ProviderImpl

at org.apache.sling.commons.classloader.impl.ClassLoaderFacade.loadClass(ClassLoaderFacade.java:149)

at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

at javax.xml.ws.spi.FactoryFinder.safeLoadClass(FactoryFinder.java:181)

at javax.xml.ws.spi.FactoryFinder.newInstance(FactoryFinder.java:46)

... 228 common frames omitted

But when we checked the jar file, "cxf-rt-frontend-jaxws" got imported to the bundle. Have anyone faced similar issue?

Could any one help us in fixing this?

Replies

Highlighted

Avatar

Avatar

Ratna_Kumar

MVP

Avatar

Ratna_Kumar

MVP

Ratna_Kumar
MVP

03-10-2017

Hi Akhila,

Please try to implement the steps that is used in this HELPX article: Adobe Experience Manager Help | Creating AEM Services using Apache CXF that consume web services

It will work!!

~Ratna.

Highlighted

Avatar

Avatar

akhilat16351269

Avatar

akhilat16351269

akhilat16351269

03-10-2017

Thanks Ratna. The URL that is shared has an example to call a SOAP webservice. Till that our class also worked. But we have to send a signed request. So we had some additional methods. The URL which I shared has the implementation for that. We are getting exception at that point.

Highlighted

Avatar

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K

Avatar

smacdonald2008

Total Posts

12.7K

Likes

1.4K

Correct Answer

2.3K
smacdonald2008

03-10-2017

that GitHub does not look like Adobe content. I recommend contacting the author of that Git code. We have an article that Ratna points out - but you are doing signed requests.

Highlighted

Avatar

Avatar

akhilat16351269

Avatar

akhilat16351269

akhilat16351269

03-10-2017

Yes. That is not an AEM bundle. We just included the necessary dependencies in a AEM bundle and implemented it. The bundle is in active state too.

Highlighted

Avatar

Avatar

Ronny_Fallas

Avatar

Ronny_Fallas

Ronny_Fallas

03-01-2020

How did you solve the issue?

Highlighted

Avatar

Avatar

aem65user

Avatar

aem65user

aem65user

26-04-2020

For AEM 6.5, ideally it should work fine if you install the package from this document - https://helpx.adobe.com/uk/experience-manager/kb/jaxws-webservice-calls-not-working-aem-65.html if there is no class path issues due to embedding of jars in your project.

 

Package file