NoClassDefFoundError when working with CQ webservice using CXF | Community
Skip to main content
October 16, 2015
Solved

NoClassDefFoundError when working with CQ webservice using CXF

  • October 16, 2015
  • 11 replies
  • 3347 views

I am working on a below community article of creating OSGi bundle which consumes third party webservice. I followed all the steps given in the article but I am seeing no class found error . I am using AEM 5.6 and modified the sling.properties file located in the crx-quickstart\conf folder. by adding below line

sling.bootdelegation.com.sun=com.sun.*

 

Article link:

https://helpx.adobe.com/experience-manager/using/creating-cxf-bundles-consume-web.html

below is the stack trace of the error

 

Caused by: org.apache.sling.api.SlingException: An exception occurred processing JSP page /apps/weatherapp/components/page/weathertemplate/weathertemplate.jsp at line 7 at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.handleJspExceptionInternal(JspServletWrapper.java:683) at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:608) at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:525) at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:449) at org.apache.sling.scripting.jsp.JspScriptEngineFactory.callJsp(JspScriptEngineFactory.java:265) at org.apache.sling.scripting.jsp.JspScriptEngineFactory.access$100(JspScriptEngineFactory.java:87) at org.apache.sling.scripting.jsp.JspScriptEngineFactory$JspScriptEngine.eval(JspScriptEngineFactory.java:465) at org.apache.sling.scripting.core.impl.DefaultSlingScript.call(DefaultSlingScript.java:361) ... 114 more Caused by: java.lang.NoClassDefFoundError: com/aem/ws/GlobalWeather at org.apache.jsp.apps.weatherapp.components.page.weathertemplate.weathertemplate_jsp._jspService(weathertemplate_jsp.java:153) 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) ... 119 more
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by smacdonald2008

You are using 5.6. Upgrade to Java 1.7 to make sure that is not the cause of this issue. 

The 5.6 install docs state:

Prerequisites

To install AEM you need:

The Java Runtime Environment (JRE). Version 1.7 is preferred. See Java Virtual Machines for details.

https://docs.adobe.com/docs/en/cq/5-6-1/deploying/technical_requirements.html

11 replies

smacdonald2008
Level 10
October 16, 2015

I just ran on 5.6 - this is the result you will get:

[img]WSOttawa.png[/img]