From the stack trace, the cause of the failure seems to
be that there
is no ExecutionContext set on the Execution component [1]. On which
request is this stack trace logged? Is it a GWT-RPC request? In this
case the Execution is initialized by XWikiContextInitializationFilter
[2] which calls ServletContainerInitializer#initializeRequest() where
a new ExecutionContext is put on the Execution [3]. Otherwise, for an
action request (save, preview, etc.) the ExecutionContext is
initialized in XWikiAction [4].
If the ExecutionContext is properly initialized then it means some
code removes it from the Execution afterwards. Putting some
breakpoints in DefaultExecution [5] should catch this code.
Hope this helps,
Marius
[1]
https://github.com/xwiki/xwiki-platform/blob/xwiki-platform-3.5.1/xwiki-pla…
[2]
https://github.com/xwiki/xwiki-platform/blob/xwiki-platform-3.5.1/xwiki-pla…
[3]
https://github.com/xwiki/xwiki-platform/blob/xwiki-platform-3.5.1/xwiki-pla…
[4]
https://github.com/xwiki/xwiki-platform/blob/xwiki-platform-3.5.1/xwiki-pla…
[5]
https://github.com/xwiki/xwiki-commons/blob/xwiki-commons-3.5.1/xwiki-commo…
On Sat, Mar 28, 2015 at 2:37 AM, Paul Libbrecht <paul(a)hoplahup.net> wrote:
Hello XWiki experts,
in Curriki, we met a bug that seems related to the wysiwyg editor's
ability to accept html.
When it does so, and is input with an image, it fails the html
conversion because of the exception below for the simple (cleaned) content:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html><head></head><body><p>Image</p><p><!--startimage:false|-|attach|-|sunset-dark2.PNG--><img
alt="sunset-dark2.PNG"
src="http://node1.hoplahup.net/xwiki/bin/download/AssetTemp/dgW1kVv9l2…
Yielding the exception:
Caused by: java.lang.NullPointerException: null
at
com.xpn.xwiki.doc.DefaultDocumentAccessBridge.getContext(DefaultDocumentAccessBridge.java:85)
~[xwiki-platform-legacy-oldcore-3.5.1.jar:na]
at
com.xpn.xwiki.doc.DefaultDocumentAccessBridge.getAttachmentURL(DefaultDocumentAccessBridge.java:847)
~[xwiki-platform-legacy-oldcore-3.5.1.jar:na]
at
org.xwiki.rendering.internal.wiki.XWikiWikiModel.getLinkURL(XWikiWikiModel.java:137)
~[xwiki-platform-rendering-xwiki-3.5.1.jar:na]
at
org.xwiki.rendering.internal.wiki.XWikiWikiModel.getImageURL(XWikiWikiModel.java:153)
~[xwiki-platform-rendering-xwiki-3.5.1.jar:na]
at
org.xwiki.rendering.internal.renderer.xhtml.image.DefaultXHTMLImageRenderer.onImage(DefaultXHTMLImageRenderer.java:120)
~[xwiki-rendering-syntax-xhtml-3.5.1.jar:na]
at
org.xwiki.rendering.internal.renderer.xhtml.XHTMLChainingRenderer.onImage(XHTMLChainingRenderer.java:545)
~[xwiki-rendering-syntax-xhtml-3.5.1.jar:na]
at
org.xwiki.rendering.listener.chaining.AbstractChainingListener.onImage(AbstractChainingListener.java:454)
~[xwiki-rendering-api-3.5.1.jar:na]
at
org.xwiki.rendering.listener.chaining.AbstractChainingListener.onImage(AbstractChainingListener.java:454)
~[xwiki-rendering-api-3.5.1.jar:na]
at
org.xwiki.rendering.listener.chaining.EmptyBlockChainingListener.onImage(EmptyBlockChainingListener.java:600)
~[xwiki-rendering-api-3.5.1.jar:na]
at
org.xwiki.rendering.listener.chaining.AbstractChainingListener.onImage(AbstractChainingListener.java:454)
~[xwiki-rendering-api-3.5.1.jar:na]
at
org.xwiki.rendering.listener.chaining.BlockStateChainingListener.onImage(BlockStateChainingListener.java:796)
~[xwiki-rendering-api-3.5.1.jar:na]
I am not too sure how to debug that.
Clues would be welcome.
thanks in advance.
Paul
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs