users@grizzly.java.net

Re: ServletAdapter Issue

From: Jason Lee <jasondlee_at_sun.com>
Date: Wed, 04 Feb 2009 11:16:16 -0600

Thanks, Jeanfrancois. I'm retrying things on my end.

On Feb 3, 2009, at 3:37 PM, Jeanfrancois Arcand wrote:

> Salut,
>
> I've filled and fixed (thanks to your test case):
>
> https://grizzly.dev.java.net/issues/show_bug.cgi?id=428
> https://grizzly.dev.java.net/issues/show_bug.cgi?id=429
>
>> 3-Feb-2009 4:29:55 PM com.sun.faces.config.ConfigureListener
>> contextInitialized
>> INFO: Initializing Mojarra 2.0.0 (PR b08) for context ''
>> 3-Feb-2009 4:29:56 PM com.sun.faces.spi.InjectionProviderFactory
>> createInstance
>> INFO: JSF1048: PostConstruct/PreDestroy annotations present.
>> ManagedBeans methods marked with these annotations will have said
>> annotations processed.
>> 3-Feb-2009 4:29:56 PM com.sun.faces.config.ConfigureListener
>> installExpressionFactory
>> SEVERE: Unable to instantiate ExpressionFactory
>> 'com.sun.el.ExpressionFactoryImpl'
>> 3-Feb-2009 4:29:56 PM
>> com.sun.grizzly.http.servlet.ServletContextImpl initListeners
>> SEVERE: com.sun.faces.config.ConfigurationException: It appears the
>> JSP version of the container is older than 2.1 and unable to locate
>> the EL RI expression factory, com.sun.el.ExpressionFactoryImpl. If
>> not using JSP or the EL RI, make sure the context initialization
>> parameter, com.sun.faces.expressionFactory, is properly set.
>> at
>> com
>> .sun
>> .faces
>> .config
>> .ConfigureListener
>> .registerELResolverAndListenerWithJsp(ConfigureListener.java:574)
>> at
>> com
>> .sun
>> .faces
>> .config.ConfigureListener.contextInitialized(ConfigureListener.java:
>> 221)
>> at
>> com
>> .sun
>> .grizzly
>> .http
>> .servlet.ServletContextImpl.initListeners(ServletContextImpl.java:
>> 151)
>> at
>> com
>> .sun
>> .grizzly
>> .http
>> .servlet.ServletAdapter.configureServletEnv(ServletAdapter.java:347)
>> at
>> com
>> .sun.grizzly.http.servlet.ServletAdapter.start(ServletAdapter.java:
>> 209)
>> at
>> com
>> .sun.grizzly.http.SelectorThread.initEndpoint(SelectorThread.java:
>> 1087)
>> at
>> com.sun.grizzly.http.SelectorThread.listen(SelectorThread.java:1138)
>> at
>> com
>> .sun
>> .grizzly.http.embed.GrizzlyWebServer.start(GrizzlyWebServer.java:566)
>> at com.steeplesoft.grizzlyfaces.Main.main(Main.java:29)
>
> I'm gussing you need to drop el jars under WEB-INF as well. Does JSF
> requires JSP?
>
> A+
>
> -- Jeanfrancois
>
> Jason Lee wrote:
>> On Jan 28, 2009, at 3:49 PM, Jeanfrancois Arcand wrote:
>>> Jason Lee wrote:
>>>> Hey, Jeanfracois. I got passed the original issue (the null
>>>> InputStream). When Mojarra initializes, it tries to get context
>>>> params from web.xml unless told not to. Since web.xml wasn't in
>>>> the classpath[1], I told Mojarra not to search for it. Problem
>>>> "solved." When I run my test app now, it starts up with no
>>>> errors and starts taking requests. The problem I'm seeing now is
>>>> that either I'm not setting up the servlet-mapping correctly, or
>>>> it's not being honored. Here's my code:
>>>> sa.setServletInstance(new FacesServlet());
>>>>
>>>> sa
>>>> .addContextParameter
>>>> (BooleanWebContextInitParameter
>>>> .ForceLoadFacesConfigFiles.getQualifiedName(), "true");
>>>> ws.addGrizzlyAdapter(sa, new String[] {"*.jsf"});
>>>> ws.start();
>>>> When I request, say, http://localhost:8080/index.jsf, I get this
>>>> error:
>>>
>>> Hum difficult to say, but can you try adding just / instead (all
>>> requests will be mapped to your ServletAdapter no matter what) and
>>> see if that help?
>>>
>>> Or push me your code so I can try :-)
>> I'm working on that now. Trying to get a bit more data for you,
>> but I'm running into an unexpected issue...
>> <http://www.java.com> * Jason Lee *
>> Senior Java Developer
>> GlassFish Administration Console
>> *Sun Microsystems, Inc.*
>> Phone x31197/+1 405-343-1964
>> Email jasondlee_at_sun.com <mailto:jasondlee_at_sun.com>
>> Blog http://blogs.sun.com/jasondlee
>> Blog http://blogs.steeplesoft.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_grizzly.dev.java.net
> For additional commands, e-mail: users-help_at_grizzly.dev.java.net
>

         Jason Lee
Senior Java Developer
GlassFish Administration Console

Sun Microsystems, Inc.
Phone x31197/+1 405-343-1964
Email jasondlee_at_sun.com
Blog http://blogs.sun.com/jasondlee
Blog http://blogs.steeplesoft.com