You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by cz...@apache.org on 2018/11/08 08:41:14 UTC
[sling-org-apache-sling-servlets-get] branch master updated:
SLING-8081 : NoClassDefFoundError: javax/jcr/RepositoryException when using
without JCR
This is an automated email from the ASF dual-hosted git repository.
cziegeler pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-servlets-get.git
The following commit(s) were added to refs/heads/master by this push:
new 31bd3c6 SLING-8081 : NoClassDefFoundError: javax/jcr/RepositoryException when using without JCR
31bd3c6 is described below
commit 31bd3c6225be11e665d5721792e0e00ac84ddb28
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Thu Nov 8 09:41:04 2018 +0100
SLING-8081 : NoClassDefFoundError: javax/jcr/RepositoryException when using without JCR
---
.../org/apache/sling/servlets/get/impl/helpers/XMLRenderer.java | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/main/java/org/apache/sling/servlets/get/impl/helpers/XMLRenderer.java b/src/main/java/org/apache/sling/servlets/get/impl/helpers/XMLRenderer.java
index 4c94161..f22f330 100644
--- a/src/main/java/org/apache/sling/servlets/get/impl/helpers/XMLRenderer.java
+++ b/src/main/java/org/apache/sling/servlets/get/impl/helpers/XMLRenderer.java
@@ -19,7 +19,6 @@ package org.apache.sling.servlets.get.impl.helpers;
import java.io.IOException;
import javax.jcr.Node;
-import javax.jcr.RepositoryException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletResponse;
@@ -30,7 +29,6 @@ import org.apache.sling.api.resource.Resource;
import org.apache.sling.api.resource.ResourceNotFoundException;
import org.apache.sling.api.resource.ResourceUtil;
import org.xml.sax.ContentHandler;
-import org.xml.sax.SAXException;
/**
* The <code>XMLRendererServlet</code> renders the current resource in XML
@@ -43,7 +41,8 @@ public class XMLRenderer implements Renderer {
private static final String SYSVIEW = "sysview";
private static final String DOCVIEW = "docview";
-
+
+ @Override
public void render(SlingHttpServletRequest req,
SlingHttpServletResponse resp)
throws IOException {
@@ -83,7 +82,7 @@ public class XMLRenderer implements Renderer {
} else {
resp.sendError(HttpServletResponse.SC_NO_CONTENT); // NO Content
}
- } catch (RepositoryException|SAXException e) {
+ } catch (Exception e) {
throw new ServletException("Unable to export resource as xml: " + r, e);
}
} else {