jQuery in Action, 3rd edition
The moose likes JSF and the fly likes Funny exception with StringBuffer with jsf Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » JSF
Bookmark "Funny exception with StringBuffer with jsf" Watch "Funny exception with StringBuffer with jsf" New topic

Funny exception with StringBuffer with jsf

Luis Vazquez

Joined: Dec 15, 2010
Posts: 1
Hi, I am really freaking out with an exception i can't solve during this 4 last days,and I must develop the project that will change the world. I'm using maven myfaces + tomahawk + spring. This is the exception i get when de application is run with jetty maven plugin:

com.sun.facelets.FaceletViewHandler handleRenderException
GRAVE: Error Rendering View[null]
at java.lang.StringBuffer.<init>(StringBuffer.java:103)
at com.sun.facelets.FaceletViewHandler.getRenderedViewId(FaceletViewHandler.java:763)
at com.sun.facelets.FaceletViewHandler.buildView(FaceletViewHandler.java:505)
at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:567)
at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:101)
at org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:221)
at org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:85)
at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:239)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:191)
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:502)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:286)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1148)
at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:75)
at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:213)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1148)
at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:349)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1148)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:387)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:417)
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:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:535)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:865)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:539)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520)

Obviously i tried to search for a solution on Google but i did not suceed.

I will apreciatte a lot a solution.

PD: I attach pom.xml and web.xml. Oops,by the way,¡m on mac. Sorry for my english,i'm working on it.

Thanks in advance.



Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16901

You are attempting to execute the following code:

There's nothing wrong with StringBuffer except that it doesn't want a null argument, it wants a valid String argument.

Now comes the frustrating part. None of that code is your code and the null argument value itself is probably coming from a non-obvious place. For example, you might have a null drop-down menu list.

You can check the JSF page for possible problems. You can check the backing bean(s) to make sure that they don't return null properties. Maybe you'll get lucky.

A lot of times I don't, however and I end up having to set an IDE breakpoint to catch the exception, then start looking at stack frames in the hope that they'll lead me to the offending component.

Customer surveys are for companies who didn't pay proper attention to begin with.
LovetobeAmit Aggarwal

Joined: Feb 20, 2015
Posts: 1
Hi, I am also stuck here....Did you manage to solve it. Please share your thoughts on it.
I agree. Here's the link: http://aspose.com/file-tools
subject: Funny exception with StringBuffer with jsf
It's not a secret anymore!