This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 193890

Summary: ScrumToys sample app cannot create new sprints.
Product: javaee Reporter: zezoman
Component: SamplesAssignee: Martin Janicek <mjanicek>
Status: REOPENED ---    
Severity: normal CC: kganfield, pjiricka
Priority: P3    
Version: 6.x   
Hardware: PC   
OS: Windows 7 x64   
Issue Type: DEFECT Exception Reporter:

Description zezoman 2010-12-28 18:51:45 UTC
I'm using glassfish 3.0.1 (the one that cpmes with Netbeans 6.9.1 on the official site) and configured MySql connecetion pool:
Name - ScrumToysPool 
Resource Type -	javax.sql.XADataSource	
Classname - com.mysql.jdbc.jdbc2.optional.MysqlXADataSource

and JDBC Resource:
JNDI Name - jdbc/scrumtoys
Enabled - true
Connection Pool - ScrumToysPool

Then I opened the ScrumToys sample app and only changed the persistence.xml to use jdbc/scrumtoys for the datasource and set the Table Generation Strategy to Drop and Create.

I build and deploy the app, then launch it. I can see all DB tables created successfully in the scrumtoys schema. I create new project - this works fine, the DB table is updated. Then I want to create a sprint for this project. This fails, the error message displayed on the page is "Error on try to save Sprint". I server logs I see the following exception:

[#|2010-12-28T20:24:40.334+0200|SEVERE|glassfish3.0.1|jsf2.demo.scrum.web.controller.SprintManager|_ThreadID=36;_ThreadName=Thread-1;|The log message is null.
jsf2.demo.scrum.web.controller.ManagerException: javax.transaction.NotSupportedException: Nested transaction not supported.
	at jsf2.demo.scrum.web.controller.AbstractManager.doInTransaction(AbstractManager.java:82)
	at jsf2.demo.scrum.web.controller.SprintManager.checkUniqueSprintNameApplicationValidatorMethod(SprintManager.java:210)
	at jsf2.demo.scrum.model.entities.SprintNameUniquenessConstraintValidator.isValid(SprintNameUniquenessConstraintValidator.java:56)
	at jsf2.demo.scrum.model.entities.SprintNameUniquenessConstraintValidator.isValid(SprintNameUniquenessConstraintValidator.java:47)
	at org.hibernate.validator.engine.ConstraintTree.validateSingleConstraint(ConstraintTree.java:141)
	at org.hibernate.validator.engine.ConstraintTree.validateConstraints(ConstraintTree.java:118)
	at org.hibernate.validator.metadata.MetaConstraint.validateConstraint(MetaConstraint.java:121)
	at org.hibernate.validator.engine.ValidatorImpl.validateConstraint(ValidatorImpl.java:334)
	at org.hibernate.validator.engine.ValidatorImpl.validateConstraintsForRedefinedDefaultGroup(ValidatorImpl.java:278)
	at org.hibernate.validator.engine.ValidatorImpl.validateConstraintsForCurrentGroup(ValidatorImpl.java:260)
	at org.hibernate.validator.engine.ValidatorImpl.validateInContext(ValidatorImpl.java:213)
	at org.hibernate.validator.engine.ValidatorImpl.validate(ValidatorImpl.java:119)
	at org.eclipse.persistence.internal.jpa.metadata.listeners.BeanValidationListener.validateOnCallbackEvent(BeanValidationListener.java:84)
	at org.eclipse.persistence.internal.jpa.metadata.listeners.BeanValidationListener.prePersist(BeanValidationListener.java:62)
	at org.eclipse.persistence.descriptors.DescriptorEventManager.notifyListener(DescriptorEventManager.java:670)
	at org.eclipse.persistence.descriptors.DescriptorEventManager.notifyEJB30Listeners(DescriptorEventManager.java:613)
	at org.eclipse.persistence.descriptors.DescriptorEventManager.executeEvent(DescriptorEventManager.java:200)
	at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.registerNewObjectClone(UnitOfWorkImpl.java:4231)
	at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.registerNotRegisteredNewObjectForPersist(UnitOfWorkImpl.java:4208)
	at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.registerNotRegisteredNewObjectForPersist(RepeatableWriteUnitOfWork.java:424)
	at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.registerNewObjectForPersist(UnitOfWorkImpl.java:4148)
	at org.eclipse.persistence.internal.jpa.EntityManagerImpl.persist(EntityManagerImpl.java:368)
	at jsf2.demo.scrum.web.controller.SprintManager$1.execute(SprintManager.java:123)
	at jsf2.demo.scrum.web.controller.SprintManager$1.execute(SprintManager.java:119)
	at jsf2.demo.scrum.web.controller.AbstractManager.doInTransaction(AbstractManager.java:73)
	at jsf2.demo.scrum.web.controller.SprintManager.save(SprintManager.java:119)
	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 com.sun.el.parser.AstValue.invoke(AstValue.java:234)
	at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:297)
	at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:98)
	at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
	at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
	at javax.faces.component.UICommand.broadcast(UICommand.java:315)
	at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:775)
	at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1267)
	at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
	at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)
	at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)
	at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
	at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185)
	at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:226)
	at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165)
	at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
	at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
	at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
	at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
	at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
	at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
	at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
	at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
	at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
	at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
	at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
	at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
	at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
	at java.lang.Thread.run(Thread.java:662)
