incubator-adffaces-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Cudennec <Smutje...@gmx.net>
Subject Re: NullPointerException in PartialPageUtils
Date Tue, 23 Jan 2007 13:24:28 GMT
JSF-Spring does not use any filters - but we use some more filters like 
"MyFacesExtensionsFilter", etc. I ensured the trinidad filter being the 
very first. Unfortunately that does not solve the problem. I tried out 
the demo war from the snapshot but I also get an error after choosing 
which demo I want to see (first post).

javax.servlet.ServletException: javax.servlet.ServletException
	javax.faces.webapp.FacesServlet.service(FacesServlet.java:152)
	org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:326)
	org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:290)
	org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:213)
	org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:93)
	org.apache.myfaces.trinidaddemo.webapp.RedirectFilter.doFilter(RedirectFilter.java:95)

*root cause*

javax.faces.FacesException: javax.servlet.ServletException
	org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:426)
	org.apache.myfaces.trinidadinternal.context.ExternalContextDecorator.dispatch(ExternalContextDecorator.java:41)
	org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$OverrideDispatch.dispatch(FacesContextFactoryImpl.java:235)
	org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
	org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:178)
	org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
	javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
	org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._invokeDoFilter(TrinidadFilterImpl.java:326)
	org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:290)
	org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:213)
	org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:93)
	org.apache.myfaces.trinidaddemo.webapp.RedirectFilter.doFilter(RedirectFilter.java:95)

I'm a bit in the dark here ;).

Thanks for your help - that error can't be unsolvable!?

Christopher

Matthias Wessendorf schrieb:
> can you post a demo.war ?
>
> does jsf_spring still use a filter?
> ensure that the trinidad filter is in front
>
> -M
>
> On 1/23/07, Christopher Cudennec <SmutjeJim@gmx.net> wrote:
>> Hi,
>>
>> yes, JSF-Spring is the SF-project by mindmatters, you're right. I'd like
>> to provide you with some code to get some more ideas about the problem:
>>
>> ======= 1 Javascript error by Firefox ===========
>> Fehler: uncaught exception: [Exception... "Node was not found"  code:
>> "8" nsresult: "0x80530008 (NS_ERROR_DOM_NOT_FOUND_ERR)"  location:
>> "http://localhost:8080/op/adf/jsLibs/Common11-m7.js;jsessionid=D568F59ACE9507B6F93BC15A8C8DD029

>>
>> Line: 4106"]
>>
>> ======= 2 Exception when using IE7 ===========
>> As I stated before I get a different behaviour when using IE7. After
>> changing the configuration (you were right, I didn't have the filter
>> installed) I get a different exception. I must have thought it was the
>> old NPE from before.
>>
>> O ERROR 2007-01-23 13:30:56 DispatcherServlet: Could not complete 
>> request
>> java.lang.NullPointerException: charsetName
>>        at java.io.OutputStreamWriter.<init>(OutputStreamWriter.java:81)
>>        at java.net.URLEncoder.encode(URLEncoder.java:189)
>>        at
>> org.apache.myfaces.shared_impl.renderkit.html.HtmlLinkRendererBase.addParameterToHref(HtmlLinkRendererBase.ja

>>
>>
>> va:440)
>>        at
>> org.apache.myfaces.shared_impl.renderkit.html.HtmlLinkRendererBase.addChildParametersToHref(HtmlLinkRendererB

>>
>>
>> ase.java:378)
>>        at
>> org.apache.myfaces.shared_impl.renderkit.html.HtmlLinkRendererBase.renderOutputLinkStart(HtmlLinkRendererBase

>>
>>
>> .java:394)
>>        at
>> org.apache.myfaces.shared_impl.renderkit.html.HtmlLinkRendererBase.encodeBegin(HtmlLinkRendererBase.java:101)

>>
>>
>>
>>        at
>> javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:512) 
>>
>>        at
>> org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils.renderChild(RendererUtils.java:433)

>>
>>
>>        at
>> org.apache.myfaces.shared_tomahawk.renderkit.RendererUtils.renderChildren(RendererUtils.java:419)

