-
1. Re: How to modify booking example login?(newbie question)
nickarls Aug 10, 2007 2:26 AM (in response to guiltyxsin)Put some debug code before the if-statement that displays the identity.getUsername() and identity.getPassword() to see that they are populated OK...
-
2. Re: How to modify booking example login?(newbie question)
guiltyxsin Aug 11, 2007 1:17 AM (in response to guiltyxsin)Yes I tried and the inputs are going through the identity.getUsername and getPassword. However on the Jboss AS console it shows things like:
am-booking.ear-contents/jboss-seam-booking-exp.war/WEB-INF/lib/jboss-seam-debug.jar 15:06:18,549 INFO [Scanner] scanning: /C:/jboss-4.2.0.GA/server/default/tmp/deploy/tmp64519jboss-se am-booking.ear-contents/jboss-seam-booking.jar 15:06:18,550 INFO [Scanner] scanning: /C:/jboss-4.2.0.GA/server/default/tmp/deploy/tmp64519jboss-se am-booking.ear-contents/jboss-seam-booking-exp.war/WEB-INF/lib/jboss-seam-ui.jar 15:06:18,559 INFO [Initialization] reading /WEB-INF/components.xml 15:06:18,589 INFO [Initialization] reading jar:file:/C:/jboss-4.2.0.GA/server/default/tmp/deploy/tm p64519jboss-seam-booking.ear-contents/jboss-seam.jar!/META-INF/components.xml 15:06:18,597 INFO [Initialization] reading properties from: /seam.properties 15:06:18,598 INFO [Initialization] reading properties from: /jndi.properties 15:06:18,600 INFO [Initialization] initializing Seam 15:06:18,613 INFO [Scanner] scanning: /C:/jboss-4.2.0.GA/server/default/tmp/deploy/tmp64519jboss-se am-booking.ear-contents/jboss-seam-booking-exp.war/WEB-INF/lib/jboss-seam-debug.jar 15:06:18,630 INFO [Scanner] scanning: /C:/jboss-4.2.0.GA/server/default/tmp/deploy/tmp64519jboss-se am-booking.ear-contents/jboss-seam-booking.jar 15:06:18,671 INFO [Scanner] scanning: /C:/jboss-4.2.0.GA/server/default/tmp/deploy/tmp64519jboss-se am-booking.ear-contents/jboss-seam-booking-exp.war/WEB-INF/lib/jboss-seam-ui.jar 15:06:18,913 INFO [Scanner] scanning: /C:/jboss-4.2.0.GA/server/default/tmp/deploy/tmp64519jboss-se am-booking.ear-contents/jboss-seam.jar 15:06:20,959 INFO [Initialization] two components with same name, higher precedence wins: org.jboss .seam.persistence.persistenceProvider 15:06:20,967 INFO [Initialization] two components with same name, higher precedence wins: org.jboss .seam.web.ajax4jsfFilter 15:06:20,970 INFO [Initialization] two components with same name, higher precedence wins: org.jboss .seam.security.identity 15:06:21,010 INFO [Component] Component: org.jboss.seam.core.init, scope: APPLICATION, type: JAVA_B EAN, class: org.jboss.seam.core.Init 15:06:21,036 WARN [Initialization] Did not install PojoCache due to NoClassDefFoundError: org/jgrou ps/MembershipListener 15:06:21,037 INFO [Initialization] Installing components... 15:06:21,054 INFO [Component] Component: authenticator, scope: STATELESS, type: STATELESS_SESSION_B EAN, class: org.jboss.seam.example.booking.AuthenticatorAction, JNDI: jboss-seam-booking/Authenticat orAction/local 15:06:21,070 INFO [Component] Component: booking, scope: CONVERSATION, type: ENTITY_BEAN, class: or g.jboss.seam.example.booking.Booking 15:06:21,072 INFO [Component] Component: bookingList, scope: SESSION, type: STATEFUL_SESSION_BEAN, class: org.jboss.seam.example.booking.BookingListAction, JNDI: jboss-seam-booking/BookingListAction/ local 15:06:21,083 INFO [Component] Component: changePassword, scope: EVENT, type: STATEFUL_SESSION_BEAN, class: org.jboss.seam.example.booking.ChangePasswordAction, JNDI: jboss-seam-booking/ChangePassword Action/local 15:06:21,088 INFO [Component] Component: hotel, scope: CONVERSATION, type: ENTITY_BEAN, class: org. jboss.seam.example.booking.Hotel 15:06:21,090 INFO [Component] Component: hotelBooking, scope: CONVERSATION, type: STATEFUL_SESSION_ BEAN, class: org.jboss.seam.example.booking.HotelBookingAction, JNDI: jboss-seam-booking/HotelBookin gAction/local 15:06:21,102 INFO [Component] Component: hotelSearch, scope: SESSION, type: STATEFUL_SESSION_BEAN, class: org.jboss.seam.example.booking.HotelSearchingAction, JNDI: jboss-seam-booking/HotelSearchingA ction/local 15:06:21,107 INFO [Component] Component: org.jboss.seam.core.applicationContext, scope: APPLICATION , type: JAVA_BEAN, class: org.jboss.seam.core.ApplicationContext 15:06:21,110 INFO [Component] Component: org.jboss.seam.core.businessProcessContext, scope: APPLICA TION, type: JAVA_BEAN, class: org.jboss.seam.core.BusinessProcessContext 15:06:21,111 INFO [Component] Component: org.jboss.seam.core.conversation, scope: CONVERSATION, typ e: JAVA_BEAN, class: org.jboss.seam.core.Conversation 15:06:21,114 INFO [Component] Component: org.jboss.seam.core.conversationContext, scope: APPLICATIO N, type: JAVA_BEAN, class: org.jboss.seam.core.ConversationContext 15:06:21,116 INFO [Component] Component: org.jboss.seam.core.conversationEntries, scope: SESSION, t ype: JAVA_BEAN, class: org.jboss.seam.core.ConversationEntries 15:06:21,120 INFO [Component] Component: org.jboss.seam.core.conversationList, scope: PAGE, type: J AVA_BEAN, class: org.jboss.seam.core.ConversationList 15:06:21,122 INFO [Component] Component: org.jboss.seam.core.conversationStack, scope: PAGE, type: JAVA_BEAN, class: org.jboss.seam.core.ConversationStack 15:06:21,124 INFO [Component] Component: org.jboss.seam.core.dispatcher, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.ThreadPoolDispatcher 15:06:21,129 INFO [Component] Component: org.jboss.seam.core.eventContext, scope: APPLICATION, type : JAVA_BEAN, class: org.jboss.seam.core.EventContext 15:06:21,130 INFO [Component] Component: org.jboss.seam.core.events, scope: STATELESS, type: JAVA_B EAN, class: org.jboss.seam.core.Events 15:06:21,133 INFO [Component] Component: org.jboss.seam.core.exceptions, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.Exceptions 15:06:21,140 INFO [Component] Component: org.jboss.seam.core.expressions, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.Expressions 15:06:21,143 INFO [Component] Component: org.jboss.seam.core.facesContext, scope: APPLICATION, type : JAVA_BEAN, class: org.jboss.seam.core.FacesContext 15:06:21,144 INFO [Component] Component: org.jboss.seam.core.facesMessages, scope: CONVERSATION, ty pe: JAVA_BEAN, class: org.jboss.seam.core.FacesMessages 15:06:21,148 INFO [Component] Component: org.jboss.seam.core.facesPage, scope: PAGE, type: JAVA_BEA N, class: org.jboss.seam.core.FacesPage 15:06:21,150 INFO [Component] Component: org.jboss.seam.core.httpError, scope: APPLICATION, type: J AVA_BEAN, class: org.jboss.seam.core.HttpError 15:06:21,152 INFO [Component] Component: org.jboss.seam.core.image, scope: CONVERSATION, type: JAVA _BEAN, class: org.jboss.seam.core.Image 15:06:21,157 INFO [Component] Component: org.jboss.seam.core.interpolator, scope: STATELESS, type: JAVA_BEAN, class: org.jboss.seam.core.Interpolator 15:06:21,159 INFO [Component] Component: org.jboss.seam.core.isUserInRole, scope: APPLICATION, type : JAVA_BEAN, class: org.jboss.seam.core.IsUserInRole 15:06:21,161 INFO [Component] Component: org.jboss.seam.core.locale, scope: STATELESS, type: JAVA_B EAN, class: org.jboss.seam.core.Locale 15:06:21,163 INFO [Component] Component: org.jboss.seam.core.localeSelector, scope: SESSION, type: JAVA_BEAN, class: org.jboss.seam.core.LocaleSelector 15:06:21,167 INFO [Component] Component: org.jboss.seam.core.manager, scope: EVENT, type: JAVA_BEAN , class: org.jboss.seam.core.Manager 15:06:21,172 INFO [Component] Component: org.jboss.seam.core.messages, scope: SESSION, type: JAVA_B EAN, class: org.jboss.seam.core.Messages 15:06:21,174 INFO [Component] Component: org.jboss.seam.core.methodContext, scope: APPLICATION, typ e: JAVA_BEAN, class: org.jboss.seam.core.MethodContext 15:06:21,176 INFO [Component] Component: org.jboss.seam.core.pageContext, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.PageContext 15:06:21,178 INFO [Component] Component: org.jboss.seam.core.pages, scope: APPLICATION, type: JAVA_ BEAN, class: org.jboss.seam.core.Pages 15:06:21,191 INFO [Component] Component: org.jboss.seam.core.persistenceContexts, scope: CONVERSATI ON, type: JAVA_BEAN, class: org.jboss.seam.core.PersistenceContexts 15:06:21,192 INFO [Component] Component: org.jboss.seam.core.redirect, scope: CONVERSATION, type: J AVA_BEAN, class: org.jboss.seam.core.Redirect 15:06:21,195 INFO [Component] Component: org.jboss.seam.core.renderer, scope: STATELESS, type: JAVA _BEAN, class: org.jboss.seam.ui.facelet.FaceletsRenderer 15:06:21,197 INFO [Component] Component: org.jboss.seam.core.resourceBundle, scope: SESSION, type: JAVA_BEAN, class: org.jboss.seam.core.ResourceBundle 15:06:21,201 INFO [Component] Component: org.jboss.seam.core.safeActions, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.SafeActions 15:06:21,203 INFO [Component] Component: org.jboss.seam.core.servletSession, scope: SESSION, type: JAVA_BEAN, class: org.jboss.seam.core.ServletSession 15:06:21,205 INFO [Component] Component: org.jboss.seam.core.sessionContext, scope: APPLICATION, ty pe: JAVA_BEAN, class: org.jboss.seam.core.SessionContext 15:06:21,207 INFO [Component] Component: org.jboss.seam.core.switcher, scope: PAGE, type: JAVA_BEAN , class: org.jboss.seam.core.Switcher 15:06:21,210 INFO [Component] Component: org.jboss.seam.core.timeZone, scope: STATELESS, type: JAVA _BEAN, class: org.jboss.seam.core.TimeZone 15:06:21,212 INFO [Component] Component: org.jboss.seam.core.timeZoneSelector, scope: SESSION, type : JAVA_BEAN, class: org.jboss.seam.core.TimeZoneSelector 15:06:21,215 INFO [Component] Component: org.jboss.seam.core.transactionListener, scope: EVENT, typ e: STATEFUL_SESSION_BEAN, class: org.jboss.seam.core.TransactionListener, JNDI: jboss-seam-booking/T ransactionListener/local 15:06:21,219 INFO [Component] Component: org.jboss.seam.core.uiComponent, scope: STATELESS, type: J AVA_BEAN, class: org.jboss.seam.core.UiComponent 15:06:21,221 INFO [Component] Component: org.jboss.seam.core.userPrincipal, scope: APPLICATION, typ e: JAVA_BEAN, class: org.jboss.seam.core.UserPrincipal 15:06:21,223 INFO [Component] Component: org.jboss.seam.core.validation, scope: EVENT, type: JAVA_B EAN, class: org.jboss.seam.core.Validation 15:06:21,226 INFO [Component] Component: org.jboss.seam.core.validators, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.core.Validators 15:06:21,228 INFO [Component] Component: org.jboss.seam.debug.contexts, scope: APPLICATION, type: J AVA_BEAN, class: org.jboss.seam.debug.Contexts 15:06:21,231 INFO [Component] Component: org.jboss.seam.debug.hotDeployFilter, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.debug.hot.HotDeployFilter 15:06:21,236 INFO [Component] Component: org.jboss.seam.debug.introspector, scope: EVENT, type: JAV A_BEAN, class: org.jboss.seam.debug.Introspector 15:06:21,241 INFO [Component] Component: org.jboss.seam.framework.currentDate, scope: STATELESS, ty pe: JAVA_BEAN, class: org.jboss.seam.framework.CurrentDate 15:06:21,244 INFO [Component] Component: org.jboss.seam.framework.currentDatetime, scope: STATELESS , type: JAVA_BEAN, class: org.jboss.seam.framework.CurrentDatetime 15:06:21,246 INFO [Component] Component: org.jboss.seam.framework.currentTime, scope: STATELESS, ty pe: JAVA_BEAN, class: org.jboss.seam.framework.CurrentTime 15:06:21,248 INFO [Component] Component: org.jboss.seam.jsf.jsfProvider, scope: STATELESS, type: JA VA_BEAN, class: org.jboss.seam.jsf.JsfProvider 15:06:21,253 INFO [Component] Component: org.jboss.seam.mail.mailSession, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.mail.MailSession 15:06:21,256 INFO [Component] Component: org.jboss.seam.security.configuration, scope: APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.security.Configuration 15:06:21,258 INFO [Component] Component: org.jboss.seam.security.identity, scope: SESSION, type: JA VA_BEAN, class: org.jboss.seam.security.Identity 15:06:21,264 INFO [Component] Component: org.jboss.seam.theme.theme, scope: SESSION, type: JAVA_BEA N, class: org.jboss.seam.theme.Theme 15:06:21,265 INFO [Component] Component: org.jboss.seam.theme.themeSelector, scope: SESSION, type: JAVA_BEAN, class: org.jboss.seam.theme.ThemeSelector 15:06:21,268 INFO [Component] Component: org.jboss.seam.transaction.transaction, scope: STATELESS, type: JAVA_BEAN, class: org.jboss.seam.transaction.Transaction 15:06:21,272 INFO [Component] Component: org.jboss.seam.ui.entityConverter, scope: CONVERSATION, ty pe: JAVA_BEAN, class: org.jboss.seam.ui.EntityConverter 15:06:21,279 INFO [Component] Component: org.jboss.seam.ui.entityConverterStore, scope: PAGE, type: JAVA_BEAN, class: org.jboss.seam.ui.EntityConverterStore 15:06:21,282 INFO [Component] Component: org.jboss.seam.ui.graphicImage.graphicImageResource, scope : APPLICATION, type: JAVA_BEAN, class: org.jboss.seam.ui.graphicImage.GraphicImageResource 15:06:21,286 INFO [Component] Component: org.jboss.seam.ui.graphicImage.graphicImageStore, scope: S ESSION, type: JAVA_BEAN, class: org.jboss.seam.ui.graphicImage.GraphicImageStore 15:06:21,288 INFO [Component] Component: org.jboss.seam.ui.resource.styleResource, scope: APPLICATI ON, type: JAVA_BEAN, class: org.jboss.seam.ui.resource.StyleResource 15:06:21,290 INFO [Component] Component: org.jboss.seam.ui.resource.webResource, scope: APPLICATION , type: JAVA_BEAN, class: org.jboss.seam.ui.resource.WebResource 15:06:21,292 INFO [Component] Component: org.jboss.seam.web.ajax4jsfFilter, scope: APPLICATION, typ e: JAVA_BEAN, class: org.jboss.seam.ui.filter.Ajax4jsfFilter 15:06:21,295 INFO [Component] Component: org.jboss.seam.web.exceptionFilter, scope: APPLICATION, ty pe: JAVA_BEAN, class: org.jboss.seam.web.ExceptionFilter 15:06:21,300 INFO [Component] Component: org.jboss.seam.web.multipartFilter, scope: APPLICATION, ty pe: JAVA_BEAN, class: org.jboss.seam.web.MultipartFilter 15:06:21,301 INFO [Component] Component: org.jboss.seam.web.redirectFilter, scope: APPLICATION, typ e: JAVA_BEAN, class: org.jboss.seam.web.RedirectFilter 15:06:21,304 INFO [Component] Component: register, scope: EVENT, type: STATEFUL_SESSION_BEAN, class : org.jboss.seam.example.booking.RegisterAction, JNDI: jboss-seam-booking/RegisterAction/local 15:06:21,307 INFO [Component] Component: user, scope: SESSION, type: ENTITY_BEAN, class: org.jboss. seam.example.booking.User 15:06:21,309 INFO [Lifecycle] starting up: org.jboss.seam.debug.hotDeployFilter 15:06:21,311 INFO [Lifecycle] starting up: org.jboss.seam.ui.graphicImage.graphicImageResource 15:06:21,312 INFO [Lifecycle] starting up: org.jboss.seam.web.ajax4jsfFilter 15:06:21,327 INFO [Lifecycle] starting up: org.jboss.seam.web.multipartFilter 15:06:21,328 INFO [Lifecycle] starting up: org.jboss.seam.ui.resource.styleResource 15:06:21,329 INFO [Lifecycle] starting up: org.jboss.seam.web.redirectFilter 15:06:21,330 INFO [Lifecycle] starting up: org.jboss.seam.web.exceptionFilter 15:06:21,331 INFO [Lifecycle] starting up: org.jboss.seam.ui.resource.webResource 15:06:21,333 INFO [Initialization] done initializing Seam 15:06:21,335 INFO [SeamFilter] Initializing filter: org.jboss.seam.debug.hotDeployFilter 15:06:21,335 INFO [SeamFilter] Initializing filter: org.jboss.seam.web.ajax4jsfFilter 15:06:21,360 INFO [CacheManager] Selected [org.ajax4jsf.cache.LRUMapCacheFactory] cache factory 15:06:21,366 INFO [LRUMapCacheFactory] Creating LRUMap cache instance using parameters: {facelets.D EVELOPMENT=true, org.ajax4jsf.VIEW_HANDLERS=com.sun.facelets.FaceletViewHandler, com.sun.faces.injec tionProvider=org.jboss.web.jsf.integration.injection.JBossInjectionProvider, javax.faces.STATE_SAVIN G_METHOD=client, javax.faces.DEFAULT_SUFFIX=.xhtml} 15:06:21,369 INFO [LRUMapCacheFactory] Creating LRUMap cache instance of default capacity 15:06:21,484 INFO [CacheManager] Selected [org.ajax4jsf.cache.LRUMapCacheFactory] cache factory 15:06:21,484 INFO [LRUMapCacheFactory] Creating LRUMap cache instance using parameters: {facelets.D EVELOPMENT=true, org.ajax4jsf.VIEW_HANDLERS=com.sun.facelets.FaceletViewHandler, com.sun.faces.injec tionProvider=org.jboss.web.jsf.integration.injection.JBossInjectionProvider, javax.faces.STATE_SAVIN G_METHOD=client, javax.faces.DEFAULT_SUFFIX=.xhtml} 15:06:21,488 INFO [LRUMapCacheFactory] Creating LRUMap cache instance of default capacity 15:06:21,490 INFO [SeamFilter] Initializing filter: org.jboss.seam.web.multipartFilter 15:06:21,491 INFO [SeamFilter] Initializing filter: org.jboss.seam.web.redirectFilter 15:06:21,492 INFO [SeamFilter] Initializing filter: org.jboss.seam.web.exceptionFilter 15:06:21,539 INFO [EARDeployer] Started J2EE application: file:/C:/jboss-4.2.0.GA/server/default/de ploy/jboss-seam-booking.ear 15:06:21,542 ERROR [URLDeploymentScanner] Incomplete Deployment listing: --- MBeans waiting for other MBeans --- ObjectName: persistence.units:ear=jboss-seam-booking.ear,jar=jboss-seam-booking.jar,unitName=booking Database State: FAILED Reason: org.hibernate.AnnotationException: No identifier specified for entity: org.jboss.seam.exam ple.booking.Hotel I Depend On: jboss.jca:service=DataSourceBinding,name=bookingDatasource Depends On Me: jboss.j2ee:ear=jboss-seam-booking.ear,jar=jboss-seam-booking.jar,name=AuthenticatorAction,servic e=EJB3 jboss.j2ee:ear=jboss-seam-booking.ear,jar=jboss-seam-booking.jar,name=BookingListAction,service= EJB3 jboss.j2ee:ear=jboss-seam-booking.ear,jar=jboss-seam-booking.jar,name=ChangePasswordAction,servi ce=EJB3 jboss.j2ee:ear=jboss-seam-booking.ear,jar=jboss-seam-booking.jar,name=HotelBookingAction,service =EJB3 jboss.j2ee:ear=jboss-seam-booking.ear,jar=jboss-seam-booking.jar,name=HotelSearchingAction,servi ce=EJB3 jboss.j2ee:ear=jboss-seam-booking.ear,jar=jboss-seam-booking.jar,name=RegisterAction,service=EJB 3 ObjectName: jboss.j2ee:ear=jboss-seam-booking.ear,jar=jboss-seam-booking.jar,name=AuthenticatorActio n,service=EJB3 State: NOTYETINSTALLED I Depend On: persistence.units:ear=jboss-seam-booking.ear,jar=jboss-seam-booking.jar,unitName=bookingDatabase ObjectName: jboss.j2ee:ear=jboss-seam-booking.ear,jar=jboss-seam-booking.jar,name=BookingListAction, service=EJB3 State: NOTYETINSTALLED I Depend On: persistence.units:ear=jboss-seam-booking.ear,jar=jboss-seam-booking.jar,unitName=bookingDatabase ObjectName: jboss.j2ee:ear=jboss-seam-booking.ear,jar=jboss-seam-booking.jar,name=ChangePasswordActi on,service=EJB3 State: NOTYETINSTALLED I Depend On: persistence.units:ear=jboss-seam-booking.ear,jar=jboss-seam-booking.jar,unitName=bookingDatabase ObjectName: jboss.j2ee:ear=jboss-seam-booking.ear,jar=jboss-seam-booking.jar,name=HotelBookingAction ,service=EJB3 State: NOTYETINSTALLED I Depend On: persistence.units:ear=jboss-seam-booking.ear,jar=jboss-seam-booking.jar,unitName=bookingDatabase ObjectName: jboss.j2ee:ear=jboss-seam-booking.ear,jar=jboss-seam-booking.jar,name=HotelSearchingActi on,service=EJB3 State: NOTYETINSTALLED I Depend On: persistence.units:ear=jboss-seam-booking.ear,jar=jboss-seam-booking.jar,unitName=bookingDatabase ObjectName: jboss.j2ee:ear=jboss-seam-booking.ear,jar=jboss-seam-booking.jar,name=RegisterAction,ser vice=EJB3 State: NOTYETINSTALLED I Depend On: persistence.units:ear=jboss-seam-booking.ear,jar=jboss-seam-booking.jar,unitName=bookingDatabase --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM --- ObjectName: persistence.units:ear=jboss-seam-booking.ear,jar=jboss-seam-booking.jar,unitName=booking Database State: FAILED Reason: org.hibernate.AnnotationException: No identifier specified for entity: org.jboss.seam.exam ple.booking.Hotel I Depend On: jboss.jca:service=DataSourceBinding,name=bookingDatasource Depends On Me: jboss.j2ee:ear=jboss-seam-booking.ear,jar=jboss-seam-booking.jar,name=AuthenticatorAction,servic e=EJB3 jboss.j2ee:ear=jboss-seam-booking.ear,jar=jboss-seam-booking.jar,name=BookingListAction,service= EJB3 jboss.j2ee:ear=jboss-seam-booking.ear,jar=jboss-seam-booking.jar,name=ChangePasswordAction,servi ce=EJB3 jboss.j2ee:ear=jboss-seam-booking.ear,jar=jboss-seam-booking.jar,name=HotelBookingAction,service =EJB3 jboss.j2ee:ear=jboss-seam-booking.ear,jar=jboss-seam-booking.jar,name=HotelSearchingAction,servi ce=EJB3 jboss.j2ee:ear=jboss-seam-booking.ear,jar=jboss-seam-booking.jar,name=RegisterAction,service=EJB 3
So many error and because I am new to all this so I don't know where to look for the bugs. I only change the datasource.xml for it to look for data on my university's database and user.java so that after login the user session will be the administrator only and setup username, password and name into administrator just for a simple login process.
Any suggestions which part of the booking example I should go to and modify??
I appreciate your helps.
Regards,
Andy -
3. Re: How to modify booking example login?(newbie question)
harpritt Aug 11, 2007 5:12 AM (in response to guiltyxsin)post your datasource.xml
you authenicator looks fine if you are hard coding the credentials.... (Arrgghhhhhhhhhhh)
im not familar with the booking example but does the new user not need any roles?..... like admin... -
4. Re: How to modify booking example login?(newbie question)
harpritt Aug 11, 2007 5:16 AM (in response to guiltyxsin).... is your datasource called datasource.xml ?
have you renamed it at any point? -
5. Re: How to modify booking example login?(newbie question)
guiltyxsin Aug 11, 2007 11:12 PM (in response to guiltyxsin)No I have not rename any datasource names or what ever, want to get the simple login and search going before I change everything.
Here's the booking-ds.xml code:<?xml version="1.0" encoding="UTF-8"?> <datasources> <local-tx-datasource> <jndi-name>bookingDatasource</jndi-name> <connection-url>jdbc:sqlserver://xxxx.unsw.edu.au;databaseName=ResearchDB;</connection-url> <driver-class>com.microsoft.sqlserver.jdbc.SQLServerDriver</driver-class> <user-name>xxx</user-name> <password>xxx</password> </local-tx-datasource> </datasources>
-
6. Re: How to modify booking example login?(newbie question)
matt.drees Aug 12, 2007 1:44 PM (in response to guiltyxsin)Did you touch Hotel.java? It looks (to me) like the key exception in the log is "org.hibernate.AnnotationException: No identifier specified for entity: org.jboss.seam.example.booking.Hotel"
-
7. Re: How to modify booking example login?(newbie question)
guiltyxsin Aug 13, 2007 1:24 AM (in response to guiltyxsin)Yes I did touch Hotel.java because I am going to use the search thing to get data out of the database. Therefore I modify some parts of it.
However, I am not sure if I did the correct thing or not. I just change the attributes of the hotel to match what we have but still call it hotel.
Is it because I touched Hotel.java??
I will try to run it with the original one then. -
8. Re: How to modify booking example login?(newbie question)
guiltyxsin Aug 13, 2007 2:16 AM (in response to guiltyxsin)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? -
9. Re: How to modify booking example login?(newbie question)
matt.drees Aug 13, 2007 11:19 AM (in response to guiltyxsin)Facelets still evaluates code in comments by default. Read http://wiki.jboss.org/wiki/Wiki.jsp?page=SeamProblemsFAQ.
Your datasource looks fine.
The problem is this:
com.microsoft.sqlserver.jdbc.SQLServerException: Invalid object name 'Booking'.
Which probably means the Booking table doesn't exist.