You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2016/04/04 08:30:52 UTC
[1/6] camel git commit: CAMEL-9549 - Improvement of error messages
when compiling the schema
Repository: camel
Updated Branches:
refs/heads/camel-2.16.x 823930c6a -> ac741fd0d
refs/heads/camel-2.17.x 0570a2aa6 -> 8e7206342
refs/heads/master 3d0d0afc7 -> e9d255146
CAMEL-9549 - Improvement of error messages when compiling the schema
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/75906e3f
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/75906e3f
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/75906e3f
Branch: refs/heads/master
Commit: 75906e3fc30a6748df58ac5712a7a248cd0f2a84
Parents: 3d0d0af
Author: syakimovich <s0...@gmail.com>
Authored: Sun Apr 3 14:25:01 2016 +0300
Committer: Claus Ibsen <da...@apache.org>
Committed: Mon Apr 4 08:26:22 2016 +0200
----------------------------------------------------------------------
.../component/schematron/SchematronEndpoint.java | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/75906e3f/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/SchematronEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/SchematronEndpoint.java b/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/SchematronEndpoint.java
index ccd6bea..0a78f9f 100644
--- a/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/SchematronEndpoint.java
+++ b/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/SchematronEndpoint.java
@@ -17,6 +17,7 @@
package org.apache.camel.component.schematron;
import java.io.File;
+import java.io.FileNotFoundException;
import java.io.InputStream;
import javax.xml.transform.Templates;
import javax.xml.transform.TransformerFactory;
@@ -129,11 +130,16 @@ public class SchematronEndpoint extends DefaultEndpoint {
LOG.debug("Reading schematron rules from class path {}", path);
InputStream schRules = ResourceHelper.resolveMandatoryResourceAsInputStream(getCamelContext(), path);
rules = TemplatesFactory.newInstance().getTemplates(schRules, transformerFactory);
- } catch (Exception e) {
+ } catch (Exception classPathException) {
// Attempts from the file system.
- LOG.debug("Schamatron rules not found in class path, attempting file system {}", path);
- InputStream schRules = FileUtils.openInputStream(new File(path));
- rules = TemplatesFactory.newInstance().getTemplates(schRules, transformerFactory);
+ LOG.debug("Error loading schematron rules from class path, attempting file system {}", path);
+ try{
+ InputStream schRules = FileUtils.openInputStream(new File(path));
+ rules = TemplatesFactory.newInstance().getTemplates(schRules, transformerFactory);
+ } catch (FileNotFoundException e) {
+ LOG.debug("Schematron rules not found in the file system {}", path);
+ throw classPathException; // Can be more meaningful, for example, xslt compilation error.
+ }
}
// rules not found in class path nor in file system.
[2/6] camel git commit: Fixed CS. This closes #926
Posted by da...@apache.org.
Fixed CS. This closes #926
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/e9d25514
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/e9d25514
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/e9d25514
Branch: refs/heads/master
Commit: e9d2551463bea056d482c155345e6b7ccb614de8
Parents: 75906e3
Author: Claus Ibsen <da...@apache.org>
Authored: Mon Apr 4 08:29:30 2016 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Mon Apr 4 08:29:30 2016 +0200
----------------------------------------------------------------------
.../apache/camel/component/schematron/SchematronEndpoint.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/e9d25514/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/SchematronEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/SchematronEndpoint.java b/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/SchematronEndpoint.java
index 0a78f9f..1f1a92c 100644
--- a/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/SchematronEndpoint.java
+++ b/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/SchematronEndpoint.java
@@ -126,14 +126,14 @@ public class SchematronEndpoint extends DefaultEndpoint {
if (rules == null) {
try {
- // Attempt to read the schematron rules from the class path first.
+ // Attempt to read the schematron rules from the class path first.
LOG.debug("Reading schematron rules from class path {}", path);
InputStream schRules = ResourceHelper.resolveMandatoryResourceAsInputStream(getCamelContext(), path);
rules = TemplatesFactory.newInstance().getTemplates(schRules, transformerFactory);
} catch (Exception classPathException) {
// Attempts from the file system.
LOG.debug("Error loading schematron rules from class path, attempting file system {}", path);
- try{
+ try {
InputStream schRules = FileUtils.openInputStream(new File(path));
rules = TemplatesFactory.newInstance().getTemplates(schRules, transformerFactory);
} catch (FileNotFoundException e) {
[3/6] camel git commit: CAMEL-9549 - Improvement of error messages
when compiling the schema
Posted by da...@apache.org.
CAMEL-9549 - Improvement of error messages when compiling the schema
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/441e5b57
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/441e5b57
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/441e5b57
Branch: refs/heads/camel-2.17.x
Commit: 441e5b57770f70c6f7d86eadeadd7ae422c95c5f
Parents: 0570a2a
Author: syakimovich <s0...@gmail.com>
Authored: Sun Apr 3 14:25:01 2016 +0300
Committer: Claus Ibsen <da...@apache.org>
Committed: Mon Apr 4 08:29:57 2016 +0200
----------------------------------------------------------------------
.../component/schematron/SchematronEndpoint.java | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/441e5b57/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/SchematronEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/SchematronEndpoint.java b/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/SchematronEndpoint.java
index ccd6bea..0a78f9f 100644
--- a/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/SchematronEndpoint.java
+++ b/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/SchematronEndpoint.java
@@ -17,6 +17,7 @@
package org.apache.camel.component.schematron;
import java.io.File;
+import java.io.FileNotFoundException;
import java.io.InputStream;
import javax.xml.transform.Templates;
import javax.xml.transform.TransformerFactory;
@@ -129,11 +130,16 @@ public class SchematronEndpoint extends DefaultEndpoint {
LOG.debug("Reading schematron rules from class path {}", path);
InputStream schRules = ResourceHelper.resolveMandatoryResourceAsInputStream(getCamelContext(), path);
rules = TemplatesFactory.newInstance().getTemplates(schRules, transformerFactory);
- } catch (Exception e) {
+ } catch (Exception classPathException) {
// Attempts from the file system.
- LOG.debug("Schamatron rules not found in class path, attempting file system {}", path);
- InputStream schRules = FileUtils.openInputStream(new File(path));
- rules = TemplatesFactory.newInstance().getTemplates(schRules, transformerFactory);
+ LOG.debug("Error loading schematron rules from class path, attempting file system {}", path);
+ try{
+ InputStream schRules = FileUtils.openInputStream(new File(path));
+ rules = TemplatesFactory.newInstance().getTemplates(schRules, transformerFactory);
+ } catch (FileNotFoundException e) {
+ LOG.debug("Schematron rules not found in the file system {}", path);
+ throw classPathException; // Can be more meaningful, for example, xslt compilation error.
+ }
}
// rules not found in class path nor in file system.
[4/6] camel git commit: Fixed CS. This closes #926
Posted by da...@apache.org.
Fixed CS. This closes #926
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/8e720634
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/8e720634
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/8e720634
Branch: refs/heads/camel-2.17.x
Commit: 8e7206342bb767516603c9bfb8d4936c3dd3517f
Parents: 441e5b5
Author: Claus Ibsen <da...@apache.org>
Authored: Mon Apr 4 08:29:30 2016 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Mon Apr 4 08:30:04 2016 +0200
----------------------------------------------------------------------
.../apache/camel/component/schematron/SchematronEndpoint.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/8e720634/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/SchematronEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/SchematronEndpoint.java b/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/SchematronEndpoint.java
index 0a78f9f..1f1a92c 100644
--- a/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/SchematronEndpoint.java
+++ b/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/SchematronEndpoint.java
@@ -126,14 +126,14 @@ public class SchematronEndpoint extends DefaultEndpoint {
if (rules == null) {
try {
- // Attempt to read the schematron rules from the class path first.
+ // Attempt to read the schematron rules from the class path first.
LOG.debug("Reading schematron rules from class path {}", path);
InputStream schRules = ResourceHelper.resolveMandatoryResourceAsInputStream(getCamelContext(), path);
rules = TemplatesFactory.newInstance().getTemplates(schRules, transformerFactory);
} catch (Exception classPathException) {
// Attempts from the file system.
LOG.debug("Error loading schematron rules from class path, attempting file system {}", path);
- try{
+ try {
InputStream schRules = FileUtils.openInputStream(new File(path));
rules = TemplatesFactory.newInstance().getTemplates(schRules, transformerFactory);
} catch (FileNotFoundException e) {
[6/6] camel git commit: Fixed CS. This closes #926
Posted by da...@apache.org.
Fixed CS. This closes #926
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/ac741fd0
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/ac741fd0
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/ac741fd0
Branch: refs/heads/camel-2.16.x
Commit: ac741fd0d9daf2bc21222c0e1b5856029a129f10
Parents: dc3bb68
Author: Claus Ibsen <da...@apache.org>
Authored: Mon Apr 4 08:29:30 2016 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Mon Apr 4 08:30:43 2016 +0200
----------------------------------------------------------------------
.../apache/camel/component/schematron/SchematronEndpoint.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/ac741fd0/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/SchematronEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/SchematronEndpoint.java b/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/SchematronEndpoint.java
index 25e2760..6bda34a 100644
--- a/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/SchematronEndpoint.java
+++ b/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/SchematronEndpoint.java
@@ -126,14 +126,14 @@ public class SchematronEndpoint extends DefaultEndpoint {
if (rules == null) {
try {
- // Attempt to read the schematron rules from the class path first.
+ // Attempt to read the schematron rules from the class path first.
LOG.debug("Reading schematron rules from class path {}", path);
InputStream schRules = ResourceHelper.resolveMandatoryResourceAsInputStream(getCamelContext().getClassResolver(), path);
rules = TemplatesFactory.newInstance().getTemplates(schRules, transformerFactory);
} catch (Exception classPathException) {
// Attempts from the file system.
LOG.debug("Error loading schematron rules from class path, attempting file system {}", path);
- try{
+ try {
InputStream schRules = FileUtils.openInputStream(new File(path));
rules = TemplatesFactory.newInstance().getTemplates(schRules, transformerFactory);
} catch (FileNotFoundException e) {
[5/6] camel git commit: CAMEL-9549 - Improvement of error messages
when compiling the schema
Posted by da...@apache.org.
CAMEL-9549 - Improvement of error messages when compiling the schema
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/dc3bb68f
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/dc3bb68f
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/dc3bb68f
Branch: refs/heads/camel-2.16.x
Commit: dc3bb68f7c1f959b3a895a98e013b8d098563382
Parents: 823930c
Author: syakimovich <s0...@gmail.com>
Authored: Sun Apr 3 14:25:01 2016 +0300
Committer: Claus Ibsen <da...@apache.org>
Committed: Mon Apr 4 08:30:37 2016 +0200
----------------------------------------------------------------------
.../component/schematron/SchematronEndpoint.java | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/dc3bb68f/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/SchematronEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/SchematronEndpoint.java b/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/SchematronEndpoint.java
index bc63b8e..25e2760 100644
--- a/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/SchematronEndpoint.java
+++ b/components/camel-schematron/src/main/java/org/apache/camel/component/schematron/SchematronEndpoint.java
@@ -17,6 +17,7 @@
package org.apache.camel.component.schematron;
import java.io.File;
+import java.io.FileNotFoundException;
import java.io.InputStream;
import javax.xml.transform.Templates;
import javax.xml.transform.TransformerFactory;
@@ -129,11 +130,16 @@ public class SchematronEndpoint extends DefaultEndpoint {
LOG.debug("Reading schematron rules from class path {}", path);
InputStream schRules = ResourceHelper.resolveMandatoryResourceAsInputStream(getCamelContext().getClassResolver(), path);
rules = TemplatesFactory.newInstance().getTemplates(schRules, transformerFactory);
- } catch (Exception e) {
+ } catch (Exception classPathException) {
// Attempts from the file system.
- LOG.debug("Schamatron rules not found in class path, attempting file system {}", path);
- InputStream schRules = FileUtils.openInputStream(new File(path));
- rules = TemplatesFactory.newInstance().getTemplates(schRules, transformerFactory);
+ LOG.debug("Error loading schematron rules from class path, attempting file system {}", path);
+ try{
+ InputStream schRules = FileUtils.openInputStream(new File(path));
+ rules = TemplatesFactory.newInstance().getTemplates(schRules, transformerFactory);
+ } catch (FileNotFoundException e) {
+ LOG.debug("Schematron rules not found in the file system {}", path);
+ throw classPathException; // Can be more meaningful, for example, xslt compilation error.
+ }
}
// rules not found in class path nor in file system.