You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by John Francis <jf...@infoterra.com> on 2006/07/20 23:50:56 UTC

myfaces works under OC4J 10.1.3, but not under OAS 10.1.3??

Hello Myfaces users....
   
    I've been able to get myfaces versions from 1.1.1 thru 1.1.3 to work 
on a variety of appservers without too much trouble, but am stumped as 
to why it works under OC4J standalone, but not under OC4J when 
integrated with the rest of OAS.

The app seems to startup fine, whether I use a 
org.apache.myfaces.webapp.StartupServletContextListener in web.xml or 
not. OAS appears to detect and run the listener defined in .tld files, 
producing:

17:09:48 - DEBUG - 
org.apache.myfaces.webapp.StartupServletContextListener - Initializing 
MyFaces
17:09:48 - INFO  - org.apache.myfaces.config.FacesConfigurator - Reading 
standard config org/apache/myfaces/resource/standard-faces-config.xml
17:09:49 - INFO  - org.apache.myfaces.config.FacesConfigurator - Reading 
config /WEB-INF/program-faces-config.xml
17:09:49 - INFO  - org.apache.myfaces.config.FacesConfigurator - Reading 
config /WEB-INF/forms-faces-config.xml
<...reading more *faces-config.xml's, as def'd in web.xml...>
17:09:50 - DEBUG - org.apache.myfaces.application.jsp.JspViewHandlerImpl 
- New ViewHandler instance created
17:09:50 - DEBUG - org.apache.myfaces.application.NavigationHandlerImpl 
- New NavigationHandler instance created
17:09:50 - DEBUG - 
org.apache.myfaces.application.jsp.JspStateManagerImpl - New 
JspStateManagerImpl instance created
17:09:50 - DEBUG - org.apache.myfaces.application.ApplicationImpl - New 
Application instance created
<...much happy output about renderers, components, etc...leading to...>
17:09:51 - INFO  - 
org.apache.myfaces.webapp.StartupServletContextListener - ServletContext 
'C:\oas\product\10.1.3\OracleAS_1\j2ee\home\applications\appname\webmodulename\' 
initialized.
7:09:51 - DEBUG - javax.faces.webapp.FacesServlet - init begin
17:09:51 - DEBUG - javax.faces.webapp.FacesServlet - init end

...so far so good.

But, when a request is sent, it invariably produces:

java.lang.IllegalStateException: 
org.apache.myfaces.webapp.webxml.WebXml.init must be called before!
    at org.apache.myfaces.webapp.webxml.WebXml.getWebXml(WebXml.java:123)
    at 
org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl.getServletMapping(JspTilesViewHandlerImpl.java:254)
    at 
org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl.renderView(JspTilesViewHandlerImpl.java:120)
    at 
org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
    at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)

...even if I forcefully call:

StartupServletContextListener.initFaces(this.getServletConfig().getServletContext());

for every request.

Has anyone else seen this behaviour, or been able to successfully get a 
myfaces application to work properly under the full OAS? Just to 
reiterate, it works great under OC4J standalone.

Thanks for reading,
JF



Re: myfaces works under OC4J 10.1.3, but not under OAS 10.1.3??

Posted by Mike Kienenberger <mk...@gmail.com>.
See

http://wiki.apache.org/myfaces/Installation_and_Configuration

This entry is mine.

Oracle Application Server Containers for J2EE 10g (10.1.2.0.0)

There are other entries for other versions.


On 7/20/06, John Francis <jf...@infoterra.com> wrote:
> Hello Myfaces users....
>
>     I've been able to get myfaces versions from 1.1.1 thru 1.1.3 to work
> on a variety of appservers without too much trouble, but am stumped as
> to why it works under OC4J standalone, but not under OC4J when
> integrated with the rest of OAS.
>
> The app seems to startup fine, whether I use a
> org.apache.myfaces.webapp.StartupServletContextListener in web.xml or
> not. OAS appears to detect and run the listener defined in .tld files,
> producing:
>
> 17:09:48 - DEBUG -
> org.apache.myfaces.webapp.StartupServletContextListener - Initializing
> MyFaces
> 17:09:48 - INFO  - org.apache.myfaces.config.FacesConfigurator - Reading
> standard config org/apache/myfaces/resource/standard-faces-config.xml
> 17:09:49 - INFO  - org.apache.myfaces.config.FacesConfigurator - Reading
> config /WEB-INF/program-faces-config.xml
> 17:09:49 - INFO  - org.apache.myfaces.config.FacesConfigurator - Reading
> config /WEB-INF/forms-faces-config.xml
> <...reading more *faces-config.xml's, as def'd in web.xml...>
> 17:09:50 - DEBUG - org.apache.myfaces.application.jsp.JspViewHandlerImpl
> - New ViewHandler instance created
> 17:09:50 - DEBUG - org.apache.myfaces.application.NavigationHandlerImpl
> - New NavigationHandler instance created
> 17:09:50 - DEBUG -
> org.apache.myfaces.application.jsp.JspStateManagerImpl - New
> JspStateManagerImpl instance created
> 17:09:50 - DEBUG - org.apache.myfaces.application.ApplicationImpl - New
> Application instance created
> <...much happy output about renderers, components, etc...leading to...>
> 17:09:51 - INFO  -
> org.apache.myfaces.webapp.StartupServletContextListener - ServletContext
> 'C:\oas\product\10.1.3\OracleAS_1\j2ee\home\applications\appname\webmodulename\'
> initialized.
> 7:09:51 - DEBUG - javax.faces.webapp.FacesServlet - init begin
> 17:09:51 - DEBUG - javax.faces.webapp.FacesServlet - init end
>
> ...so far so good.
>
> But, when a request is sent, it invariably produces:
>
> java.lang.IllegalStateException:
> org.apache.myfaces.webapp.webxml.WebXml.init must be called before!
>     at org.apache.myfaces.webapp.webxml.WebXml.getWebXml(WebXml.java:123)
>     at
> org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl.getServletMapping(JspTilesViewHandlerImpl.java:254)
>     at
> org.apache.myfaces.application.jsp.JspTilesViewHandlerImpl.renderView(JspTilesViewHandlerImpl.java:120)
>     at
> org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
>     at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
>
> ...even if I forcefully call:
>
> StartupServletContextListener.initFaces(this.getServletConfig().getServletContext());
>
> for every request.
>
> Has anyone else seen this behaviour, or been able to successfully get a
> myfaces application to work properly under the full OAS? Just to
> reiterate, it works great under OC4J standalone.
>
> Thanks for reading,
> JF
>
>
>