Reg : org.apache.sling.api.scripting.ScriptEvaluationException
I am trying to create CQ OSGi bundle that consumes a third-party web service. I'm getting the below exception while accessing the pages.
org.apache.sling.api.scripting.ScriptEvaluationException: org.apache.sling.scripting.jsp.jasper.JasperException: Unable to compile class
An error occurred at line: 5 in the jsp file: /apps/stoxx/components/content/weather/weather.jsp
com.cdyne.ws.weatherws.Weather cannot be resolved to a type
2: <h1><%= properties.get("title", currentPage.getTitle()) %></h1>
3: <%
4:
5: com.cdyne.ws.weatherws.Weather ww = new com.cdyne.ws.weatherws.Weather();
6:
7: com.cdyne.ws.weatherws.WeatherSoap ws = ww.getWeatherSoap();
8:
An error occurred at line: 5 in the jsp file: /apps/stoxx/components/content/weather/weather.jsp
com.cdyne.ws.weatherws.Weather cannot be resolved to a type
2: <h1><%= properties.get("title", currentPage.getTitle()) %></h1>
3: <%
4:
5: com.cdyne.ws.weatherws.Weather ww = new com.cdyne.ws.weatherws.Weather();
6:
7: com.cdyne.ws.weatherws.WeatherSoap ws = ww.getWeatherSoap();
8:
An error occurred at line: 7 in the jsp file: /apps/stoxx/components/content/weather/weather.jsp
com.cdyne.ws.weatherws.WeatherSoap cannot be resolved to a type
4:
5: com.cdyne.ws.weatherws.Weather ww = new com.cdyne.ws.weatherws.Weather();
6:
7: com.cdyne.ws.weatherws.WeatherSoap ws = ww.getWeatherSoap();
8:
9: com.cdyne.ws.weatherws.WeatherReturn wr = ws.getCityWeatherByZIP("95101");
10:
An error occurred at line: 9 in the jsp file: /apps/stoxx/components/content/weather/weather.jsp
com.cdyne.ws.weatherws.WeatherReturn cannot be resolved to a type
6:
7: com.cdyne.ws.weatherws.WeatherSoap ws = ww.getWeatherSoap();
8:
9: com.cdyne.ws.weatherws.WeatherReturn wr = ws.getCityWeatherByZIP("95101");
10:
11: %>
12:
at org.apache.sling.scripting.jsp.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
at org.apache.sling.scripting.jsp.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
at org.apache.sling.scripting.jsp.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:419)
at org.apache.sling.scripting.jsp.jasper.compiler.Compiler.compile(Compiler.java:313)
at org.apache.sling.scripting.jsp.jasper.compiler.Compiler.compile(Compiler.java:291)
at org.apache.sling.scripting.jsp.jasper.compiler.Compiler.compile(Compiler.java:278)
at org.apache.sling.scripting.jsp.jasper.JspCompilationContext.compile(JspCompilationContext.java:599)
at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:355)
at org.apache.sling.scripting.jsp.JspServletWrapperAdapter.service(JspServletWrapperAdapter.java:59)
at org.apache.sling.scripting.jsp.JspScriptEngineFactory.callJsp(JspScriptEngineFactory.java:233)
at org.apache.sling.scripting.jsp.JspScriptEngineFactory.access$100(JspScriptEngineFactory.java:85)
at org.apache.sling.scripting.jsp.JspScriptEngineFactory$JspScriptEngine.eval(JspScriptEngineFactory.java:453)
at org.apache.sling.scripting.core.impl.DefaultSlingScript.call(DefaultSlingScript.java:358)
at org.apache.sling.scripting.core.impl.DefaultSlingScript.eval(DefaultSlingScript.java:170)
at org.apache.sling.scripting.core.impl.DefaultSlingScript.service(DefaultSlingScript.java:456)
at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:500)
at org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilterChain.java:45)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:64)
at com.day.cq.wcm.core.impl.WCMDebugFilter.doFilterWithErrorHandling(WCMDebugFilter.java:183)
at com.day.cq.wcm.core.impl.WCMDebugFilter.doFilter(WCMDebugFilter.java:150)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:60)
at com.day.cq.wcm.core.impl.WCMComponentFilter.doFilter(WCMComponentFilter.java:219)
at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilterChain.java:60) . . . . . . . . . .
I also restarted the “ Apache Sling Scripting JSP support” and “Apache Sling Dynamic Class Loader Support” bundles. No luck J
Could anyone please tell what could be the problem?
Thanks,
Anderson