User.java is a stateless bean and Register.java is an interface and RegisterAction.java is the implementation of the interface Register.
User.java ------------------ package com.vds.seamregistration.bean; import static org.jboss.seam.ScopeType.SESSION; import javax.persistence.Entity; import javax.persistence.Table; import javax.persistence.Id; import org.jboss.seam.annotations.Name; import org.jboss.seam.annotations.Scope; import org.hibernate.validator.NotNull; @Entity @Name("user") @Scope(SESSION) @Table(name="users") public class User { private String username; private String password; private String name; public User(String username, String password, String name){ this.username=username; this.password=password; this.name=name; } public User(){} @NotNull public String getName() { return name; } public void setName(String name) { this.name = name; } @NotNull public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } @Id @NotNull public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } @Override public String toString() { return "User(" + username + ")"; } } Register.java ------------------- package com.vds.seamregistration.bean; import javax.ejb.Local; @Local public interface Register { public String register(); } RegisterAction.java ------------------------- package com.vds.seamregistration.bean; import javax.ejb.Stateless; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import org.jboss.seam.annotations.In; import org.jboss.seam.annotations.Logger; import org.jboss.seam.annotations.Name; import org.jboss.seam.log.Log; @Stateless @Name("register") public class RegisterAction implements Register{ @In public User user; @PersistenceContext private EntityManager em; @Logger private static Log log; public String register(){ List existing = em.createQuery("select u.username from User u where u.username=#{user.username}") .getResultList(); if ( existing.size()==0 ) { em.persist(user); log.info("Registered new user #{user.username}"); return "/registered.jspx"; } else { FacesMessages.instance().add("User #{user.username} already exists"); return null; } } } 2007-05-15 14:04:49,164 ERROR [org.jboss.seam.servlet.SeamExceptionFilter] uncaught exception javax.servlet.ServletException: Error calling action method of component with id register:register at javax.faces.webapp.FacesServlet.service(FacesServlet.java:152) 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:29) 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:43) 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) 2007-05-15 14:04:49,164 ERROR [org.jboss.seam.servlet.SeamExceptionFilter] exception root cause javax.faces.FacesException: Error calling action method of component with id register:register at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:74) 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:29) 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:43) 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.faces.el.EvaluationException: /register.xhtml @18,81 action="#{register.register}": javax.ejb.EJBTransactionRolledbackException: java.lang.IllegalArgumentException: org.hibernate.QueryException: unexpected char: '#' [select u.username from com.vds.seamregistration.bean.User u where u.username=#{user.username}] at com.sun.facelets.el.LegacyMethodBinding.invoke(LegacyMethodBinding.java:73) at org.apache.myfaces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:63) ... 32 more Caused by: javax.ejb.EJBTransactionRolledbackException: java.lang.IllegalArgumentException: org.hibernate.QueryException: unexpected char: '#' [select u.username from com.vds.seamregistration.bean.User u where u.username=#{user.username}] at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:93) at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:130) at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:201) 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.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62) 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.stateless.StatelessContainer.localInvoke(StatelessContainer.java:211) at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:79) at $Proxy121.register(Unknown Source) at com.vds.seamregistration.bean.Register$$FastClassByCGLIB$$c3cee60.invoke() 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 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.vds.seamregistration.bean.Register$$EnhancerByCGLIB$$9cf7a373.register() 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) ... 33 more Caused by: java.lang.IllegalArgumentException: org.hibernate.QueryException: unexpected char: '#' [select u.username from com.vds.seamregistration.bean.User u where u.username=#{user.username}] at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:628) at org.hibernate.ejb.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:95) at org.jboss.ejb3.entity.TransactionScopedEntityManager.createQuery(TransactionScopedEntityManager.java:127) at com.vds.seamregistration.bean.RegisterAction.register(RegisterAction.java:29) 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.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.ConversationInterceptor.endOrBeginLongRunningConversation(ConversationInterceptor.java:52) 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.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:27) 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.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.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.invokeInCallerTx(TxPolicy.java:126) ... 68 more Caused by: org.hibernate.QueryException: unexpected char: '#' [select u.username from com.vds.seamregistration.bean.User u where u.username=#{user.username}] at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:204) at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:111) at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:77) at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:56) at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:72) at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:133) at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:112) at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1623) at org.hibernate.ejb.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:92) ... 127 more 2007-05-15 14:04:49,179 DEBUG [org.jboss.seam.util.Naming] JNDI InitialContext properties:{java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces} 2007-05-15 14:04:49,179 DEBUG [org.jboss.seam.servlet.SeamExceptionFilter] ending request 2007-05-15 14:04:49,195 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.exceptions 2007-05-15 14:04:49,195 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.exceptions 2007-05-15 14:04:49,195 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.exceptions 2007-05-15 14:04:49,195 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.events 2007-05-15 14:04:49,195 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.events 2007-05-15 14:04:49,195 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.events 2007-05-15 14:04:49,195 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.events 2007-05-15 14:04:49,195 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.events 2007-05-15 14:04:49,195 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.events 2007-05-15 14:04:49,195 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.preSetVariable.org.jboss.seam.core.exceptions 2007-05-15 14:04:49,195 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.events 2007-05-15 14:04:49,195 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.events 2007-05-15 14:04:49,195 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.events 2007-05-15 14:04:49,195 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.events 2007-05-15 14:04:49,195 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.events 2007-05-15 14:04:49,195 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.events 2007-05-15 14:04:49,195 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.postSetVariable.org.jboss.seam.core.exceptions 2007-05-15 14:04:49,195 INFO [org.jboss.seam.core.Exceptions] reading exception mappings from /WEB-INF/pages.xml 2007-05-15 14:04:49,195 DEBUG [org.jboss.seam.util.DTDEntityResolver] trying to resolve system-id [http://jboss.com/products/seam/pages-1.1.dtd] 2007-05-15 14:04:49,195 DEBUG [org.jboss.seam.util.DTDEntityResolver] recognized Seam namespace; attempting to resolve on classpath under org/jboss/seam/ 2007-05-15 14:04:49,195 DEBUG [org.jboss.seam.util.DTDEntityResolver] located [http://jboss.com/products/seam/pages-1.1.dtd] in classpath 2007-05-15 14:04:49,210 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, [EMAIL PROTECTED], [EMAIL PROTECTED] url=null ,addedOrder=0} 2007-05-15 14:04:49,210 DEBUG [org.jboss.mx.loading.RepositoryClassLoader] setRepository, [EMAIL PROTECTED], [EMAIL PROTECTED] url=null ,addedOrder=0} 2007-05-15 14:04:49,210 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.events 2007-05-15 14:04:49,210 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.events 2007-05-15 14:04:49,210 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.events 2007-05-15 14:04:49,210 DEBUG [org.jboss.seam.Component] instantiating Seam component: org.jboss.seam.core.events 2007-05-15 14:04:49,210 DEBUG [org.jboss.seam.Component] initializing new instance of: org.jboss.seam.core.events 2007-05-15 14:04:49,210 DEBUG [org.jboss.seam.Component] done initializing: org.jboss.seam.core.events 2007-05-15 14:04:49,210 DEBUG [org.jboss.seam.core.Events] Processing event:org.jboss.seam.postCreate.org.jboss.seam.core.exceptions 2007-05-15 14:04:49,210 ERROR [org.jboss.seam.exceptions.DebugPageHandler] redirecting to debug page org.hibernate.QueryException: unexpected char: '#' [select u.username from com.vds.seamregistration.bean.User u where u.username=#{user.username}] at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:204) at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:111) at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:77) at org.hibernate.engine.query.HQLQueryPlan.(HQLQueryPlan.java:56) at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:72) at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:133) at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:112) at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1623) at org.hibernate.ejb.AbstractEntityManagerImpl.createQuery(AbstractEntityManagerImpl.java:92) at org.jboss.ejb3.entity.TransactionScopedEntityManager.createQuery(TransactionScopedEntityManager.java:127) at com.vds.seamregistration.bean.RegisterAction.register(RegisterAction.java:29) 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.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.ConversationInterceptor.endOrBeginLongRunningConversation(ConversationInterceptor.java:52) 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.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:27) 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.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.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.invokeInCallerTx(TxPolicy.java:126) at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:201) 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.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:62) 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.stateless.StatelessContainer.localInvoke(StatelessContainer.java:211) at org.jboss.ejb3.stateless.StatelessLocalProxy.invoke(StatelessLocalProxy.java:79) at $Proxy121.register(Unknown Source) at com.vds.seamregistration.bean.Register$$FastClassByCGLIB$$c3cee60.invoke() 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 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.vds.seamregistration.bean.Register$$EnhancerByCGLIB$$9cf7a373.register() 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:29) 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:43) 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) View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4045834#4045834 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4045834 _______________________________________________ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user