webtier@glassfish.java.net

GFv3 Embedded Error - FacesContextFactory

From: Paulo Cesar Reis <casmeiron_at_gmail.com>
Date: Wed, 08 Apr 2009 11:24:44 -0300

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 ms Apr 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:11
79) at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1009)
at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:
4800) 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:9
73) 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(ApplicationLi
fecycle.java:609) at
com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycl
e.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(DefaultPluginManage
r.java:451) at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLife
cycleExecutor.java:558) at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(De
faultLifecycleExecutor.java:512) at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifec
ycleExecutor.java:482) at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFail
ures(DefaultLifecycleExecutor.java:330) at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(Defa
ultLifecycleExecutor.java:291) at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycle
Executor.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:11
79) at
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1009)
at
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:
4800) 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:9
73) 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(ApplicationLi
fecycle.java:609) at
com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycl
e.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(DefaultPluginManage
r.java:451) at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLife
cycleExecutor.java:558) at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(De
faultLifecycleExecutor.java:512) at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifec
ycleExecutor.java:482) at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFail
ures(DefaultLifecycleExecutor.java:330) at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(Defa
ultLifecycleExecutor.java:291) at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycle
Executor.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:
4810) 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:9
73) 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(ApplicationLi
fecycle.java:609) at
com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycl
e.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(DefaultPluginManage
r.java:451) at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLife
cycleExecutor.java:558) at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(De
faultLifecycleExecutor.java:512) at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifec
ycleExecutor.java:482) at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFail
ures(DefaultLifecycleExecutor.java:330) at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(Defa
ultLifecycleExecutor.java:291) at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycle
Executor.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:9
76) 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(ApplicationLi
fecycle.java:609) at
com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycl
e.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(DefaultPluginManage
r.java:451) at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLife
cycleExecutor.java:558) at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(De
faultLifecycleExecutor.java:512) at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifec
ycleExecutor.java:482) at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFail
ures(DefaultLifecycleExecutor.java:330) at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(Defa
ultLifecycleExecutor.java:291) at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycle
Executor.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:9
76) 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(ApplicationLi
fecycle.java:609) at
com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycl
e.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(DefaultPluginManage
r.java:451) at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLife
cycleExecutor.java:558) at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(De
faultLifecycleExecutor.java:512) at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifec
ycleExecutor.java:482) at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFail
ures(DefaultLifecycleExecutor.java:330) at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(Defa
ultLifecycleExecutor.java:291) at
org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycle
Executor.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