This discussion is archived
2 Replies Latest reply: Jan 6, 2013 8:32 AM by 983092 RSS

netbeans - glassfish - class not found: PartialViewContextFactory

983092 Newbie
Currently Being Moderated
Hello,

Im new in java. I started to learn JSF. I installed (linux) netbeans IDE (7.2.1) + glassfish server (3.1.2). Then I created some "hello world" application example by myself, everything works fine.
But today when I try to deploy one of my applications, I gave this result:

--- application output begin ---
ant -f /home/peter/NetBeansProjects/HelloJSF -DforceRedeploy=false -Ddirectory.deployment.supported=true -Dnb.wait.for.caches=true run
init:
deps-module-jar:
deps-ear-jar:
deps-jar:
library-inclusion-in-archive:
library-inclusion-in-manifest:
compile:
compile-jsps:
In-place deployment at /home/peter/NetBeansProjects/HelloJSF/build/web
deploy?DEFAULT=/home/peter/NetBeansProjects/HelloJSF/build/web&name=HelloJSF&contextroot=/HelloJSF&force=true failed on GlassFish Server 3+
Error occurred during deployment: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.RuntimeException: java.lang.NoClassDefFoundError: javax/faces/context/PartialViewContextFactory. Please see server.log for more details.
/home/peter/NetBeansProjects/HelloJSF/nbproject/build-impl.xml:1022: The module has not been deployed.
See the server log for details.
BUILD FAILED (total time: 4 seconds)
--- application output end ---

The server output is:

--- server ouput begin ---
Launching GlassFish on Felix platform
INFO: Running GlassFish Version: GlassFish Server Open Source Edition 3.1.2.2 (build 5)
INFO: Registered org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for persistence-type = replicated in BackingStoreFactoryRegistry
INFO: Grizzly Framework 1.9.50 started in: 62ms - bound to [0.0.0.0:29226]
INFO: Grizzly Framework 1.9.50 started in: 31ms - bound to [0.0.0.0:29227]
INFO: Grizzly Framework 1.9.50 started in: 22ms - bound to [0.0.0.0:29194]
INFO: Grizzly Framework 1.9.50 started in: 13ms - bound to [0.0.0.0:29183]
INFO: Grizzly Framework 1.9.50 started in: 7ms - bound to [0.0.0.0:29222]
INFO: GlassFish Server Open Source Edition 3.1.2.2 (5) startup time : Felix (2 515ms), startup services(1 410ms), total(3 925ms)
INFO: HV000001: Hibernate Validator 4.3.0.Final
INFO: JMX005: JMXStartupService had Started JMXConnector on JMXService URL service:jmx:rmi://varpacer:29232/jndi/rmi://varpacer:29232/jmxrmi
INFO: Grizzly Framework 1.9.50 started in: 2ms - bound to [0.0.0.0:29226]
INFO: Grizzly Framework 1.9.50 started in: 1ms - bound to [0.0.0.0:29227]
INFO: SEC1002: Security Manager is OFF.
INFO: SEC1010: Entering Security Startup Service
INFO: SEC1143: Loading policy provider com.sun.enterprise.security.provider.PolicyWrapper.
INFO: SEC1115: Realm [admin-realm] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.
INFO: SEC1115: Realm [file] of classtype [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully created.
INFO: SEC1115: Realm [certificate] of classtype [com.sun.enterprise.security.auth.realm.certificate.CertificateRealm] successfully created.
INFO: SEC1011: Security Service(s) Started Successfully
INFO: WEB0169: Created HTTP listener [http-listener-1] on host/port [0.0.0.0:29226]
INFO: WEB0169: Created HTTP listener [http-listener-2] on host/port [0.0.0.0:29227]
INFO: WEB0169: Created HTTP listener [admin-listener] on host/port [0.0.0.0:29194]
INFO: WEB0171: Created virtual server [server]
INFO: WEB0171: Created virtual server [__asadmin]
INFO: WEB0172: Virtual server [server] loaded default web module []
INFO: Initializing Mojarra 2.1.6 (SNAPSHOT 20111206) for context '/HelloJSF'
SEVERE: Critical error during deployment:
java.lang.NoClassDefFoundError: javax/faces/context/PartialViewContextFactory
     at java.lang.ClassLoader.defineClass1(Native Method)
     at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
     at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
     at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
     at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
     at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
     at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
     at java.security.AccessController.doPrivileged(Native Method)
     at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:410)
     at com.sun.enterprise.v3.server.APIClassLoaderServiceImpl$APIClassLoader.loadClass(APIClassLoaderServiceImpl.java:206)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:410)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:410)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
     at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1456)
     at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1359)
     at java.lang.Class.forName0(Native Method)
     at java.lang.Class.forName(Class.java:264)
     at javax.faces.FactoryFinder.getImplGivenPreviousImpl(FactoryFinder.java:618)
     at javax.faces.FactoryFinder.getImplementationInstance(FactoryFinder.java:509)
     at javax.faces.FactoryFinder.access$400(FactoryFinder.java:139)
     at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:993)
     at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:343)
     at com.sun.faces.config.processor.FactoryConfigProcessor.verifyFactoriesExist(FactoryConfigProcessor.java:303)
     at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:219)
     at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:360)
     at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:225)
     at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:4750)
     at com.sun.enterprise.web.WebModule.contextListenerStart(WebModule.java:550)
     at org.apache.catalina.core.StandardContext.start(StandardContext.java:5366)
     at com.sun.enterprise.web.WebModule.start(WebModule.java:498)
     at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:917)
     at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:901)
     at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:733)
     at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2019)
     at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1669)
     at com.sun.enterprise.web.WebApplication.start(WebApplication.java:109)
     at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)
     at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)
     at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:301)
     at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)
     at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
     at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389)
     at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)
     at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)
     at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085)
     at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
     at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)
     at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)
     at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:461)
     at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:212)
     at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
     at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
     at com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354)
     at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
     at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)
     at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)
     at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)
     at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)
     at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
     at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
     at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
     at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
     at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
     at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
     at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
     at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
     at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
     at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.ClassNotFoundException: javax.faces.context.PartialViewContextFactory
     at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
     at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
     at java.security.AccessController.doPrivileged(Native Method)
     at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
     ... 70 more

