[jboss-user] [JBoss Seam] - Re: How to modify booking example login?(newbie question)

guiltyxsin do-not-reply at jboss.com
Mon Aug 13 02:16:59 EDT 2007


I changed Hotel.java back to the original version.

Now the error is like cannot execute query. Dose this means it logs me in?

The stack trace also showed something wrong with getBookings. But I comment the code in main.xhtml related to booking stuff. How come it still try to execute the query?

Stack trace:

  | javax.ejb.EJBException: javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute query
  | 	at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:63)
  | 	at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83)
  | 	at org.jboss.aspects.tx.TxInterceptor$RequiresNew.invoke(TxInterceptor.java:262)
  | 	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:106)
  | 	at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
  | 	at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterceptor.java:46)
  | 	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:204)
  | 	at org.jboss.ejb3.stateful.StatefulLocalProxy.invoke(StatefulLocalProxy.java:100)
  | 	at $Proxy636.getBookings(Unknown Source)
  | 	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 org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
  | 	at org.jboss.seam.intercept.RootInvocationContext.proceed(RootInvocationContext.java:31)
  | 	at org.jboss.seam.intercept.ClientSideInterceptor$1.proceed(ClientSideInterceptor.java:72)
  | 	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:57)
  | 	at org.jboss.seam.interceptors.SecurityInterceptor.aroundInvoke(SecurityInterceptor.java:39)
  | 	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
  | 	at org.jboss.seam.interceptors.RemoveInterceptor.aroundInvoke(RemoveInterceptor.java:40)
  | 	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
  | 	at org.jboss.seam.interceptors.SynchronizationInterceptor.aroundInvoke(SynchronizationInterceptor.java:31)
  | 	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
  | 	at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
  | 	at org.jboss.seam.intercept.ClientSideInterceptor.invoke(ClientSideInterceptor.java:50)
  | 	at org.javassist.tmp.java.lang.Object_$$_javassist_49.getBookings(Object_$$_javassist_49.java)
  | 	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 org.jboss.seam.util.Reflections.invoke(Reflections.java:21)
  | 	at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:124)
  | 	at org.jboss.seam.Component.callComponentMethod(Component.java:1904)
  | 	at org.jboss.seam.Component.getInstanceFromFactory(Component.java:1766)
  | 	at org.jboss.seam.Component.getInstance(Component.java:1703)
  | 	at org.jboss.seam.Component.getInstance(Component.java:1680)
  | 	at org.jboss.seam.Component.getInstance(Component.java:1674)
  | 	at org.jboss.seam.el.SeamELResolver.getValue(SeamELResolver.java:57)
  | 	at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:53)
  | 	at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELResolver.java:64)
  | 	at org.jboss.el.parser.AstIdentifier.getValue(AstIdentifier.java:44)
  | 	at org.jboss.el.parser.AstValue.getValue(AstValue.java:63)
  | 	at org.jboss.el.parser.AstEqual.getValue(AstEqual.java:21)
  | 	at org.jboss.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:186)
  | 	at com.sun.facelets.el.ELText$ELTextVariable.toString(ELText.java:174)
  | 	at com.sun.facelets.el.ELText$ELTextComposite.toString(ELText.java:115)
  | 	at com.sun.facelets.compiler.CommentInstruction.write(CommentInstruction.java:38)
  | 	at com.sun.facelets.compiler.UIInstructions.encodeBegin(UIInstructions.java:39)
  | 	at com.sun.facelets.compiler.UILeaf.encodeAll(UILeaf.java:149)
  | 	at javax.faces.component.UIComponent.encodeAll(UIComponent.java:892)
  | 	at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:571)
  | 	at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
  | 	at org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:233)
  | 	at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:106)
  | 	at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
  | 	at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
  | 	at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
  | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
  | 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  | 	at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:70)
  | 	at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:60)
  | 	at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:56)
  | 	at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:47)
  | 	at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:56)
  | 	at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:81)
  | 	at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:56)
  | 	at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127)
  | 	at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277)
  | 	at org.jboss.seam.web.AbstractAjax4jsfFilter.doFilter(AbstractAjax4jsfFilter.java:35)
  | 	at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:56)
  | 	at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:64)
  | 	at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:56)
  | 	at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:127)
  | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  | 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  | 	at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
  | 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  | 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  | 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
  | 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
  | 	at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
  | 	at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
  | 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
  | 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
  | 	at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
  | 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
  | 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
  | 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
  | 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
  | 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
  | 	at java.lang.Thread.run(Thread.java:619)
  | Caused by: javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute query
  | 	at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:629)
  | 	at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:73)
  | 	at org.jboss.seam.example.booking.BookingListAction.getBookings(BookingListAction.java:55)
  | 	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 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:57)
  | 	at org.jboss.seam.interceptors.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:47)
  | 	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
  | 	at org.jboss.seam.interceptors.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:27)
  | 	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:69)
  | 	at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:103)
  | 	at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:53)
  | 	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 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:57)
  | 	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)
  | 	... 98 more
  | Caused by: org.hibernate.exception.SQLGrammarException: could not execute query
  | 	at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)
  | 	at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
  | 	at org.hibernate.loader.Loader.doList(Loader.java:2223)
  | 	at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
  | 	at org.hibernate.loader.Loader.list(Loader.java:2099)
  | 	at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
  | 	at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
  | 	at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
  | 	at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
  | 	at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
  | 	at org.hibernate.ejb.QueryImpl.getResultList(QueryImpl.java:64)
  | 	... 127 more
  | Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name 'Booking'.
  | 	at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown Source)
  | 	at com.microsoft.sqlserver.jdbc.IOBuffer.processPackets(Unknown Source)
  | 	at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.getPrepExecResponse(Unknown Source)
  | 	at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(Unknown Source)
  | 	at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PreparedStatementExecutionRequest.executeStatement(Unknown Source)
  | 	at com.microsoft.sqlserver.jdbc.CancelableRequest.execute(Unknown Source)
  | 	at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeRequest(Unknown Source)
  | 	at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeQuery(Unknown Source)
  | 	at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:236)
  | 	at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)
  | 	at org.hibernate.loader.Loader.getResultSet(Loader.java:1787)
  | 	at org.hibernate.loader.Loader.doQuery(Loader.java:674)
  | 	at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
  | 	at org.hibernate.loader.Loader.doList(Loader.java:2220)
  | 	... 135 more

What's the problem now? Is it because the datasource is not what it meant to be?

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4073446#4073446

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4073446



More information about the jboss-user mailing list