Caused by: javax.transaction.NotSupportedException: Nested transaction not supported.
	at com.sun.enterprise.transaction.JavaEETransactionManagerSimplified.begin(JavaEETransactionManagerSimplified.java:785)
	at com.sun.enterprise.transaction.JavaEETransactionManagerSimplified.begin(JavaEETransactionManagerSimplified.java:773)
	at com.sun.enterprise.transaction.UserTransactionImpl.begin(UserTransactionImpl.java:158)
	at jsf2.demo.scrum.web.controller.AbstractManager.doInTransaction(AbstractManager.java:71)
	... 65 more
|#]

[#|2010-12-28T20:24:40.335+0200|SEVERE|glassfish3.0.1|jsf2.demo.scrum.web.controller.AbstractManager|_ThreadID=36;_ThreadName=Thread-1;|The log message is null.
java.lang.IllegalStateException
	at com.sun.jts.jta.TransactionManagerImpl.rollback(TransactionManagerImpl.java:355)
	at com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate.rollbackDistributedTransaction(JavaEETransactionManagerJTSDelegate.java:208)
	at com.sun.enterprise.transaction.JavaEETransactionManagerSimplified.rollback(JavaEETransactionManagerSimplified.java:881)
	at com.sun.enterprise.transaction.UserTransactionImpl.rollback(UserTransactionImpl.java:227)
	at jsf2.demo.scrum.web.controller.AbstractManager.doInTransaction(AbstractManager.java:78)
	at jsf2.demo.scrum.web.controller.SprintManager.save(SprintManager.java:119)
	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 com.sun.el.parser.AstValue.invoke(AstValue.java:234)
	at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:297)
	at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:98)
	at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
	at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
	at javax.faces.component.UICommand.broadcast(UICommand.java:315)
	at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:775)
	at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1267)
	at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
	at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)
	at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)
	at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
	at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185)
	at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:226)
	at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165)
	at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
	at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
	at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
	at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
	at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
	at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
	at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
	at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
	at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
	at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
	at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
	at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
	at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
	at java.lang.Thread.run(Thread.java:662)
|#]

[#|2010-12-28T20:24:40.336+0200|SEVERE|glassfish3.0.1|jsf2.demo.scrum.web.controller.SprintManager|_ThreadID=36;_ThreadName=Thread-1;|Error on try to save Sprint: Sprint[name=Sprint 1 - fix issue 1234,startDate=Tue Dec 28 02:00:00 EET 2010,project=Project[name=Zezo Web Project,startDate=Tue Dec 28 02:00:00 EET 2010,endDate=Mon Feb 14 02:00:00 EET 2011]]
jsf2.demo.scrum.web.controller.ManagerException: java.lang.IllegalStateException
	at jsf2.demo.scrum.web.controller.AbstractManager.doInTransaction(AbstractManager.java:82)
	at jsf2.demo.scrum.web.controller.SprintManager.save(SprintManager.java:119)
	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 com.sun.el.parser.AstValue.invoke(AstValue.java:234)
	at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:297)
	at com.sun.faces.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:98)
	at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:88)
	at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:102)
	at javax.faces.component.UICommand.broadcast(UICommand.java:315)
	at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:775)
	at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1267)
	at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:82)
	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
	at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:312)
	at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1523)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:279)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:641)
	at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:97)
	at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:85)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:185)
	at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:325)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:226)
	at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:165)
	at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
	at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
	at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
	at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
	at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
	at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
	at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
	at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
	at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
	at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
	at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
	at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
	at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
	at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.IllegalStateException
	at com.sun.jts.jta.TransactionManagerImpl.commit(TransactionManagerImpl.java:322)
	at com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate.commitDistributedTransaction(JavaEETransactionManagerJTSDelegate.java:171)
	at com.sun.enterprise.transaction.JavaEETransactionManagerSimplified.commit(JavaEETransactionManagerSimplified.java:843)
	at com.sun.enterprise.transaction.UserTransactionImpl.commit(UserTransactionImpl.java:201)
	at jsf2.demo.scrum.web.controller.AbstractManager.doInTransaction(AbstractManager.java:74)
	... 41 more