SEVERE: PWC1306: Startup of context /HelloJSF failed due to previous errors
SEVERE: PWC1305: Exception during cleanup after start failed
org.apache.catalina.LifecycleException: PWC2769: Manager has not yet been started
     at org.apache.catalina.session.StandardManager.stop(StandardManager.java:873)
     at org.apache.catalina.core.StandardContext.stop(StandardContext.java:5571)
     at com.sun.enterprise.web.WebModule.stop(WebModule.java:527)
     at org.apache.catalina.core.StandardContext.start(StandardContext.java:5384)
     at com.sun.enterprise.web.WebModule.start(WebModule.java:498)
     at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:917)
     at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:901)
     at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:733)
     at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2019)
     at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1669)
     at com.sun.enterprise.web.WebApplication.start(WebApplication.java:109)
     at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)
     at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)
     at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:301)
     at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)
     at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
     at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389)
     at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)
     at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)
     at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085)
     at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
     at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)
     at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)
     at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:461)
     at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:212)
     at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
     at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
     at com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354)
     at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
     at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)
     at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)
     at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)
     at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)
     at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
     at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
     at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
     at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
     at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
     at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
     at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
     at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
     at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
     at java.lang.Thread.run(Thread.java:722)

SEVERE: ContainerBase.addChild: start:
org.apache.catalina.LifecycleException: java.lang.RuntimeException: java.lang.NoClassDefFoundError: javax/faces/context/PartialViewContextFactory
     at org.apache.catalina.core.StandardContext.start(StandardContext.java:5389)
     at com.sun.enterprise.web.WebModule.start(WebModule.java:498)
     at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:917)
     at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:901)
     at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:733)
     at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2019)
     at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1669)
     at com.sun.enterprise.web.WebApplication.start(WebApplication.java:109)
     at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)
     at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)
     at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:301)
     at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)
     at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
     at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389)
     at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)
     at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)
     at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085)
     at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
     at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)
     at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)
     at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:461)
     at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:212)
     at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
     at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
     at com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354)
     at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
     at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)
     at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)
     at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)
     at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)
     at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
     at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
     at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
     at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
     at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
     at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
     at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
     at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
     at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
     at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.RuntimeException: java.lang.NoClassDefFoundError: javax/faces/context/PartialViewContextFactory
     at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:292)
     at org.apache.catalina.core.StandardContext.contextListenerStart(StandardContext.java:4750)
     at com.sun.enterprise.web.WebModule.contextListenerStart(WebModule.java:550)
     at org.apache.catalina.core.StandardContext.start(StandardContext.java:5366)
     ... 39 more
