I'm having an issue with inserting values into a table, I have been following the
booking example. I'm thinking that the values are not being picked up in the form?
My stacktrace is as follows
12:28:49,718 INFO [STDOUT] Hibernate: select user0_.username as username145_,
user0_.name as name145_, user0_.password as password145_ from Calendar user0_ where
user0_.username=? and user0_.password=?
| 12:28:59,406 INFO [STDOUT] Hibernate: insert into Entry (id, user_username,
startdate, desc) values (null, ?, ?, ?)
| 12:28:59,421 WARN [JDBCExceptionReporter] SQL Error: -10, SQLState: 23000
| 12:28:59,421 ERROR [JDBCExceptionReporter] Attempt to insert null into a non-nullable
column: column: USER_USERNAME table: ENTRY in statement [insert into Entry (id,
user_username, startdate, desc) values (null, ?, ?, ?)]
| 12:28:59,421 ERROR [Exceptions] redirecting to debug page
| javax.ejb.EJBException: javax.persistence.EntityExistsException:
org.hibernate.exception.ConstraintViolationException: could not insert:
[com.mydomain.Calendar.Entry]
| at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:69)
| at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83)
| at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:197)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at
org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:76)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at
org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:83)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at
org.jboss.aspects.security.AuthenticationInterceptor.invoke(AuthenticationInterceptor.java:77)
| at
org.jboss.ejb3.security.Ejb3AuthenticationInterceptor.invoke(Ejb3AuthenticationInterceptor.java:131)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at
org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:47)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at
org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(AsynchronousInterceptor.java:106)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.ejb3.stateful.StatefulContainer.localInvoke(StatefulContainer.java:203)
| at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:98)
| at $Proxy517.confirm(Unknown Source)
| at
com.mydomain.Calendar.EntryConfirm$$FastClassByCGLIB$$168b4aad.invoke(<generated>)
| at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
| at
org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:45)
| at
org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:74)
| at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
| at
com.mydomain.Calendar.LoggedInInterceptor.checkLoggedIn(LoggedInInterceptor.java:25)
| 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.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at
org.jboss.seam.interceptors.RemoveInterceptor.removeIfNecessary(RemoveInterceptor.java:40)
| 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.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at
org.jboss.seam.interceptors.ExceptionInterceptor.handleExceptions(ExceptionInterceptor.java:39)
| 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.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at
org.jboss.seam.intercept.RootInterceptor.createSeamInvocationContext(RootInterceptor.java:144)
| at
org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:129)
| at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:102)
| at
org.jboss.seam.intercept.ClientSideInterceptor.interceptInvocation(ClientSideInterceptor.java:83)
| at
org.jboss.seam.intercept.ClientSideInterceptor.intercept(ClientSideInterceptor.java:52)
| at
com.mydomain.Calendar.EntryConfirm$$EnhancerByCGLIB$$958b5c02.confirm(<generated>)
| 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 com.sun.el.parser.AstValue.invoke(AstValue.java:151)
| at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
| at com.sun.facelets.el.TagMethodExpression.invoke(TagMethodExpression.java:68)
| at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:69)
| at
org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63)
| at javax.faces.component.UICommand.broadcast(UICommand.java:106)
| at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:94)
| at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:168)
| at
org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:343)
| at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:86)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:137)
| at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:32)
| at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:46)
| at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| at
org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
| at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
| at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| at
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: javax.persistence.EntityExistsException:
org.hibernate.exception.ConstraintViolationException: could not insert:
[com.mydomain.Calendar.Entry]
| at
org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:616)
| at
org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:218)
| at
org.jboss.ejb3.entity.ExtendedEntityManager.persist(ExtendedEntityManager.java:104)
| at com.mydomain.Calendar.EntryConfirmAction.confirm(EntryConfirmAction.java:76)
| 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.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:112)
| at
org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:166)
| at
org.jboss.seam.intercept.EJBInvocationContext.proceed(EJBInvocationContext.java:37)
| at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:55)
| at
org.jboss.seam.interceptors.BijectionInterceptor.bijectNonreentrantComponent(BijectionInterceptor.java:79)
| at
org.jboss.seam.interceptors.BijectionInterceptor.bijectComponent(BijectionInterceptor.java:58)
| 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.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at
org.jboss.seam.interceptors.OutcomeInterceptor.interceptOutcome(OutcomeInterceptor.java:21)
| at sun.reflect.GeneratedMethodAccessor454.invoke(Unknown Source)
| at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at
org.jboss.seam.interceptors.ConversationInterceptor.endOrBeginLongRunningConversation(ConversationInterceptor.java:52)
| at sun.reflect.GeneratedMethodAccessor453.invoke(Unknown Source)
| at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at
org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:27)
| at sun.reflect.GeneratedMethodAccessor452.invoke(Unknown Source)
| at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.intercept.Interceptor.aroundInvoke(Interceptor.java:169)
| at
org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:64)
| at
org.jboss.seam.intercept.RootInterceptor.createSeamInvocationContext(RootInterceptor.java:144)
| at
org.jboss.seam.intercept.RootInterceptor.invokeInContexts(RootInterceptor.java:129)
| at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:102)
| at
org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:50)
| 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.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
| at
org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at
org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor.invoke(ExtendedPersistenceContextPropagationInterceptor.java:71)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at
org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at
org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
| at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
| at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
| ... 92 more
| Caused by: org.hibernate.exception.ConstraintViolationException: could not insert:
[com.mydomain.Calendar.Entry]
| at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:71)
| at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
| at
org.hibernate.id.insert.AbstractSelectingDelegate.performInsert(AbstractSelectingDelegate.java:40)
| at
org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2093)
| at
org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2573)
| at
org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:47)
| at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:248)
| at
org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:290)
| at
org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:180)
| at
org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:108)
| at
org.hibernate.event.def.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:131)
| at
org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:87)
| at
org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:38)
| at org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:618)
| at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:592)
| at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:596)
| at
org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:212)
| ... 150 more
| Caused by: java.sql.SQLException: Attempt to insert null into a non-nullable column:
column: USER_USERNAME table: ENTRY in statement [insert into Entry (id, user_username,
startdate, desc) values (null, ?, ?, ?)]
| at org.hsqldb.jdbc.Util.throwError(Unknown Source)
| at org.hsqldb.jdbc.jdbcPreparedStatement.executeUpdate(Unknown Source)
| at
org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeUpdate(WrappedPreparedStatement.java:251)
| at
org.hibernate.id.insert.AbstractSelectingDelegate.performInsert(AbstractSelectingDelegate.java:33)
| ... 164 more
| 12:28:59,921 ERROR [STDERR] 02-May-2007 12:28:59
com.sun.facelets.compiler.TagLibraryConfig loadImplicit
| INFO: Added Library from:
jar:file:/D:/jboss-4.0.5.GA/server/default/./deploy/Calendar.ear/Calendar.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jstl-fn.taglib.xml
| 12:28:59,937 ERROR [STDERR] 02-May-2007 12:28:59
com.sun.facelets.compiler.TagLibraryConfig loadImplicit
| INFO: Added Library from:
jar:file:/D:/jboss-4.0.5.GA/server/default/./deploy/Calendar.ear/Calendar.war/WEB-INF/lib/jboss-seam-ui.jar!/META-INF/seam-ui.taglib.xml
| 12:28:59,953 ERROR [STDERR] 02-May-2007 12:28:59
com.sun.facelets.compiler.TagLibraryConfig loadImplicit
| INFO: Added Library from:
jar:file:/D:/jboss-4.0.5.GA/server/default/./deploy/Calendar.ear/Calendar.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jstl-core.taglib.xml
| 12:28:59,953 ERROR [STDERR] 02-May-2007 12:28:59
com.sun.facelets.compiler.TagLibraryConfig loadImplicit
| INFO: Added Library from:
jar:file:/D:/jboss-4.0.5.GA/server/default/./deploy/Calendar.ear/Calendar.war/WEB-INF/lib/jboss-seam-pdf.jar!/META-INF/seam-pdf.taglib.xml
| 12:28:59,968 ERROR [STDERR] 02-May-2007 12:28:59
com.sun.facelets.compiler.TagLibraryConfig loadImplicit
| INFO: Added Library from:
jar:file:/D:/jboss-4.0.5.GA/server/default/./deploy/Calendar.ear/Calendar.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jsf-ui.taglib.xml
| 12:28:59,968 ERROR [STDERR] 02-May-2007 12:28:59
com.sun.facelets.compiler.TagLibraryConfig loadImplicit
| INFO: Added Library from:
jar:file:/D:/jboss-4.0.5.GA/server/default/./deploy/Calendar.ear/Calendar.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jsf-core.taglib.xml
| 12:28:59,984 ERROR [STDERR] 02-May-2007 12:28:59
com.sun.facelets.compiler.TagLibraryConfig loadImplicit
| INFO: Added Library from:
jar:file:/D:/jboss-4.0.5.GA/server/default/./deploy/Calendar.ear/Calendar.war/WEB-INF/lib/jsf-facelets.jar!/META-INF/jsf-html.taglib.xml
| 12:28:59,984 ERROR [STDERR] 02-May-2007 12:28:59
com.sun.facelets.compiler.TagLibraryConfig loadImplicit
| INFO: Added Library from:
jar:file:/D:/jboss-4.0.5.GA/server/default/./deploy/Calendar.ear/Calendar.war/WEB-INF/lib/jboss-seam-mail.jar!/META-INF/seam-mail.taglib.xml
| 12:29:00,046 INFO [[/Calendar]] WARNING: Component _id75 just got an automatic id,
because there was no id assigned yet. If this component was created dynamically (i.e. not
by a JSP tag) you should assign it an explicit static id or assign it the id you get from
the createUniqueId from the current UIViewRoot component right after creation!
| 12:29:00,046 ERROR [PhaseListenerManager] Exception in PhaseListener
RENDER_RESPONSE(6) beforePhase.
| javax.el.ELException:
/file:/D:/jboss-4.0.5.GA/server/default/./deploy/Calendar.ear/Calendar.war/WEB-INF/lib/jboss-seam-debug.jar!/META-INF/debug.xhtml:
value of context variable is not an instance of the component bound to the context
variable: entry
| at com.sun.facelets.compiler.TextInstruction.write(TextInstruction.java:50)
| at com.sun.facelets.compiler.UIInstructions.encodeBegin(UIInstructions.java:39)
| at
org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChild(RendererUtils.java:433)
| at
org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChildren(RendererUtils.java:419)
| at
org.apache.myfaces.shared_impl.renderkit.RendererUtils.renderChild(RendererUtils.java:440)
| at
org.apache.myfaces.shared_impl.renderkit.html.HtmlTableRendererBase.renderColumnBody(HtmlTableRendererBase.java:332)
| at
org.apache.myfaces.shared_impl.renderkit.html.HtmlTableRendererBase.encodeColumnChild(HtmlTableRendererBase.java:301)
| at
org.apache.myfaces.shared_impl.renderkit.html.HtmlTableRendererBase.encodeInnerHtml(HtmlTableRendererBase.java:277)
| at
org.apache.myfaces.shared_impl.renderkit.html.HtmlTableRendererBase.encodeChildren(HtmlTableRendererBase.java:123)
| at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:524)
| at
com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:244)
| at
com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:249)
| at
org.jboss.seam.debug.jsf.SeamDebugPhaseListener.beforePhase(SeamDebugPhaseListener.java:51)
| at
org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersBefore(PhaseListenerManager.java:70)
| at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:373)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
| at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:32)
| at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:46)
| at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| at
org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
| at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
| at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| at
org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| at java.lang.Thread.run(Thread.java:595)
| Caused by: java.lang.IllegalArgumentException: value of context variable is not an
instance of the component bound to the context variable: entry
| at org.jboss.seam.Component.getInstance(Component.java:1664)
| at org.jboss.seam.Component.getInstance(Component.java:1619)
| at
org.jboss.seam.jsf.SeamVariableResolver.resolveVariable(SeamVariableResolver.java:53)
| at
org.apache.myfaces.config.LastVariableResolverInChain.resolveVariable(LastVariableResolverInChain.java:42)
| at
com.sun.facelets.el.LegacyELContext$LegacyELResolver.getValue(LegacyELContext.java:134)
| at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:65)
| at com.sun.el.parser.AstValue.getValue(AstValue.java:106)
| at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:192)
| at com.sun.facelets.el.ELText$ELTextVariable.writeText(ELText.java:184)
| at com.sun.facelets.el.ELText$ELTextComposite.writeText(ELText.java:108)
| at com.sun.facelets.compiler.TextInstruction.write(TextInstruction.java:45)
| ... 41 more
|
My entry class
| package com.mydomain.Calendar;
|
| import java.io.Serializable;
| //import java.math.BigDecimal;
| //import java.text.DateFormat;
| import java.util.Date;
|
| import javax.persistence.Basic;
| import javax.persistence.Entity;
| import javax.persistence.GeneratedValue;
| import javax.persistence.Id;
| import javax.persistence.ManyToOne;
| import javax.persistence.Temporal;
| import javax.persistence.TemporalType;
| //import javax.persistence.Transient;
|
| import org.hibernate.validator.Length;
| import org.hibernate.validator.NotNull;
| //import org.hibernate.validator.Pattern;
| import org.jboss.seam.annotations.Name;
| import com.mydomain.Calendar.User;;
|
|
| @Entity
| @Name("entry")
| public class Entry implements Serializable
| {
|
| private static final long serialVersionUID = 1881413500711441951L;
| private Long id;
| private User user;
| private Date startdate;
| private String desc;
|
|
| public Entry()
| {}
|
| public Entry(User user )
| {
|
| this.user = user;
|
| }
|
|
| @ManyToOne //@NotNull
| public User getUser()
| {
| return user;
| }
| public void setUser(User user)
| {
| this.user = user;
| }
| @Id @GeneratedValue
| public Long getId()
| {
| return id;
| }
|
| public void setId(Long id)
| {
| this.id = id;
| }
|
| //@NotNull
| @Basic @Temporal(TemporalType.DATE)
|
| public Date getstartdate()
| {
| return startdate;
|
|
| }
|
| public void setstartdate(Date datetime)
| {
| this.startdate = datetime;
| }
|
|
| //@NotNull
| @Length(min=3, max=70, message="description")
| public String getdesc()
| {
| return desc;
| }
|
| public void setdesc(String descin)
| {
| this.desc = descin;
| }
|
|
|
| }
|
|
|
My entryConfim class
| //$Id: HotelBookingAction.java,v 1.45 2006/12/19 23:13:11 gavin Exp $
| package com.mydomain.Calendar;
|
| import static javax.persistence.PersistenceContextType.EXTENDED;
| import static org.jboss.seam.ScopeType.EVENT;
|
| import java.util.Calendar;
|
| import javax.ejb.Remove;
| import javax.ejb.Stateful;
| import javax.persistence.EntityManager;
| import javax.persistence.PersistenceContext;
|
| import org.jboss.seam.annotations.Begin;
| import org.jboss.seam.annotations.Destroy;
| import org.jboss.seam.annotations.End;
| import org.jboss.seam.annotations.In;
| import org.jboss.seam.annotations.Logger;
| import org.jboss.seam.annotations.Name;
| import org.jboss.seam.annotations.Out;
| import org.jboss.seam.annotations.Scope;
| import org.jboss.seam.core.Events;
| import org.jboss.seam.core.FacesMessages;
|
| import org.jboss.seam.log.Log;
|
| @Stateful
| @Scope(EVENT)
| @Name("entryConfirm")
| @LoggedIn
| public class EntryConfirmAction implements EntryConfirm
| {
|
| @PersistenceContext(type=EXTENDED)
| private EntityManager em;
|
| @In
| private User user;
|
|
|
| @In(required=false)
| @Out(required=false)
| private Entry entry;
|
| @In
| private FacesMessages facesMessages;
|
| @In
| private Events events;
|
| @Logger
| private Log log;
|
| private boolean entryValid;
|
| @Begin
| public void makeEntry()
| {
| //Entry entry = new Entry(user);
| entry.setUser(user);
| //Calendar calendar = Calendar.getInstance();
| //entry.setstartdate( calendar.getTime() );
| //calendar.add(Calendar.DAY_OF_MONTH, 1);
| //entry.se( calendar.getTime() );
| }
|
| public boolean isEntryValid()
| {
| return entryValid;
| }
|
| @End
| public void confirm()
| {
| em.persist(entry);
| facesMessages.add("Thank you, #{user.name}, your confimation number for
#{hotel.name} is #{booking.id}");
| log.info("New entry: #{entry.id} for #{user.username}");
| events.raiseTransactionSuccessEvent("entryConfirmed");
| }
|
| @End
| public void cancel() {}
|
| @Destroy @Remove
| public void destroy() {}
|
| }
|
my Xhtml page
| <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
| <ui:composition
xmlns="http://www.w3.org/1999/xhtml"
|
xmlns:s="http://jboss.com/products/seam/taglib"
|
xmlns:ui="http://java.sun.com/jsf/facelets"
|
xmlns:f="http://java.sun.com/jsf/core"
|
xmlns:h="http://java.sun.com/jsf/html"
| template="layout/template.xhtml">
|
| <ui:define name="body">
|
|
|
|
| <!-- <h:messages globalOnly="true"
styleClass="message"/> -->
|
| <div class="entry">
| <h:inputText id="startdate" value="#{entry.startdate}"
required = "true">
| <s:convertDateTime pattern="MM/dd/yyyy" />
| </h:inputText>
| <s:selectDate for="startdate">
| <h:graphicImage url="img/dtpick.gif"
style="margin-left:10px"/>
| </s:selectDate>
| </body>
|
| <div class="entry">
| <div class="label"><h:outputLabel
for="desc">Description</h:outputLabel></div>
| <div class="input">
| <s:decorate>
| <h:inputText id="desc" value="#{entry.desc}"
required="true">
| <s:validate/>
| </h:inputText>
| <br/>
|
| </s:decorate>
| </div>
| </div>
|
| <div class="entry">
| <div class="label"> </div>
| <div class="input">
| <h:commandButton id="confirm" value="Confirm"
action="#{entryConfirm.confirm}"/>
| </div>
| </div>
| </h:form>
| </ui:define>
|
| </ui:composition>
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4042388#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...