java.lang.NullPointerException

XWiki.org JIRA | Marius Dumitru Florea | 7 years ago
  1. 0

    Follow this steps to reproduce: * create a new page and put a lot of content to increase the page loading time (code macro helps here) then save the page * load the page in WYSIWYG edit mode (enable firebug in order to increase the page loading time more) * switch to Source tab quickly before the rich text area has finished loading This is what is printed in the server log: {code} java.lang.NullPointerException at java.io.StringReader.<init>(StringReader.java:50) at com.xpn.xwiki.wysiwyg.server.cleaner.internal.DefaultHTMLCleaner.clean(DefaultHTMLCleaner.java:69) at com.xpn.xwiki.wysiwyg.server.converter.internal.DefaultHTMLConverter.fromHTML(DefaultHTMLConverter.java:97) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:527) at com.xpn.xwiki.wysiwyg.server.XWikiRemoteServiceServlet.processCall(XWikiRemoteServiceServlet.java:54) at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:86) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166) at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:117) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at com.xpn.xwiki.web.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:295) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:536) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:930) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:405) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582) 2009-10-22 17:12:13.351:/xwiki:WARN: Exception while dispatching incoming RPC call com.google.gwt.user.server.rpc.UnexpectedException: Service method 'public abstract java.lang.String com.xpn.xwiki.wysiwyg.client.converter.HTMLConverter.fromHTML(java.lang.String,java.lang.String)' threw an unexpected exception: java.lang.RuntimeException: Exception while parsing HTML at com.google.gwt.user.server.rpc.RPC.encodeResponseForFailure(RPC.java:360) at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:546) at com.xpn.xwiki.wysiwyg.server.XWikiRemoteServiceServlet.processCall(XWikiRemoteServiceServlet.java:54) at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:86) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166) at com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:117) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at com.xpn.xwiki.web.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:295) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157) at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388) at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216) at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182) at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765) at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418) at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230) at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114) at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152) at org.mortbay.jetty.Server.handle(Server.java:326) at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:536) at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:930) at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747) at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218) at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:405) at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582) Caused by: java.lang.RuntimeException: Exception while parsing HTML at com.xpn.xwiki.wysiwyg.server.converter.internal.DefaultHTMLConverter.fromHTML(DefaultHTMLConverter.java:110) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:527) ... 30 more Caused by: java.lang.NullPointerException at java.io.StringReader.<init>(StringReader.java:50) at com.xpn.xwiki.wysiwyg.server.cleaner.internal.DefaultHTMLCleaner.clean(DefaultHTMLCleaner.java:69) at com.xpn.xwiki.wysiwyg.server.converter.internal.DefaultHTMLConverter.fromHTML(DefaultHTMLConverter.java:97) ... 35 more {code}

    XWiki.org JIRA | 7 years ago | Marius Dumitru Florea
    java.lang.NullPointerException
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 0

    Angular http POST to Servlet

    Stack Overflow | 1 year ago | ViChU
    java.lang.NullPointerException
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.NullPointerException

    No message provided

    at java.io.StringReader.<init>()
  2. Java RT
    StringReader.<init>
    1. java.io.StringReader.<init>(StringReader.java:50)
    1 frame
  3. com.xpn.xwiki
    DefaultHTMLConverter.fromHTML
    1. com.xpn.xwiki.wysiwyg.server.cleaner.internal.DefaultHTMLCleaner.clean(DefaultHTMLCleaner.java:69)
    2. com.xpn.xwiki.wysiwyg.server.converter.internal.DefaultHTMLConverter.fromHTML(DefaultHTMLConverter.java:97)
    2 frames
  4. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    4. java.lang.reflect.Method.invoke(Method.java:616)
    4 frames
  5. Jetty Contrib :: jetty-gwt RemoteServiceServlet
    RPC.invokeAndEncodeResponse
    1. com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:527)
    1 frame
  6. com.xpn.xwiki
    XWikiRemoteServiceServlet.processCall
    1. com.xpn.xwiki.wysiwyg.server.XWikiRemoteServiceServlet.processCall(XWikiRemoteServiceServlet.java:54)
    1 frame
  7. Jetty Contrib :: jetty-gwt RemoteServiceServlet
    RemoteServiceServlet.doPost
    1. com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:86)
    1 frame
  8. JavaServlet
    HttpServlet.service
    1. javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    2. javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    2 frames
  9. Jetty Server
    ServletHandler$CachedChain.doFilter
    1. org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)
    2. org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
    2 frames
  10. com.xpn.xwiki
    ActionFilter.doFilter
    1. com.xpn.xwiki.web.ActionFilter.doFilter(ActionFilter.java:117)
    1 frame
  11. Jetty Server
    ServletHandler$CachedChain.doFilter
    1. org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    1 frame
  12. com.xpn.xwiki
    XWikiDavFilter.doFilter
    1. com.xpn.xwiki.plugin.webdav.XWikiDavFilter.doFilter(XWikiDavFilter.java:68)
    1 frame
  13. Jetty Server
    ServletHandler$CachedChain.doFilter
    1. org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    1 frame
  14. com.xpn.xwiki
    SavedRequestRestorerFilter.doFilter
    1. com.xpn.xwiki.web.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:295)
    1 frame
  15. Jetty Server
    ServletHandler$CachedChain.doFilter
    1. org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    1 frame
  16. com.xpn.xwiki
    SetCharacterEncodingFilter.doFilter
    1. com.xpn.xwiki.web.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112)
    1 frame
  17. Jetty Server
    SelectChannelEndPoint.run
    1. org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    2. org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
    3. org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
    4. org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
    5. org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
    6. org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
    7. org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
    8. org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
    9. org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    10. org.mortbay.jetty.Server.handle(Server.java:326)
    11. org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:536)
    12. org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:930)
    13. org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:747)
    14. org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:218)
    15. org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:405)
    16. org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
    16 frames
  18. Jetty Util
    QueuedThreadPool$PoolThread.run
    1. org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)
    1 frame