Ok, so here's what I did. Still not working, but I know with some help I can get it working. I'm using Spring MVC with hibernate (Appfuse 2.x). Error attached (from when I run mvn)
--I have created a new pkg "com.xxx.webapp.decorator", in which I have 1 class EditDeleteListIcon.java. Attaching the class with this email. --I then created a bean in src\main\resources\applicationcontext-resources.xml <bean id="deletedecorator" class="com.xxx.webapp.decorator.EditDeleteListerIcon"/> --Added the property to userController bean in "src\main\webapp\WEB-INF\dispatcher-servlet.xml" <bean id="userController" class="com.xxx.webapp.controller.UserController"> <property name="userManager" ref="userManager"/> <property name="deletedecorator" ref="deletedecorator"/> </bean> --In userList.jsp added the deletelink as below... <display:table name="userList" cellspacing="0" cellpadding="0" requestURI="" defaultsort="1" id="users" pagesize="25" class="table" export="true" decorator="deletedecorator"> <display:column property="deletelink" title="DeleteAction"/> <display:column property="username" escapeXml="true" sortable="true" titleKey="user.username" style="width: 25%" url="/userform.html?from=list" paramId="id" paramProperty="id"/> <display:column property="fullName" escapeXml="true" sortable="true" titleKey="activeUsers.fullName" style="width: 34%"/> Could someone help me please Thnx Vanessa ----- Original Message ----- From: "Josep García" <jgar...@isigma.es> To: users@appfuse.dev.java.net Sent: Thursday, November 11, 2010 4:22:07 AM (GMT-0500) America/New_York Subject: Re: [appfuse-user] delete icon/button You can achieve this with displaytag decorators. There are examples on the net. See for instance: http://displaytag.sourceforge.net/11/tut_links.html Josep 2010/11/10 Vanessa Pacheco < vpach...@bowmansystems.com > Never mind my previous css question. I found firebug to be a great help there. I do have another question though. I would like to add a delete icon to every row in the user list so that when i click it, it asks whether i really want to delete the user....if I click OK, it deletes and if I click cancel it does not delete Just using trial and error, I added this to the userlist.jsp, <display:table name="userList" cellspacing="0" cellpadding="0" requestURI="" defaultsort="1" id="users" pagesize="25" class="table" export="true"> <display:column title="Action"> <html:link action="/EditSubscription?action=Delete" paramId="username" paramName="RegistrationForm" paramProperty="username"> <bean:message key="registration.deleteSubscription"/> </html:link> </display:column> <display:column property="username" escapeXml="true" sortable="true" titleKey="user.username" style="width: 25%" url="/userform.html?from=list" paramId="id" paramProperty="id"/> which ofcourse doesn't work (I knew it wouldn't). Could someone guide me please Thnx Vanessa --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@appfuse.dev.java.net For additional commands, e-mail: users-h...@appfuse.dev.java.net
package com.bowmansystems.webapp.decorator; import org.displaytag.decorator.TableDecorator; import java.util.*; import com.bowmansystems.model.User; public class EditDeleteListerIcon extends TableDecorator { public String getUsername() { User userData = (User)getCurrentRowObject(); return userData.getUsername(); } public Long getId() { User userData = (User)getCurrentRowObject(); return userData.getId(); } public String getDeletelink() { User userData = (User)getCurrentRowObject(); Long id = getId(); return "<a href=\".\" onclick=\"bCancel=true;return confirmDelete('user')\">Delete</a>"; } }
+ Error stacktraces are turned on. [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Building AppFuse Spring MVC Application [INFO] task-segment: [install] [INFO] ------------------------------------------------------------------------ [INFO] [aspectj:compile {execution: default}] [INFO] [native2ascii:native2ascii {execution: native2ascii-utf8}] [INFO] [native2ascii:native2ascii {execution: native2ascii-8859_1}] [INFO] [resources:resources {execution: default-resources}] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 25 resources [INFO] Copying 1 resource [INFO] Copying 93 resources [INFO] Copying 93 resources [INFO] [compiler:compile {execution: default-compile}] [INFO] Nothing to compile - all classes are up to date [INFO] [resources:testResources {execution: default-testResources}] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 18 resources [INFO] Copying 15 resources [INFO] Preparing hibernate3:hbm2ddl [WARNING] Removing: hbm2ddl from forked lifecycle, to prevent recursive invocation. [INFO] [aspectj:compile {execution: default}] [INFO] [native2ascii:native2ascii {execution: native2ascii-utf8}] [INFO] [native2ascii:native2ascii {execution: native2ascii-8859_1}] [INFO] [resources:resources {execution: default-resources}] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 25 resources [INFO] Copying 1 resource [INFO] Copying 93 resources [INFO] Copying 93 resources [INFO] Copying 93 resources [INFO] Copying 93 resources [INFO] [hibernate3:hbm2ddl {execution: default}] [INFO] Configuration XML file loaded: file:/C:/Source/SyncPt/src/main/resources/hibernate.cfg.xml [INFO] Configuration XML file loaded: file:/C:/Source/SyncPt/src/main/resources/hibernate.cfg.xml [INFO] Configuration Properties file loaded: C:\Source\SyncPt\target\classes\jdbc.properties alter table user_role drop constraint FK143BF46A58DC64E6; alter table user_role drop constraint FK143BF46AFE0728C6; drop table app_user; drop table role; drop table user_role; drop sequence hibernate_sequence; create table app_user (id int8 not null, account_expired bool not null, account_locked bool not null, address varchar(150), city varchar(50), country varchar(100), postal_code varchar(15), province varchar(100), credentials_expired bool not null, email varchar(255) not null unique, account_enabled bool, first_name varchar(50) not null, last_name varchar(50) not null, password varchar(255) not null, password_hint varchar(255), phone_number varchar(255), username varchar(50) not null unique, version int4, website varchar(255), primary key (id)); create table role (id int8 not null, description varchar(64), name varchar(20), primary key (id)); create table user_role (user_id int8 not null, role_id int8 not null, primary key (user_id, role_id)); alter table user_role add constraint FK143BF46A58DC64E6 foreign key (role_id) references role; alter table user_role add constraint FK143BF46AFE0728C6 foreign key (user_id) references app_user; create sequence hibernate_sequence; [INFO] [compiler:testCompile {execution: default-testCompile}] [INFO] Nothing to compile - all classes are up to date [INFO] [dbunit:operation {execution: test-compile}] [INFO] [surefire:test {execution: default-test}] [INFO] Surefire report directory: C:\Source\SyncPt\target\surefire-reports ------------------------------------------------------- T E S T S ------------------------------------------------------- Running com.bowmansystems.webapp.filter.LocaleFilterTest DEBUG - GenericFilterBean.init(157) | Initializing filter '' DEBUG - GenericFilterBean.init(182) | Filter '' configured successfully DEBUG - MockFilterChain.doFilter(37) | Forwarding to: DEBUG - GenericFilterBean.init(157) | Initializing filter '' DEBUG - GenericFilterBean.init(182) | Filter '' configured successfully DEBUG - MockFilterChain.doFilter(37) | Forwarding to: DEBUG - GenericFilterBean.init(157) | Initializing filter '' DEBUG - GenericFilterBean.init(182) | Filter '' configured successfully DEBUG - MockFilterChain.doFilter(37) | Forwarding to: DEBUG - GenericFilterBean.init(157) | Initializing filter '' DEBUG - GenericFilterBean.init(182) | Filter '' configured successfully DEBUG - MockFilterChain.doFilter(37) | Forwarding to: DEBUG - GenericFilterBean.init(157) | Initializing filter '' DEBUG - GenericFilterBean.init(182) | Filter '' configured successfully DEBUG - MockFilterChain.doFilter(37) | Forwarding to: Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.141 sec Running com.bowmansystems.service.impl.UserManagerImplTest WARN - UserManagerImpl.saveUser(92) | PasswordEncoder not set, skipping password encryption... DEBUG - UserManagerImpl.removeUser(112) | removing user: 5 WARN - UserManagerImpl.saveUser(92) | PasswordEncoder not set, skipping password encryption... WARN - UserManagerImpl.saveUser(92) | PasswordEncoder not set, skipping password encryption... WARN - UserManagerImpl.saveUser(99) | DEBUG - UserManagerImplTest.testUserExistsException(136) | expected exception: User 'admin' already exists! Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.172 sec Running com.bowmansystems.webapp.controller.UserFormControllerTest INFO - BaseControllerTestCase.loadContextLocations(57) | Loading additional configuration from: classpath:/applicationContext-resources.xml,classpath:/applicationContext-dao.xml,classpath:/applicationContext-service.xml,classpath*:/applicationContext.xml,/WEB-INF/applicationContext*.xml,/WEB-INF/dispatcher-servlet.xml Nov 11, 2010 12:31:04 PM net.sf.ehcache.util.UpdateChecker doCheck INFO: New update(s) found: 2.3.0 [http://www.terracotta.org/confluence/display/release/Release+Notes+Ehcache+2.3.0] DEBUG - AbstractTransactionalSpringContextTests.startNewTransaction(392) | Began transaction (1): transaction manager [org.springframework.orm.hibernate3.hibernatetransactionmana...@75d758]; rollback [true]. DEBUG - UserFormControllerTest.testAdd(23) | testing add new user... DEBUG - AbstractFormController.showNewForm(337) | Displaying new form DEBUG - UserFormController.formBackingObject(167) | checking for remember me login... DEBUG - AbstractTransactionalSpringContextTests.endTransaction(360) | Rolled back transaction after execution of test [testAdd]. DEBUG - AbstractTransactionalSpringContextTests.startNewTransaction(392) | Began transaction (1): transaction manager [org.springframework.orm.hibernate3.hibernatetransactionmana...@75d758]; rollback [true]. DEBUG - UserFormControllerTest.testAddWithoutPermission(34) | testing add new user... DEBUG - AbstractFormController.showNewForm(337) | Displaying new form DEBUG - UserFormController.formBackingObject(167) | checking for remember me login... WARN - UserFormController.showForm(150) | User 'null' is trying to edit user with id 'null' DEBUG - AbstractTransactionalSpringContextTests.endTransaction(360) | Rolled back transaction after execution of test [testAddWithoutPermission]. DEBUG - AbstractTransactionalSpringContextTests.startNewTransaction(392) | Began transaction (1): transaction manager [org.springframework.orm.hibernate3.hibernatetransactionmana...@75d758]; rollback [true]. DEBUG - UserFormControllerTest.testCancel(47) | testing cancel... DEBUG - BaseCommandController.createCommand(362) | Creating new command of class [com.bowmansystems.model.User] DEBUG - AbstractTransactionalSpringContextTests.endTransaction(360) | Rolled back transaction after execution of test [testCancel]. DEBUG - AbstractTransactionalSpringContextTests.startNewTransaction(392) | Began transaction (1): transaction manager [org.springframework.orm.hibernate3.hibernatetransactionmana...@75d758]; rollback [true]. DEBUG - UserFormControllerTest.testEdit(57) | testing edit... DEBUG - AbstractFormController.showNewForm(337) | Displaying new form DEBUG - UserFormController.formBackingObject(167) | checking for remember me login... DEBUG - AbstractTransactionalSpringContextTests.endTransaction(360) | Rolled back transaction after execution of test [testEdit]. DEBUG - AbstractTransactionalSpringContextTests.startNewTransaction(392) | Began transaction (1): transaction manager [org.springframework.orm.hibernate3.hibernatetransactionmana...@75d758]; rollback [true]. DEBUG - UserFormControllerTest.testEditWithoutPermission(70) | testing edit... DEBUG - AbstractFormController.showNewForm(337) | Displaying new form DEBUG - UserFormController.formBackingObject(167) | checking for remember me login... WARN - UserFormController.showForm(150) | User 'null' is trying to edit user with id '-1' DEBUG - AbstractTransactionalSpringContextTests.endTransaction(360) | Rolled back transaction after execution of test [testEditWithoutPermission]. DEBUG - AbstractTransactionalSpringContextTests.startNewTransaction(392) | Began transaction (1): transaction manager [org.springframework.orm.hibernate3.hibernatetransactionmana...@75d758]; rollback [true]. DEBUG - UserFormControllerTest.testEditProfile(83) | testing edit profile... DEBUG - AbstractFormController.showNewForm(337) | Displaying new form DEBUG - UserFormController.formBackingObject(167) | checking for remember me login... DEBUG - AbstractTransactionalSpringContextTests.endTransaction(360) | Rolled back transaction after execution of test [testEditProfile]. DEBUG - AbstractTransactionalSpringContextTests.startNewTransaction(392) | Began transaction (1): transaction manager [org.springframework.orm.hibernate3.hibernatetransactionmana...@75d758]; rollback [true]. DEBUG - SimpleFormController.processFormSubmission(266) | No errors -> processing submit DEBUG - UserFormController.onSubmit(66) | entering 'onSubmit' method... DEBUG - UserDaoHibernate.saveUser(49) | user's id: -1 DEBUG - UserFormControllerTest.testSave(105) | {} DEBUG - AbstractTransactionalSpringContextTests.endTransaction(360) | Rolled back transaction after execution of test [testSave]. DEBUG - AbstractTransactionalSpringContextTests.startNewTransaction(392) | Began transaction (1): transaction manager [org.springframework.orm.hibernate3.hibernatetransactionmana...@75d758]; rollback [true]. DEBUG - BaseCommandController.createCommand(362) | Creating new command of class [com.bowmansystems.model.User] DEBUG - SimpleFormController.processFormSubmission(256) | Data binding errors: 10 DEBUG - AbstractTransactionalSpringContextTests.endTransaction(360) | Rolled back transaction after execution of test [testAddWithMissingFields]. DEBUG - AbstractTransactionalSpringContextTests.startNewTransaction(392) | Began transaction (1): transaction manager [org.springframework.orm.hibernate3.hibernatetransactionmana...@75d758]; rollback [true]. DEBUG - SimpleFormController.processFormSubmission(266) | No errors -> processing submit DEBUG - UserFormController.onSubmit(66) | entering 'onSubmit' method... DEBUG - UserManagerImpl.removeUser(112) | removing user: -2 DEBUG - AbstractTransactionalSpringContextTests.endTransaction(360) | Rolled back transaction after execution of test [testRemove]. Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 4.484 sec Running com.bowmansystems.util.DateConverterTest Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.031 sec Running com.bowmansystems.service.impl.UserSecurityAdviceTest WARN - UserSecurityAdvice.before(71) | Access Denied: 'user' tried to modify 'admin'! WARN - UserSecurityAdvice.before(92) | Access Denied: 'user' tried to change their role(s)! WARN - UserSecurityAdvice.before(92) | Access Denied: 'user' tried to change their role(s)! Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.266 sec Running com.bowmansystems.service.MailEngineTest Nov 11, 2010 12:31:06 PM net.sf.ehcache.CacheManager detectAndFixDiskStorePathConflict WARNING: Creating a new instance of CacheManager using the diskStorePath "C:\DOCUME~1\vpacheco\LOCALS~1\Temp\" which is already used by an existing CacheManager. The source of the configuration was classpath. The diskStore path for this CacheManager will be set to C:\DOCUME~1\vpacheco\LOCALS~1\Temp\\ehcache_auto_created_1289496666921. To avoid this warning consider using the CacheManager factory methods to create a singleton CacheManager or specifying a separate ehcache configuration (ehcache.xml) for each CacheManager instance. Nov 11, 2010 12:31:07 PM net.sf.ehcache.util.UpdateChecker doCheck INFO: New update(s) found: 2.3.0 [http://www.terracotta.org/confluence/display/release/Release+Notes+Ehcache+2.3.0] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.391 sec Running com.bowmansystems.service.UserManagerTest DEBUG - UserManagerTest.testGetUser(24) | com.bowmansystems.model.u...@1c9ce70[username=user,enabled=true,accountExpired=false,credentialsExpired=false,accountLocked=false,Granted Authorities: ,ROLE_USER] DEBUG - UserDaoHibernate.saveUser(49) | user's id: null DEBUG - UserManagerTest.testAddAndRemoveUser(54) | removing user... DEBUG - UserManagerImpl.removeUser(112) | removing user: 1 DEBUG - UserManagerTest.testAddAndRemoveUser(62) | org.springframework.security.userdetails.UsernameNotFoundException: user 'john' not found... DEBUG - UserManagerTest.testSaveUser(33) | saving user with updated phone number: com.bowmansystems.model.u...@130cb4b[username=user,enabled=true,accountExpired=false,credentialsExpired=false,accountLocked=false,Granted Authorities: ,ROLE_USER] DEBUG - UserDaoHibernate.saveUser(49) | user's id: -1 Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.921 sec Running com.bowmansystems.dao.LookupDaoTest Nov 11, 2010 12:31:10 PM net.sf.ehcache.CacheManager detectAndFixDiskStorePathConflict WARNING: Creating a new instance of CacheManager using the diskStorePath "C:\DOCUME~1\vpacheco\LOCALS~1\Temp\" which is already used by an existing CacheManager. The source of the configuration was classpath. The diskStore path for this CacheManager will be set to C:\DOCUME~1\vpacheco\LOCALS~1\Temp\\ehcache_auto_created_1289496670171. To avoid this warning consider using the CacheManager factory methods to create a singleton CacheManager or specifying a separate ehcache configuration (ehcache.xml) for each CacheManager instance. DEBUG - LookupDaoHibernate.getRoles(35) | Retrieving all role names... DEBUG - LookupDaoTest.testGetRoles(20) | [ROLE_ADMIN, ROLE_USER] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.36 sec Running com.bowmansystems.webapp.listener.StartupListenerTest Nov 11, 2010 12:31:10 PM net.sf.ehcache.CacheManager detectAndFixDiskStorePathConflict WARNING: Creating a new instance of CacheManager using the diskStorePath "C:\DOCUME~1\vpacheco\LOCALS~1\Temp\" which is already used by an existing CacheManager. The source of the configuration was classpath. The diskStore path for this CacheManager will be set to C:\DOCUME~1\vpacheco\LOCALS~1\Temp\\ehcache_auto_created_1289496670468. To avoid this warning consider using the CacheManager factory methods to create a singleton CacheManager or specifying a separate ehcache configuration (ehcache.xml) for each CacheManager instance. Nov 11, 2010 12:31:10 PM net.sf.ehcache.util.UpdateChecker doCheck INFO: New update(s) found: 2.3.0 [http://www.terracotta.org/confluence/display/release/Release+Notes+Ehcache+2.3.0] DEBUG - StartupListener.contextInitialized(40) | Initializing context... DEBUG - StartupListener.contextInitialized(76) | authenticationManager bean not found, assuming test and ignoring... DEBUG - StartupListener.contextInitialized(84) | Remember Me Enabled? null DEBUG - StartupListener.contextInitialized(88) | Populating drop-downs... DEBUG - LookupDaoHibernate.getRoles(35) | Retrieving all role names... DEBUG - StartupListener.setupContext(105) | Drop-down initialization complete [OK] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.469 sec Running com.bowmansystems.webapp.controller.UserControllerTest DEBUG - AbstractTransactionalSpringContextTests.startNewTransaction(392) | Began transaction (1): transaction manager [org.springframework.orm.hibernate3.hibernatetransactionmana...@75d758]; rollback [true]. DEBUG - AbstractTransactionalSpringContextTests.endTransaction(360) | Rolled back transaction after execution of test [testHandleRequest]. Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.078 sec <<< FAILURE! Running com.bowmansystems.dao.RoleDaoTest Nov 11, 2010 12:31:10 PM net.sf.ehcache.util.UpdateChecker doCheck INFO: New update(s) found: 2.3.0 [http://www.terracotta.org/confluence/display/release/Release+Notes+Ehcache+2.3.0] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.312 sec Running com.bowmansystems.webapp.controller.SignupControllerTest DEBUG - AbstractTransactionalSpringContextTests.startNewTransaction(392) | Began transaction (1): transaction manager [org.springframework.orm.hibernate3.hibernatetransactionmana...@75d758]; rollback [true]. DEBUG - AbstractFormController.showNewForm(337) | Displaying new form DEBUG - BaseCommandController.createCommand(362) | Creating new command of class [com.bowmansystems.model.User] DEBUG - AbstractTransactionalSpringContextTests.endTransaction(360) | Rolled back transaction after execution of test [testDisplayForm]. DEBUG - AbstractTransactionalSpringContextTests.startNewTransaction(392) | Began transaction (1): transaction manager [org.springframework.orm.hibernate3.hibernatetransactionmana...@75d758]; rollback [true]. DEBUG - BaseCommandController.createCommand(362) | Creating new command of class [com.bowmansystems.model.User] DEBUG - SimpleFormController.processFormSubmission(266) | No errors -> processing submit DEBUG - SignupController.onSubmit(40) | entering 'onSubmit' method... DEBUG - UserDaoHibernate.saveUser(49) | user's id: null DEBUG - SignupController.onSubmit(78) | Sending user 'self-registered' an account information e-mail DEBUG - BaseFormController.sendUserMessage(179) | sending e-mail to user [self-registe...@raibledesigns.com]... DEBUG - AbstractTransactionalSpringContextTests.endTransaction(360) | Rolled back transaction after execution of test [testSignupUser]. Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.906 sec Running com.bowmansystems.service.impl.LookupManagerImplTest DEBUG - LookupManagerImplTest.testGetAllRoles(28) | entered 'testGetAllRoles' method Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.032 sec Running com.bowmansystems.dao.hibernate.HibernateConfigurationTest DEBUG - HibernateConfigurationTest.testColumnMapping(25) | Trying select * from: com.bowmansystems.model.User DEBUG - HibernateConfigurationTest.testColumnMapping(28) | ok: com.bowmansystems.model.User DEBUG - HibernateConfigurationTest.testColumnMapping(25) | Trying select * from: com.bowmansystems.model.Role DEBUG - HibernateConfigurationTest.testColumnMapping(28) | ok: com.bowmansystems.model.Role Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.125 sec Running com.bowmansystems.webapp.filter.StaticFilterTest DEBUG - GenericFilterBean.init(157) | Initializing filter '' DEBUG - GenericFilterBean.init(182) | Filter '' configured successfully DEBUG - StaticFilter.doFilterInternal(89) | Forwarding to static resource: /scripts/dojo/test.html DEBUG - GenericFilterBean.init(157) | Initializing filter '' DEBUG - GenericFilterBean.init(182) | Filter '' configured successfully DEBUG - MockFilterChain.doFilter(37) | Forwarding to: /editProfile.html Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.015 sec Running com.bowmansystems.webapp.controller.PasswordHintControllerTest DEBUG - AbstractTransactionalSpringContextTests.startNewTransaction(392) | Began transaction (1): transaction manager [org.springframework.orm.hibernate3.hibernatetransactionmana...@75d758]; rollback [true]. DEBUG - PasswordHintController.handleRequest(57) | entering 'handleRequest' method... DEBUG - PasswordHintController.handleRequest(69) | Processing Password Hint... DEBUG - AbstractTransactionalSpringContextTests.endTransaction(360) | Rolled back transaction after execution of test [testExecute]. Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.797 sec Running com.bowmansystems.dao.GenericDaoTest Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.078 sec Running com.bowmansystems.dao.UserDaoTest WARN - GenericDaoHibernate.get(107) | Uh oh, 'class com.bowmansystems.model.User' object with id '1000' not found... DEBUG - UserDaoTest.testGetUserPassword(48) | password: 12dea96fec20593566ab75692c9949596833adc9 DEBUG - UserDaoHibernate.saveUser(49) | user's id: -1 DEBUG - UserDaoHibernate.saveUser(49) | user's id: null WARN - JDBCExceptionReporter.logExceptions(100) | SQL Error: 0, SQLState: 23505 ERROR - JDBCExceptionReporter.logExceptions(101) | Batch entry 0 insert into app_user (account_expired, account_locked, address, city, country, postal_code, province, credentials_expired, email, account_enabled, first_name, last_name, password, password_hint, phone_number, username, version, website, id) values ('0', '0', 'new address', 'Denver', 'US', '80210', 'CO', '0', 'matt_rai...@yahoo.com', '1', 'Tomcat', 'User', '12dea96fec20593566ab75692c9949596833adc9', 'A male kitty.', '', 'user', '2', 'http://tomcat.apache.org', '4') was aborted. Call getNextException to see the cause. WARN - JDBCExceptionReporter.logExceptions(100) | SQL Error: 0, SQLState: 23505 ERROR - JDBCExceptionReporter.logExceptions(101) | ERROR: duplicate key value violates unique constraint "app_user_email_key" ERROR - AbstractFlushingEventListener.performExecutions(324) | Could not synchronize database state with session org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:94) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:266) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:167) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1027) at org.springframework.orm.hibernate3.HibernateAccessor.flushIfNecessary(HibernateAccessor.java:390) at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:420) at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374) at org.springframework.orm.hibernate3.HibernateTemplate.saveOrUpdate(HibernateTemplate.java:748) at com.bowmansystems.dao.hibernate.UserDaoHibernate.saveUser(UserDaoHibernate.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:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:138) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy41.saveUser(Unknown Source) at com.bowmansystems.dao.UserDaoTest.testUpdateUser(UserDaoTest.java:71) 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.springframework.test.context.junit4.SpringTestMethod.invoke(SpringTestMethod.java:160) at org.springframework.test.context.junit4.SpringMethodRoadie.runTestMethod(SpringMethodRoadie.java:233) at org.springframework.test.context.junit4.SpringMethodRoadie$RunBeforesThenTestThenAfters.run(SpringMethodRoadie.java:333) at org.springframework.test.context.junit4.SpringMethodRoadie.runWithRepetitions(SpringMethodRoadie.java:217) at org.springframework.test.context.junit4.SpringMethodRoadie.runTest(SpringMethodRoadie.java:197) at org.springframework.test.context.junit4.SpringMethodRoadie.run(SpringMethodRoadie.java:143) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.invokeTestMethod(SpringJUnit4ClassRunner.java:160) at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51) at org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44) at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27) at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37) at org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:97) at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127) at org.apache.maven.surefire.Surefire.run(Surefire.java:177) 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.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345) at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009) Caused by: java.sql.BatchUpdateException: Batch entry 0 insert into app_user (account_expired, account_locked, address, city, country, postal_code, province, credentials_expired, email, account_enabled, first_name, last_name, password, password_hint, phone_number, username, version, website, id) values ('0', '0', 'new address', 'Denver', 'US', '80210', 'CO', '0', 'matt_rai...@yahoo.com', '1', 'Tomcat', 'User', '12dea96fec20593566ab75692c9949596833adc9', 'A male kitty.', '', 'user', '2', 'http://tomcat.apache.org', '4') was aborted. Call getNextException to see the cause. at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2Statement.java:2569) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1796) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:407) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2708) at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268) ... 49 more DEBUG - UserDaoHibernate.saveUser(49) | user's id: -1 DEBUG - UserDaoHibernate.saveUser(49) | user's id: -1 DEBUG - UserDaoHibernate.saveUser(49) | user's id: -1 DEBUG - UserDaoHibernate.saveUser(49) | user's id: null WARN - GenericDaoHibernate.get(107) | Uh oh, 'class com.bowmansystems.model.User' object with id '5' not found... DEBUG - UserDaoHibernate.saveUser(49) | user's id: -2 Tests run: 9, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.86 sec Running com.bowmansystems.service.UserExistsExceptionTest Nov 11, 2010 12:31:16 PM net.sf.ehcache.CacheManager detectAndFixDiskStorePathConflict WARNING: Creating a new instance of CacheManager using the diskStorePath "C:\DOCUME~1\vpacheco\LOCALS~1\Temp\" which is already used by an existing CacheManager. The source of the configuration was classpath. The diskStore path for this CacheManager will be set to C:\DOCUME~1\vpacheco\LOCALS~1\Temp\\ehcache_auto_created_1289496676125. To avoid this warning consider using the CacheManager factory methods to create a singleton CacheManager or specifying a separate ehcache configuration (ehcache.xml) for each CacheManager instance. DEBUG - UserExistsExceptionTest.testAddExistingUser(26) | entered 'testAddExistingUser' method DEBUG - UserDaoHibernate.saveUser(49) | user's id: null WARN - JDBCExceptionReporter.logExceptions(100) | SQL Error: 0, SQLState: 23505 ERROR - JDBCExceptionReporter.logExceptions(101) | Batch entry 0 insert into app_user (account_expired, account_locked, address, city, country, postal_code, province, credentials_expired, email, account_enabled, first_name, last_name, password, password_hint, phone_number, username, version, website, id) values ('0', '0', 'new address', 'Denver', 'US', '80210', 'CO', '0', 'matt_rai...@yahoo.com', '1', 'Tomcat', 'User', '77886a1e559b68d65e4da22518b119212b8c0372', 'A male kitty.', '', 'user', '0', 'http://tomcat.apache.org', '6') was aborted. Call getNextException to see the cause. WARN - JDBCExceptionReporter.logExceptions(100) | SQL Error: 0, SQLState: 23505 ERROR - JDBCExceptionReporter.logExceptions(101) | ERROR: duplicate key value violates unique constraint "app_user_email_key" ERROR - AbstractFlushingEventListener.performExecutions(324) | Could not synchronize database state with session org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:94) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:275) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:266) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:167) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:321) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:50) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1027) at org.springframework.orm.hibernate3.HibernateTemplate$28.doInHibernate(HibernateTemplate.java:892) at org.springframework.orm.hibernate3.HibernateTemplate.doExecute(HibernateTemplate.java:419) at org.springframework.orm.hibernate3.HibernateTemplate.executeWithNativeSession(HibernateTemplate.java:374) at org.springframework.orm.hibernate3.HibernateTemplate.flush(HibernateTemplate.java:890) at com.bowmansystems.dao.hibernate.UserDaoHibernate.saveUser(UserDaoHibernate.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:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:138) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy41.saveUser(Unknown Source) at com.bowmansystems.service.impl.UserManagerImpl.saveUser(UserManagerImpl.java:96) 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.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.adapter.AfterReturningAdviceInterceptor.invoke(AfterReturningAdviceInterceptor.java:50) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.adapter.MethodBeforeAdviceInterceptor.invoke(MethodBeforeAdviceInterceptor.java:50) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy42.saveUser(Unknown Source) at com.bowmansystems.service.UserExistsExceptionTest.testAddExistingUser(UserExistsExceptionTest.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:597) at org.springframework.test.context.junit4.SpringTestMethod.invoke(SpringTestMethod.java:160) at org.springframework.test.context.junit4.SpringMethodRoadie.runTestMethod(SpringMethodRoadie.java:233) at org.springframework.test.context.junit4.SpringMethodRoadie$RunBeforesThenTestThenAfters.run(SpringMethodRoadie.java:333) at org.springframework.test.context.junit4.SpringMethodRoadie.runWithRepetitions(SpringMethodRoadie.java:217) at org.springframework.test.context.junit4.SpringMethodRoadie.runTest(SpringMethodRoadie.java:197) at org.springframework.test.context.junit4.SpringMethodRoadie.run(SpringMethodRoadie.java:143) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.invokeTestMethod(SpringJUnit4ClassRunner.java:160) at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51) at org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44) at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27) at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37) at org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:97) at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127) at org.apache.maven.surefire.Surefire.run(Surefire.java:177) 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.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345) at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009) Caused by: java.sql.BatchUpdateException: Batch entry 0 insert into app_user (account_expired, account_locked, address, city, country, postal_code, province, credentials_expired, email, account_enabled, first_name, last_name, password, password_hint, phone_number, username, version, website, id) values ('0', '0', 'new address', 'Denver', 'US', '80210', 'CO', '0', 'matt_rai...@yahoo.com', '1', 'Tomcat', 'User', '77886a1e559b68d65e4da22518b119212b8c0372', 'A male kitty.', '', 'user', '0', 'http://tomcat.apache.org', '6') was aborted. Call getNextException to see the cause. at org.postgresql.jdbc2.AbstractJdbc2Statement$BatchResultHandler.handleError(AbstractJdbc2Statement.java:2569) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1796) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:407) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc2Statement.java:2708) at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:70) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:268) ... 69 more WARN - UserManagerImpl.saveUser(99) | Could not execute JDBC batch update; nested exception is org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.359 sec Running com.bowmansystems.util.DateUtilTest DEBUG - DateUtilTest.testGetDate(44) | db date to convert: Thu Nov 11 12:31:16 EST 2010 DEBUG - DateUtilTest.testGetDate(50) | converted ui date: 11/11/2010 DEBUG - DateUtilTest.testGetDateTime(58) | entered 'testGetDateTime' method DEBUG - DateUtilTest.testGetDateTime(62) | 12:31 Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.016 sec Results : Tests in error: testHandleRequest(com.bowmansystems.webapp.controller.UserControllerTest) Tests run: 64, Failures: 0, Errors: 1, Skipped: 0 [INFO] ------------------------------------------------------------------------ [ERROR] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] There are test failures. Please refer to C:\Source\SyncPt\target\surefire-reports for the individual test results. [INFO] ------------------------------------------------------------------------ [INFO] Trace org.apache.maven.BuildFailureException: There are test failures. Please refer to C:\Source\SyncPt\target\surefire-reports for the individual test results. at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:715) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138) at org.apache.maven.cli.MavenCli.main(MavenCli.java:362) at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60) 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.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: org.apache.maven.plugin.MojoFailureException: There are test failures. Please refer to C:\Source\SyncPt\target\surefire-reports for the individual test results. at org.apache.maven.plugin.surefire.SurefirePlugin.execute(SurefirePlugin.java:575) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694) ... 17 more [INFO] ------------------------------------------------------------------------ [INFO] Total time: 23 seconds [INFO] Finished at: Thu Nov 11 12:31:16 EST 2010 [INFO] Final Memory: 29M/70M [INFO] ------------------------------------------------------------------------
--------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@appfuse.dev.java.net For additional commands, e-mail: users-h...@appfuse.dev.java.net