>>
>>
>>        at
>> org.apache.myfaces.shared_tomahawk.renderkit.html.HtmlGroupRendererBase.encodeEnd(HtmlGroupRendererBase.java:

>>
>>
>>
>> ======= 3 snip from my web.xml ===========
>> <!-- TRINIDAD START -->
>>  <!-- FaceletViewHandler configuration -->
>>  <context-param>
>>
>> <param-name>org.apache.myfaces.trinidad.ALTERNATE_VIEW_HANDLER</param-name>

>>
>>    <param-value>com.sun.facelets.FaceletViewHandler</param-value>
>>  </context-param>
>>
>>  <filter>
>>    <filter-name>trinidad</filter-name>
>>
>> <filter-class>org.apache.myfaces.trinidad.webapp.TrinidadFilter</filter-class>

>>
>>
>>  </filter>
>>
>>  <filter-mapping>
>>    <filter-name>trinidad</filter-name>
>>    <servlet-name>dispatcher</servlet-name>
>>  </filter-mapping>
>>
>>  <!-- Faces Servlet -->
>>  <!-- commented out because we use the JSF-Spring Dispatcher Servlet -->
>>  <!-- <servlet>
>>    <servlet-name>faces</servlet-name>
>>    <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
>>  </servlet>  -->
>>
>>  <!-- resource loader servlet -->
>>  <servlet>
>>    <servlet-name>resources</servlet-name>
>>
>> <servlet-class>org.apache.myfaces.trinidad.webapp.ResourceServlet</servlet-class>

>>
>>
>>  </servlet>
>>
>>  <!-- Faces Servlet Mappings -->
>>  <!-- <servlet-mapping>
>>    <servlet-name>faces</servlet-name>
>>    <url-pattern>/faces/*</url-pattern>
>>  </servlet-mapping> -->
>>
>>  <servlet-mapping>
>>    <servlet-name>resources</servlet-name>
>>    <url-pattern>/adf/*</url-pattern>
>>  </servlet-mapping>
>>
>>  <!-- TRINIDAD END -->
>>
>>
>>
>> Thanks,
>> Christopher
>>
>> Matthias Wessendorf schrieb:
>> >> thanks for catching the NPE. I'll go and have a try with your 
>> changes. I
>> >> hope I have the configuration right - I'm not 100% sure but at 
>> least I
>> >> have the trinidad filter installed. Does anyone of you have 
>> experience
>> >> with JSF-Spring/MyFaces/Trinidad? Could that be the cause?
>> >
>> > ah, you mean the sf project, from the German mindmatters?
>> > I played around that last year or so, currently I am on spring 2.0
>> > which supports new scopes like "session".
>> >
>> >> I get strange behaviour after using the login form - the first 
>> page of
>> >> my app. Firefox shows a javascript error and does nothing (I stay 
>> on the
>> >> login page); IE7 submits the form and displays the NPE mentioned
>> >> earlier.
>> >
>> > providing code / errors is good in case of that.
>> >
>> > If you need a *template* for something like
>> > "Using MyFaces, Trinidad, Facelets, Shale, Spring 2.0, JPA and Toplink
>> > Essentials"
>> >
>> > take a look here:
>> > http://code.google.com/p/facesgoodies/
>> >
>> > (you currently need Shale 1.10-SNAPSHOT and MyFaces 1.1.5-SNAPSHOT
>> > also a Trinidad build)
>> >
>> >> I'm going to search the list for similiar issues but maybe someone 
>> has a
>> >> hint?
>> >>
>> >> Cheers,
>> >> Christopher
>> >>
>> >> Adam Winer schrieb:
>> >> > Hrm, odd that you'd see this NPE without it.  At any rate,
>> >> > I'll put a null check in so this exception will go away (and
>> >> > make it easier to diagnose the issue in the future).
>> >> >
>> >> > -- Adam
>> >> >
>> >> >
>> >> > On 1/22/07, Matthias Wessendorf <matzew@apache.org> wrote:
>> >> >> did you install the Trinidad Filter?
>> >> >>
>> >> >>
>> >> >>
>> >> >> On 1/22/07, Christopher Cudennec <SmutjeJim@gmx.net> wrote:
>> >> >> > Hi,
>> >> >> >
>> >> >> > I'm trying to set up trinidad using the latest snapshot.
>> >> >> Unfortunately I
>> >> >> > only get a NullPointerException:
>> >> >> >
>> >> >> > java.lang.NullPointerException
>> >> >> >
>> >> >>
>> >> 
>> org.apache.myfaces.trinidadinternal.renderkit.core.xhtml.PartialPageUtils.isPartialRequest(PartialPageUtils.java:47)

>>
>> >>
>> >> >>
>> >> >> >
>> >> >>
>> >> 
>> org.apache.myfaces.trinidadinternal.renderkit.core.CoreRenderKit.shortCircuitRenderView(CoreRenderKit.java:292)

>>
>> >>
>> >> >>
>> >> >> >
>> >> >> >
>> >> >>
>> >> 
>> org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:157)

>>
>> >>
>> >> >>
>> >> >> >
>> >> >> >
>> >> >> > Could some misconfiguration be the cause of the exception?
As I
>> >> said,
>> >> >> > I'm just trying to change the configuration of my project
to
>> >> integrate
>> >> >> > trindiad. Any ideas about it?
>> >> >> >
>> >> >> > Thanks,
>> >> >> >
>> >> >> > Christopher
>> >> >> >
>> >> >>
>> >> >>
>> >> >> --
>> >> >> Matthias Wessendorf
>> >> >> http://tinyurl.com/fmywh
>> >> >>
>> >> >> further stuff:
>> >> >> blog: http://jroller.com/page/mwessendorf
>> >> >> mail: mwessendorf-at-gmail-dot-com
>> >> >>
>> >> >
>> >> >
>> >>
>> >>
>> >
>> >
>>
>>
>
>


Mime
View raw message