|#]



Did a lot of searching for this kind of issue - nothing useful. By the way after I deployed the app I also saw this exception but I don't think it is relevant:



[#|2010-12-28T19:32:20.283+0200|WARNING|glassfish3.0.1|javax.enterprise.system.container.web.com.sun.enterprise.web|_ThreadID=32;_ThreadName=http-thread-pool-4848-(2);|WEB0517: Unable to restore sessions for web module [/scrumtoys] from previous deployment
java.lang.ClassCastException: cannot assign instance of java.lang.String to field jsf2.demo.scrum.web.scope.TaskScope.application of type javax.faces.application.Application in instance of jsf2.demo.scrum.web.scope.TaskScope
	at java.io.ObjectStreamClass$FieldReflector.setObjFieldValues(ObjectStreamClass.java:2039)
	at java.io.ObjectStreamClass.setObjFieldValues(ObjectStreamClass.java:1212)
	at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1952)
	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1870)
	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
	at org.apache.catalina.session.StandardSession.readRemainingObject(StandardSession.java:1818)
	at org.apache.catalina.session.StandardSession.readObject(StandardSession.java:1750)
	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 java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:974)
	at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1848)
	at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1752)
	at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1328)
	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:350)
	at org.apache.catalina.session.StandardSession.deserialize(StandardSession.java:1063)
	at org.apache.catalina.session.StandardManager.readSessions(StandardManager.java:511)
	at com.sun.enterprise.web.WebModule.loadSessions(WebModule.java:1557)
	at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1949)
	at com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1619)
	at com.sun.enterprise.web.WebApplication.start(WebApplication.java:90)
	at org.glassfish.internal.data.EngineRef.start(EngineRef.java:126)
	at org.glassfish.internal.data.ModuleInfo.start(ModuleInfo.java:241)
	at org.glassfish.internal.data.ApplicationInfo.start(ApplicationInfo.java:236)
	at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:339)
	at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:183)
	at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:272)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:310)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1121)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1224)
	at org.glassfish.deployment.admin.ReDeployCommand.execute(ReDeployCommand.java:96)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$1.execute(CommandRunnerImpl.java:305)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:320)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1176)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$900(CommandRunnerImpl.java:83)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1235)
	at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1224)
	at com.sun.enterprise.v3.admin.AdminAdapter.doCommand(AdminAdapter.java:365)
	at com.sun.enterprise.v3.admin.AdminAdapter.service(AdminAdapter.java:204)
	at com.sun.grizzly.tcp.http11.GrizzlyAdapter.service(GrizzlyAdapter.java:166)
	at com.sun.enterprise.v3.server.HK2Dispatcher.dispath(HK2Dispatcher.java:100)
	at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:245)
	at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:791)
	at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:693)
	at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:954)
	at com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:170)
	at com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:135)
	at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:102)
	at com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:88)
	at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:76)
	at com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:53)
	at com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:57)
	at com.sun.grizzly.ContextTask.run(ContextTask.java:69)
	at com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:330)
	at com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:309)
	at java.lang.Thread.run(Thread.java:662)
|#]

Thanks in advance!
Comment 1 Kenneth Ganfield 2011-03-07 16:32:14 UTC
I do not think this is related to documentation so I am reassigning to javaee. It could be related to persistence, or to db schema. But it is hard to know without more investigation.

I am also downgrading this to P3 because it does not meet P2 criteria.
Comment 2 Sergey Petrov 2011-03-23 14:55:35 UTC
It can be persistence issue only if example is created with nb persistence functionality, I'm not sure why persistence.xml in the sample have resource_local transaction, aslo it seems to be in not default location, but attempt to change it do not help me,  anyway samples subcategory seems to be more appropriate.
Comment 3 Martin Janicek 2011-11-07 08:32:08 UTC
I've just tried to follow your steps, but everything goes well in current version, so the issue was probably resolved during development cycle.
If you'll be able to reproduce it again, feel free to reopen the issue.
Comment 4 mpietro 2017-04-06 16:24:00 UTC
Trying to use on NetBeans 8.2 (GlassFish Server Open Source Edition 4.1.1) it seem there are a missing DB setup
Not able to find any hint around.
Hitting change project I got an 500 error: logs:
 StandardWrapperValve[Faces Servlet]: Servlet.service() for servlet Faces Servlet threw exception
javax.faces.application.ViewExpiredException: viewId:/project/show.jsf - View /project/show.jsf could not be restored.
	at com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:212)
	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
	at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:123)
	at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:198)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:658)
	at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:318)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
	at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
	at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
	at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:416)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:283)
	at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
	at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
	at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:206)
	at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180)
	at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
	at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:283)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)
	at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
	at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:536)
	at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591)
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)
	at java.lang.Thread.run(Thread.java:745)

