Thanks Simon,

You were right, I was using JSF1.1 instructions...

Guy.

-----Original Message-----
From: simon [mailto:[EMAIL PROTECTED] 
Sent: Sunday, June 22, 2008 1:03 AM
To: MyFaces Discussion
Subject: Re: [Myaces][Seam][Facelets]

Hi,

This stacktrace looks like a failure on webapp startup to me. It looks
like a filter object is being initialised (not applied to a request) and
is failing.

There will be no FacesContext in this situation of course, but there
*should* be an Application instance around.

In modern servlet engines, JSP TLDs can register context listeners which
are loaded and initialised before any filters are. And myfaces uses this
to ensure it is all set up (including creation of an Application
instance). In fact, that's the cause of those INFO messages you see; you
appear to have followed the old JSF1.1 instructions which say to put a
<context-listener> entry in your web.xml but that's now obsolete as it
is done automatically via the .tld file that is inside the myfaces
jarfiles. Myfaces is detecting that initialisation is happening twice
(once via the tld, and once directly from your web.xml) and complaining.
But it should be harmless.

But if initialisation *is* occurring (as it appears to be from the
messages) then why the Application object is not available when the seam
filter initialises is a mystery.

Regards,
Simon

On Sat, 2008-06-21 at 15:51 -0600, Andrew Robinson wrote:
> I am not sure about the duplicate registration, but you may be using
> something in your faces-config that is auto registered.
> 
> As for the Seam exception, are you trying to use any conversation
> scoped items in the restore view phase? I know that Seam doesn't allow
> that since the conversations are not setup until after that phase.
> 
> Andrew
> 
> Sent from my iPod
> 
> On 2008-06-21, Guy Bashan <[EMAIL PROTECTED]> wrote:
> > Hi all,
> >
> >
> >
> > I am trying to create a web application using MyFaces, Seam and
Facelets.
> >
> > I copied one of Seam examples, added all needed configurations filters
and
> > viewhandlers.
> >
> >
> >
> > When I am running the server I am getting this exception:
> >
> > ava.lang.IllegalStateException: Attempted to invoke a Seam component
outside
> > the an initialized application
> >
> >                 at
> > org.jboss.seam.contexts.Lifecycle.getApplication(Lifecycle.java:36)
> >
> >                 at
> > org.jboss.seam.contexts.Lifecycle.mockApplication(Lifecycle.java:111)
> >
> >                 at
> > org.jboss.seam.servlet.SeamFilter.init(SeamFilter.java:90)
> >
> >                 at
> >
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilter
> > Config.java:275)
> >
> >                 at
> >
org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFil
> > terConfig.java:397)
> >
> >                 at
> >
org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterCon
> > fig.java:108)
> >
> >                 at
> >
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:37
> > 09)
> >
> >                 at
> >
org.apache.catalina.core.StandardContext.start(StandardContext.java:4356)
> >
> >                 at
> >
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:7
> > 91)
> >
> >                 at
> > org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
> >
> >                 at
> > org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
> >
> >                 at
> >
org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:626)
> >
> >                 at
> >
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553
> > )
> >
> >                 at
> > org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
> >
> >                 at
> > org.apache.catalina.startup.HostConfig.start(HostConfig.java:1147)
> >
> >                 at
> >
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
> >
> >                 at
> >
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
> > t.java:117)
> >
> >                 at
> > org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
> >
> >                 at
> > org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
> >
> >                 at
> > org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
> >
> >                 at
> > org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
> >
> >                 at
> > org.apache.catalina.core.StandardService.start(StandardService.java:516)
> >
> >                 at
> > org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
> >
> >                 at
> > org.apache.catalina.startup.Catalina.start(Catalina.java:578)
> >
> >                 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
> > Method)
> >
> >                 at
> >
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
> > )
> >
> >                 at
> >
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
> > .java:25)
> >
> >                 at java.lang.reflect.Method.invoke(Method.java:597)
> >
> >                 at
> > org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
> >
> >                 at
> > org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
> >
> >
> >
> > Does anyone know what is the reason for this exception?
> >
> >
> >
> > I am getting these warnings when tomcat comes up:
> >
> > 21/06/2008 23:29:23 org.apache.catalina.core.StandardContext
> > addApplicationListener
> >
> > INFO: The listener
"org.apache.myfaces.webapp.StartupServletContextListener"
> > is already configured for this context. The duplicate definition has
been
> > ignored.
> >
> > 21/06/2008 23:29:23 org.apache.catalina.core.StandardContext
> > addApplicationListener
> >
> > INFO: The listener
"org.apache.myfaces.webapp.StartupServletContextListener"
> > is already configured for this context. The duplicate definition has
been
> > ignored.
> >
> >
> >
> > Is it somehow related?
> >
> >
> >
> > Thanks,
> >
> > Guy.
> >
> >

Reply via email to