Caused by: java.lang.NoClassDefFoundError: javax/faces/context/PartialViewContextFactory
     at java.lang.ClassLoader.defineClass1(Native Method)
     at java.lang.ClassLoader.defineClass(ClassLoader.java:791)
     at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
     at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
     at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
     at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
     at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
     at java.security.AccessController.doPrivileged(Native Method)
     at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:410)
     at com.sun.enterprise.v3.server.APIClassLoaderServiceImpl$APIClassLoader.loadClass(APIClassLoaderServiceImpl.java:206)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:410)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:410)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
     at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1456)
     at org.glassfish.web.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1359)
     at java.lang.Class.forName0(Native Method)
     at java.lang.Class.forName(Class.java:264)
     at javax.faces.FactoryFinder.getImplGivenPreviousImpl(FactoryFinder.java:618)
     at javax.faces.FactoryFinder.getImplementationInstance(FactoryFinder.java:509)
     at javax.faces.FactoryFinder.access$400(FactoryFinder.java:139)
     at javax.faces.FactoryFinder$FactoryManager.getFactory(FactoryFinder.java:993)
     at javax.faces.FactoryFinder.getFactory(FactoryFinder.java:343)
     at com.sun.faces.config.processor.FactoryConfigProcessor.verifyFactoriesExist(FactoryConfigProcessor.java:303)
     at com.sun.faces.config.processor.FactoryConfigProcessor.process(FactoryConfigProcessor.java:219)
     at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:360)
     at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:225)
     ... 42 more
Caused by: java.lang.ClassNotFoundException: javax.faces.context.PartialViewContextFactory
     at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
     at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
     at java.security.AccessController.doPrivileged(Native Method)
     at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
     ... 70 more

WARNING: java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.RuntimeException: java.lang.NoClassDefFoundError: javax/faces/context/PartialViewContextFactory
java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.RuntimeException: java.lang.NoClassDefFoundError: javax/faces/context/PartialViewContextFactory
     at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:921)
     at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:901)
     at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:733)
     at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:2019)
     at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1669)
     at com.sun.enterprise.web.WebApplication.start(WebApplication.java:109)
     at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)
     at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)
     at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:301)
     at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)
     at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
     at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389)
     at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)
     at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)
     at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085)
     at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
     at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)
     at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)
     at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:461)
     at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:212)
     at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
     at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
     at com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354)
     at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
     at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)
     at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)
     at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)
     at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)
     at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
     at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
     at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
     at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
     at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
     at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
     at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
     at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
     at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
     at java.lang.Thread.run(Thread.java:722)

SEVERE: Exception while invoking class com.sun.enterprise.web.WebApplication start method
java.lang.Exception: java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.RuntimeException: java.lang.NoClassDefFoundError: javax/faces/context/PartialViewContextFactory
     at com.sun.enterprise.web.WebApplication.start(WebApplication.java:138)
     at org.glassfish.internal.data.EngineRef.start(EngineRef.java:130)
     at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:269)
     at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:301)
     at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:461)
     at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:240)
     at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:389)
     at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:348)
     at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:363)
     at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1085)
     at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1200(CommandRunnerImpl.java:95)
     at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1291)
     at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1259)
     at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:461)
     at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:212)
     at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:179)
     at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:117)
     at com.sun.enterprise.v3.services.impl.ContainerMapper$Hk2DispatcherCallable.call(ContainerMapper.java:354)
     at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
     at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:860)
     at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:757)
     at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1056)
     at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:229)
     at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
     at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
     at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
     at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
     at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
     at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
     at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
     at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
     at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
     at java.lang.Thread.run(Thread.java:722)

SEVERE: Exception while loading the app
SEVERE: Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: java.lang.RuntimeException: java.lang.NoClassDefFoundError: javax/faces/context/PartialViewContextFactory

--- server output end ---

When I try to run an empty, new application, I give same error.
What did I do wrong? Or I missed something?

(I tried google for the solution but I didn't find useful things. :( )
(I tried to reinstall glassfish and netbeans too. First deploy worked, but then it went wrong, this error came again.... :( )
  • 1. Re: netbeans - glassfish - class not found: PartialViewContextFactory
    gimbal2 Guru
    Currently Being Moderated
    Sorry to hear that you are having problems with your IDE. But what do you expect people to help you with? Try the Netbeans mailing lists for assistance.

    You should realize that your first priority should be to learn how to properly package and deploy web applications WITHOUT the help of an IDE. When you know how to do that, you can diagnose what the IDE is doing wrong and based on that information figure out how to alter the project settings so the problem goes away. The only way to get anywhere in this business is to have in-depth knowledge of the technology you're using; tools are only there to help you, not do the work for you. As you are now finding out the hard way.

    You may also consider switching to Eclipse because in my experience there are more online resources available to help you. Like this one:

    http://balusc.blogspot.com/2011/01/jsf-20-tutorial-with-eclipse-and.html
  • 2. Re: netbeans - glassfish - class not found: PartialViewContextFactory
    983092 Newbie
    Currently Being Moderated
    Ok, you're right.
    (manually deploy ... while I find the answer.)

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points