Grave:   Error Rendering View[/sprint/show.xhtml]
javax.el.ELException: /sprint/show.xhtml @66,87 rendered="#{sprintManager.sprints.rowCount eq 0}": java.lang.NullPointerException
	at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:114)
	at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194)
	at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:458)
	at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:117)
	at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:890)
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1856)
	at javax.faces.render.Renderer.encodeChildren(Renderer.java:176)
	at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:890)
	at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:304)
	at com.sun.faces.renderkit.html_basic.GridRenderer.renderRow(GridRenderer.java:185)
	at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:129)
	at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:890)
	at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:304)
	at com.sun.faces.renderkit.html_basic.GridRenderer.renderRow(GridRenderer.java:185)
	at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:129)
	at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:890)
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1856)
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
	at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:458)
	at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:134)
	at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
	at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:659)
	at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:318)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
	at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
	at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
	at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:416)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:283)
	at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
	at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
	at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:206)
	at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180)
	at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
	at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:283)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)
	at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
	at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:536)
	at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591)
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)
	at java.lang.Thread.run(Thread.java:745)
Caused by: javax.el.ELException: java.lang.NullPointerException
	at javax.el.BeanELResolver.getValue(BeanELResolver.java:368)
	at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
	at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
	at com.sun.el.parser.AstValue.getValue(AstValue.java:140)
	at com.sun.el.parser.AstValue.getValue(AstValue.java:204)
	at com.sun.el.parser.AstEqual.getValue(AstEqual.java:58)
	at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:226)
	at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109)
	... 52 more
Caused by: java.lang.NullPointerException
	at jsf2.demo.scrum.web.controller.SprintManager.getSprints(SprintManager.java:255)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at javax.el.BeanELResolver.getValue(BeanELResolver.java:363)
	... 59 more

Avvertenza:   StandardWrapperValve[Faces Servlet]: Servlet.service() for servlet Faces Servlet threw exception
java.lang.NullPointerException
	at jsf2.demo.scrum.web.controller.SprintManager.getSprints(SprintManager.java:255)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at javax.el.BeanELResolver.getValue(BeanELResolver.java:363)
	at com.sun.faces.el.DemuxCompositeELResolver._getValue(DemuxCompositeELResolver.java:176)
	at com.sun.faces.el.DemuxCompositeELResolver.getValue(DemuxCompositeELResolver.java:203)
	at com.sun.el.parser.AstValue.getValue(AstValue.java:140)
	at com.sun.el.parser.AstValue.getValue(AstValue.java:204)
	at com.sun.el.parser.AstEqual.getValue(AstEqual.java:58)
	at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:226)
	at com.sun.faces.facelets.el.TagValueExpression.getValue(TagValueExpression.java:109)
	at javax.faces.component.ComponentStateHelper.eval(ComponentStateHelper.java:194)
	at javax.faces.component.UIComponentBase.isRendered(UIComponentBase.java:458)
	at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:117)
	at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:890)
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1856)
	at javax.faces.render.Renderer.encodeChildren(Renderer.java:176)
	at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:890)
	at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:304)
	at com.sun.faces.renderkit.html_basic.GridRenderer.renderRow(GridRenderer.java:185)
	at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:129)
	at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:890)
	at com.sun.faces.renderkit.html_basic.HtmlBasicRenderer.encodeRecursive(HtmlBasicRenderer.java:304)
	at com.sun.faces.renderkit.html_basic.GridRenderer.renderRow(GridRenderer.java:185)
	at com.sun.faces.renderkit.html_basic.GridRenderer.encodeChildren(GridRenderer.java:129)
	at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:890)
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1856)
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1859)
	at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:458)
	at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:134)
	at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
	at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
	at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)
	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:659)
	at org.apache.catalina.core.StandardWrapper.service(StandardWrapper.java:1682)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:318)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:160)
	at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:734)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:673)
	at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:99)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:174)
	at org.apache.catalina.connector.CoyoteAdapter.doService(CoyoteAdapter.java:416)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:283)
	at com.sun.enterprise.v3.services.impl.ContainerMapper$HttpHandlerCallable.call(ContainerMapper.java:459)
	at com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:167)
	at org.glassfish.grizzly.http.server.HttpHandler.runService(HttpHandler.java:206)
	at org.glassfish.grizzly.http.server.HttpHandler.doHandle(HttpHandler.java:180)
	at org.glassfish.grizzly.http.server.HttpServerFilter.handleRead(HttpServerFilter.java:235)
	at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:283)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:200)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:132)
	at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:111)
	at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
	at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:536)
	at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
	at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:591)
	at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:571)
	at java.lang.Thread.run(Thread.java:745)