I loaded the Xerces and JDOM bundles from OSGi's repository.

http://www.osgi.org/Repository/HomePage?cmd=inspect&id=org.jdom/1.0.0.v200803070505
http://www.osgi.org/Repository/HomePage?cmd=inspect&id=org.knopflerfish.bundle.xerces/2.9.1

I still get a failure, and my JSP is nothing more than:

<%@ page import="org.jdom.*, java.io.*" %>
<%@ page import="org.jdom.input.*" %>
<%
SAXBuilder builder = (new SAXBuilder());
%>

the error is:

org.apache.sling.scripting.jsp.jasper.JasperException: An exception occurred processing JSP page /apps/cms/admin/videos/josh.jsp at line 3 null Stacktrace: (500)

The requested URL /content/videos.josh.html resulted in an error in / apps/cms/admin/videos/josh.jsp.

Exception:

org.apache.sling.api.SlingServletException: org.apache.sling.scripting.jsp.jasper.JasperException: An exception occurred processing JSP page /apps/cms/admin/videos/josh.jsp at line 3

null

Stacktrace:
at org .apache .sling .scripting .jsp.JspServletWrapperAdapter.service(JspServletWrapperAdapter.java:66) at org .apache .sling .scripting .jsp.JspScriptEngineFactory.callJsp(JspScriptEngineFactory.java:135) at org.apache.sling.scripting.jsp.JspScriptEngineFactory.access $000(JspScriptEngineFactory.java:73)

Even using ESP doesn't work, though it seems like it tries harder, because I get a SAXNotSupportedException

-Josh



On Oct 23, 2008, at 12:20 AM, Felix Meschberger wrote:

Hi Josh,

The best solution would be to create an OSGi bundle out of JDOM and
install it in Sling. This would also allow you easy update etc.

Adding JDOM to the Java extensions folder or to the launcher classpath.
This would require modification to the sling.properties file read on
startup to ensure the jdom library is actually available in your
environment. You would add the following line to sling.properties:

   sling.bootdelegation.class.org.jdom.Document = org.jdom.*


To be clear: I would prefer and explore the first option (JDOM bundle) ;-)

Regards
Felix


Joshua Oransky schrieb:
I'm trying to use JDOM to process some XML in my Sling templates, to no
avail...

I have tried putting the JAR files in the extension folder, using java
-cp on the CRX quickstart load, and putting the classes under
/var/classes... nothing works.. I always get:

An error occurred at line: 7 in the jsp file:
/apps/cms/admin/videos/POST.jsp
SAXBuilder cannot be resolved to a type
null

An error occurred at line: 7 in the jsp file:
/apps/cms/admin/videos/POST.jsp
Document cannot be resolved to a type
null

Stacktrace:
   at
org .apache .sling .scripting .jsp.JspServletWrapperAdapter.service(JspServletWrapperAdapter.java: 66)

   at
org .apache .sling .scripting .jsp.JspScriptEngineFactory.callJsp(JspScriptEngineFactory.java:135)



Any help is appreciated! -Josh


Reply via email to