You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by "Diogo Bacelar Quintela (JIRA)" <co...@jakarta.apache.org> on 2005/08/16 20:20:58 UTC
[jira] Created: (JELLY-216) org.apache.commons.jelly.tags.xml.TransformTag fails testTransformSchematron in jdk1.3
org.apache.commons.jelly.tags.xml.TransformTag fails testTransformSchematron in jdk1.3
--------------------------------------------------------------------------------------
Key: JELLY-216
URL: http://issues.apache.org/jira/browse/JELLY-216
Project: jelly
Type: Bug
Components: taglib.xml
Reporter: Diogo Bacelar Quintela
Priority: Minor
JDK 1.4 - All OK
JDK 1.3 - Compiles OK but fails testTransformSchematron
Runtime error at
[junit] Testcase: testTransformSchematron(org.apache.commons.jelly.tags.xml.TestXMLTags): Caused an ERROR
[junit] file:/C:/Work/commons-jelly/jelly-tags/xml/src/test/org/apache/commons/jelly/tags/xml/schematron/transformSchematronExample.jelly:22:29: <x:transform> java.lang.NoSuchMethodError
[junit] org.apache.commons.jelly.JellyTagException: file:/C:/Work/commons-jelly/jelly-tags/xml/src/test/org/apache/commons/jelly/tags/xml/schematron/transformSchematronExample.jelly:22:29: <x:transform> java.lang.NoSuchMethodError
[junit] at org.apache.commons.jelly.impl.TagScript.handleException(TagScript.java:712)
[junit] at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:282)
[junit] at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
[junit] at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186)
[junit] at org.apache.commons.jelly.tags.core.JellyTag.doTag(JellyTag.java:45)
[junit] at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:262)
[junit] at org.apache.commons.jelly.JellyContext.runScript(JellyContext.java:706)
[junit] at org.apache.commons.jelly.JellyContext.runScript(JellyContext.java:670)
[junit] at org.apache.commons.jelly.JellyContext.runScript(JellyContext.java:579)
[junit] at org.apache.commons.jelly.tags.xml.TestXMLTags.evaluteScriptAsText(TestXMLTags.java:309)
[junit] at org.apache.commons.jelly.tags.xml.TestXMLTags.evaluteScriptAsText(TestXMLTags.java:283)
[junit] at org.apache.commons.jelly.tags.xml.TestXMLTags.testTransformSchematron(TestXMLTags.java:231)
[junit] Root cause
[junit] java.lang.NoSuchMethodError
[junit] at org.apache.commons.jelly.tags.xml.TransformTag$1.resolve(TransformTag.java:221)
[junit] at org.apache.xalan.processor.ProcessorInclude.parse(ProcessorInclude.java:235)
[junit] at org.apache.xalan.processor.ProcessorInclude.startElement(ProcessorInclude.java:192)
[junit] at org.apache.xalan.processor.StylesheetHandler.startElement(StylesheetHandler.java:658)
[junit] at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
[junit] at org.apache.xerces.parsers.AbstractXMLDocumentParser.emptyElement(Unknown Source)
[junit] at org.apache.xerces.impl.XMLNamespaceBinder.handleStartElement(Unknown Source)
[junit] at org.apache.xerces.impl.XMLNamespaceBinder.emptyElement(Unknown Source)
[junit] at org.apache.xerces.impl.dtd.XMLDTDValidator.emptyElement(Unknown Source)
[junit] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
[junit] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
[junit] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
[junit] at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
[junit] at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
[junit] at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
[junit] at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
[junit] at org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:983)
[junit] at org.apache.xalan.processor.TransformerFactoryImpl.newTransformerHandler(TransformerFactoryImpl.java:700)
[junit] at org.apache.commons.jelly.tags.xml.TransformTag.doTag(TransformTag.java:124)
[junit] at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:262)
[junit] at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
[junit] at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:186)
[junit] at org.apache.commons.jelly.tags.core.JellyTag.doTag(JellyTag.java:45)
[junit] at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:262)
[junit] at org.apache.commons.jelly.JellyContext.runScript(JellyContext.java:706)
[junit] at org.apache.commons.jelly.JellyContext.runScript(JellyContext.java:670)
[junit] at org.apache.commons.jelly.JellyContext.runScript(JellyContext.java:579)
[junit] at org.apache.commons.jelly.tags.xml.TestXMLTags.evaluteScriptAsText(TestXMLTags.java:309)
[junit] at org.apache.commons.jelly.tags.xml.TestXMLTags.evaluteScriptAsText(TestXMLTags.java:283)
[junit] at org.apache.commons.jelly.tags.xml.TestXMLTags.testTransformSchematron(TestXMLTags.java:231)
Fix:
Subtitute
/**
* Creates a new URI Resolver so that URIs inside the XSLT document can be
* resolved using the JellyContext
*
* @return a URI Resolver for the JellyContext
*/
protected URIResolver createURIResolver() {
return new URIResolver() {
public Source resolve(String href, String base)
throws TransformerException {
...
return new StreamSource(context.getResourceAsStream(href));
}
};
}
by
/**
* Creates a new URI Resolver so that URIs inside the XSLT document can be
* resolved using the JellyContext
*
* @return a URI Resolver for the JellyContext
*/
protected URIResolver createURIResolver() {
final JellyContext ctx = context;
return new URIResolver() {
public Source resolve(String href, String base)
throws TransformerException {
....
return new StreamSource(ctx.getResourceAsStream(href));
}
};
}
Or put context public in TagSupport.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org