Details
-
Bug
-
Resolution: Duplicate
-
Minor
-
None
-
2.0 M1, 1.9.1
-
Unknown
-
N/A
-
N/A
-
Description
A typical example is the following :
- Dropping in the webapp a JAR with a macro that forgets to have a constructor with no parameter
- The CM silently fails to initialize the component declared in the JAR
- From then on, most of the code that relies on components lookup seems to throw exceptions. For example, rendering any page in syntax 2.0 will fail with the following :
org.xwiki.velocity.XWikiVelocityException: Failed to evaluate content with id [/templates/contentview.vm] at org.xwiki.velocity.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:187) [snip] at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:522) Caused by: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getRenderedContent' in class com.xpn.xwiki.api.Document threw exception com.xpn.xwiki.XWikiException: Error number 0 in 4: Failed to convert document to syntax [xhtml/1.0] Wrapped Exception: Error number 0 in 4: Failed to convert document to syntax [xhtml/1.0] Wrapped Exception: Failed to load component [org.xwiki.rendering.transformation.TransformationManager] for hint [default] at /templates/contentview.vm[line 7, column 7] at org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException(ASTMethod.java:337) [snip] at org.xwiki.velocity.DefaultVelocityEngine.evaluate(DefaultVelocityEngine.java:178) ... 64 more Caused by: com.xpn.xwiki.XWikiException: Error number 0 in 4: Failed to convert document to syntax [xhtml/1.0] Wrapped Exception: Error number 0 in 4: Failed to convert document to syntax [xhtml/1.0] Wrapped Exception: Failed to load component [org.xwiki.rendering.transformation.TransformationManager] for hint [default] at com.xpn.xwiki.doc.XWikiDocument.performSyntaxConversion(XWikiDocument.java:5204) [snip] at org.apache.velocity.runtime.parser.node.ASTMethod.execute(ASTMethod.java:270) ... 68 more
Attachments
Issue Links
- duplicates
-
XRENDERING-232 Protect the Macro Transformation even more from rogue Macro implementations
- Closed
- relates to
-
XRENDERING-235 Improve message for invalid macros
- Closed