webtier@glassfish.java.net

Re: [webtier] GFv3 Embedded Error - FacesContextFactory

From: Paulo Cesar Reis <casmeiron_at_gmail.com>
Date: Wed, 08 Apr 2009 14:32:23 -0300

Hi Ryan,

Yes, the included log is the entire generated log and no message like
Œinitializing Mojarraš is being printed.

So probably some configuration is missing for embedded mode like you said.
Maybe someone here can help me with that Œcause I couldnšt find how to do
that in any documents.

Thanks.


On 4/8/09 2:03 PM, "Ryan Lubke" <Ryan.Lubke_at_Sun.COM> wrote:

> On 4/8/09 7:24 AM, Paulo Cesar Reis wrote:
>
> Not sure if this is the entire log, so I'll ask you to confirm if you see the
> Mojarra
> initialization message for your web application:
>
> It will look something like: Initializing Mojarra .....
>
> If you don't see that message, then the ServletContextListener used to
> bootstrap JSF
> isn't being invoked which would imply something else needs to be configured
> for embedded mode.
>
>> GFv3 Embedded Error - FacesContextFactory Hi,
>>
>> My GFV3 embedded donšt start web-based applications that uses JSF2.
>> I am using maven-glassfish-plugin (version 1.0-alpha-4).
>>
>> When I deploy the same project on nightly-build GV3 everything works fine.
>>
>> My pom dependencies (the important part):
>>
>> <dependency> <groupId>org.glassfish.embedded</groupId>
>> <artifactId>gf-embedded-api</artifactId>
>> <version>1.0-alpha-4</version> <scope>test</scope>
>> </dependency> <dependency>
>> <groupId>org.glassfish.distributions</groupId>
>> <artifactId>web-all</artifactId>
>> <version>10.0-build-20080430</version> <scope>test</scope>
>> </dependency>
>>
>> The follow logs are generated when typed glassfish:run.
>>
>> Thanks.
>>
>> [INFO] [glassfish:run] Apr 8, 2009 11:18:18 AM
>> com.sun.enterprise.v3.server.AppServerStartup run INFO: HK2 initialized in
>> 599 ms Apr 8, 2009 11:18:18 AM com.sun.enterprise.v3.server.AppServerStartup
>> run INFO: com.sun.enterprise.naming.impl.ServicesHookup_at_141058b6 Init done in
>> 606 ms Apr 8, 2009 11:18:18 AM com.sun.enterprise.v3.server.AppServerStartup
>> run INFO: com.sun.enterprise.v3.server.Globals_at_5c90d92 Init done in 608 ms
>> Apr 8, 2009 11:18:18 AM com.sun.enterprise.v3.server.AppServerStartup run
>> INFO: com.sun.enterprise.v3.server.SystemTasks_at_5ba71e88 Init done in 613
>> msApr 8, 2009 11:18:18 AM com.sun.enterprise.v3.server.AppServerStartup run
>> INFO: com.sun.enterprise.v3.services.impl.HouseKeeper_at_6bb9db06 Init done in
>> 614 ms Apr 8, 2009 11:18:18 AM com.sun.enterprise.v3.server.AppServerStartup
>> run INFO: com.sun.enterprise.v3.services.impl.CmdLineParamProcessor_at_35cc96e8
>> Init done in 617 ms JMXMP connector server URL =
>> service:jmx:jmxmp://localhost:8888 Apr 8, 2009 11:18:18 AM
>> com.sun.enterprise.v3.services.impl.GrizzlyProxy start INFO: Listening on
>> port 8080 Apr 8, 2009 11:18:18 AM
>> com.sun.enterprise.v3.server.AppServerStartup run INFO:
>> com.sun.enterprise.v3.services.impl.GrizzlyService_at_7637831f startup done in
>> 1023 ms Apr 8, 2009 11:18:18 AM
>> com.sun.enterprise.v3.services.impl.ApplicationLoaderService postConstruct
>> INFO: loader service postConstruct started at 1239200298942 Apr 8, 2009
>> 11:18:18 AM com.sun.enterprise.v3.server.AppServerStartup run INFO:
>> Application Loader startup done in 1206 ms Apr 8, 2009 11:18:18 AM
>> com.sun.enterprise.v3.server.AppServerStartup run INFO: Glassfish v3 started
>> in 1206 ms Apr 8, 2009 11:18:25 AM
>> com.sun.enterprise.web.WebModuleContextConfig authenticatorConfig SEVERE:
>> webModuleContextConfig.missingRealm Apr 8, 2009 11:18:25 AM
>> org.apache.catalina.core.ApplicationContext log SEVERE:
>> WebModule[/jsf-2.0-scrap]StandardWrapper.Throwable
>> java.lang.IllegalStateException: Application was not properly initialized at
>> startup, could not find Factory: javax.faces.context.FacesContextFactory
>> at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:267) at
>> javax.faces.webapp.FacesServlet.init(FacesServlet.java:164) at
>> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:117
>> 9) at
>> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1009)
>> at
>> org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4
>> 800) at
>> org.apache.catalina.core.StandardContext.start(StandardContext.java:5188)
>> at com.sun.enterprise.web.WebModule.start(WebModule.java:339) at
>> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:97
>> 3) at
>> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:957) at
>> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:688) at
>> com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:3020)
>> at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2646)
>> at com.sun.enterprise.web.WebApplication.start(WebApplication.java:72) at
>> com.sun.enterprise.web.WebApplication.start(WebApplication.java:63) at
>> com.sun.enterprise.v3.server.ApplicationLifecycle.startModules(ApplicationLif
>> ecycle.java:609) at
>> com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle
>> .java:257) at org.glassfish.embed.GlassFish.deploy(GlassFish.java:422)
>> at org.glassfish.maven.RunMojo.execute(RunMojo.java:132) at
>> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager
>> .java:451) at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifec
>> ycleExecutor.java:558) at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(Def
>> aultLifecycleExecutor.java:512) at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecy
>> cleExecutor.java:482) at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailu
>> res(DefaultLifecycleExecutor.java:330) at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(Defau
>> ltLifecycleExecutor.java:291) at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleE
>> xecutor.java:142) at
>> org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336) at
>> org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129) at
>> org.apache.maven.cli.MavenCli.main(MavenCli.java:287) 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:585) at
>> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at
>> org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at
>> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at
>> org.codehaus.classworlds.Launcher.main(Launcher.java:375) Apr 8, 2009
>> 11:18:25 AM org.apache.catalina.core.ApplicationContext log SEVERE:
>> WebModule[/jsf-2.0-scrap]PWC1396: Servlet /jsf-2.0-scrap threw load()
>> exception java.lang.IllegalStateException: Application was not properly
>> initialized at startup, could not find Factory:
>> javax.faces.context.FacesContextFactory at
>> javax.faces.FactoryFinder.getFactory(FactoryFinder.java:267) at
>> javax.faces.webapp.FacesServlet.init(FacesServlet.java:164) at
>> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:117
>> 9) at
>> org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1009)
>> at
>> org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4
>> 800) at
>> org.apache.catalina.core.StandardContext.start(StandardContext.java:5188)
>> at com.sun.enterprise.web.WebModule.start(WebModule.java:339) at
>> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:97
>> 3) at
>> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:957) at
>> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:688) at
>> com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:3020)
>> at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2646)
>> at com.sun.enterprise.web.WebApplication.start(WebApplication.java:72) at
>> com.sun.enterprise.web.WebApplication.start(WebApplication.java:63) at
>> com.sun.enterprise.v3.server.ApplicationLifecycle.startModules(ApplicationLif
>> ecycle.java:609) at
>> com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle
>> .java:257) at org.glassfish.embed.GlassFish.deploy(GlassFish.java:422)
>> at org.glassfish.maven.RunMojo.execute(RunMojo.java:132) at
>> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager
>> .java:451) at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifec
>> ycleExecutor.java:558) at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(Def
>> aultLifecycleExecutor.java:512) at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecy
>> cleExecutor.java:482) at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailu
>> res(DefaultLifecycleExecutor.java:330) at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(Defau
>> ltLifecycleExecutor.java:291) at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleE
>> xecutor.java:142) at
>> org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336) at
>> org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129) at
>> org.apache.maven.cli.MavenCli.main(MavenCli.java:287) 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:585) at
>> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at
>> org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at
>> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at
>> org.codehaus.classworlds.Launcher.main(Launcher.java:375) Apr 8, 2009
>> 11:18:25 AM org.apache.catalina.core.ContainerBase addChildInternal SEVERE:
>> ContainerBase.addChild: start: LifecycleException:
>> java.lang.IllegalStateException: Application was not properly initialized at
>> startup, could not find Factory: javax.faces.context.FacesContextFactory
>> at
>> org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:4
>> 810) at
>> org.apache.catalina.core.StandardContext.start(StandardContext.java:5188)
>> at com.sun.enterprise.web.WebModule.start(WebModule.java:339) at
>> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:97
>> 3) at
>> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:957) at
>> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:688) at
>> com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:3020)
>> at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2646)
>> at com.sun.enterprise.web.WebApplication.start(WebApplication.java:72) at
>> com.sun.enterprise.web.WebApplication.start(WebApplication.java:63) at
>> com.sun.enterprise.v3.server.ApplicationLifecycle.startModules(ApplicationLif
>> ecycle.java:609) at
>> com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle
>> .java:257) at org.glassfish.embed.GlassFish.deploy(GlassFish.java:422)
>> at org.glassfish.maven.RunMojo.execute(RunMojo.java:132) at
>> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager
>> .java:451) at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifec
>> ycleExecutor.java:558) at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(Def
>> aultLifecycleExecutor.java:512) at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecy
>> cleExecutor.java:482) at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailu
>> res(DefaultLifecycleExecutor.java:330) at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(Defau
>> ltLifecycleExecutor.java:291) at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleE
>> xecutor.java:142) at
>> org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336) at
>> org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129) at
>> org.apache.maven.cli.MavenCli.main(MavenCli.java:287) 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:585) at
>> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at
>> org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at
>> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at
>> org.codehaus.classworlds.Launcher.main(Launcher.java:375) Apr 8, 2009
>> 11:18:25 AM com.sun.enterprise.web.WebContainer loadWebModule SEVERE:
>> webcontainer.webModuleDisabled java.lang.IllegalStateException:
>> ContainerBase.addChild: start: LifecycleException:
>> java.lang.IllegalStateException: Application was not properly initialized at
>> startup, could not find Factory: javax.faces.context.FacesContextFactory
>> at
>> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:97
>> 6) at
>> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:957) at
>> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:688) at
>> com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:3020)
>> at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2646)
>> at com.sun.enterprise.web.WebApplication.start(WebApplication.java:72) at
>> com.sun.enterprise.web.WebApplication.start(WebApplication.java:63) at
>> com.sun.enterprise.v3.server.ApplicationLifecycle.startModules(ApplicationLif
>> ecycle.java:609) at
>> com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle
>> .java:257) at org.glassfish.embed.GlassFish.deploy(GlassFish.java:422)
>> at org.glassfish.maven.RunMojo.execute(RunMojo.java:132) at
>> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager
>> .java:451) at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifec
>> ycleExecutor.java:558) at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(Def
>> aultLifecycleExecutor.java:512) at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecy
>> cleExecutor.java:482) at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailu
>> res(DefaultLifecycleExecutor.java:330) at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(Defau
>> ltLifecycleExecutor.java:291) at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleE
>> xecutor.java:142) at
>> org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336) at
>> org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129) at
>> org.apache.maven.cli.MavenCli.main(MavenCli.java:287) 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:585) at
>> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at
>> org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at
>> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at
>> org.codehaus.classworlds.Launcher.main(Launcher.java:375) Apr 8, 2009
>> 11:18:25 AM com.sun.enterprise.web.WebApplication start SEVERE: Error while
>> deploying java.lang.IllegalStateException: ContainerBase.addChild: start:
>> LifecycleException: java.lang.IllegalStateException: Application was not
>> properly initialized at startup, could not find Factory:
>> javax.faces.context.FacesContextFactory at
>> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:97
>> 6) at
>> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:957) at
>> org.apache.catalina.core.StandardHost.addChild(StandardHost.java:688) at
>> com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:3020)
>> at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2646)
>> at com.sun.enterprise.web.WebApplication.start(WebApplication.java:72) at
>> com.sun.enterprise.web.WebApplication.start(WebApplication.java:63) at
>> com.sun.enterprise.v3.server.ApplicationLifecycle.startModules(ApplicationLif
>> ecycle.java:609) at
>> com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle
>> .java:257) at org.glassfish.embed.GlassFish.deploy(GlassFish.java:422)
>> at org.glassfish.maven.RunMojo.execute(RunMojo.java:132) at
>> org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager
>> .java:451) at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifec
>> ycleExecutor.java:558) at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(Def
>> aultLifecycleExecutor.java:512) at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecy
>> cleExecutor.java:482) at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailu
>> res(DefaultLifecycleExecutor.java:330) at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(Defau
>> ltLifecycleExecutor.java:291) at
>> org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleE
>> xecutor.java:142) at
>> org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336) at
>> org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129) at
>> org.apache.maven.cli.MavenCli.main(MavenCli.java:287) 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:585) at
>> org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at
>> org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at
>> org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at
>> org.codehaus.classworlds.Launcher.main(Launcher.java:375) Hit ENTER for
>> redeploy
>
>