Frank,
I too am getting this error now (Appfuse 2.0.1, Hibernate and Struts2).
I've added logging and it seems the populate method is reading my properties
file correctly, but not mapping to the object correctly.
Here's my properties file:
# This is a ResourceBundle for Tests run by StoryDaoTest
#boolean
privateStory=1
#String
title=Test Story for Unit Test of DAO
#boolean
useCustomMaxEntries=true
#Integer
maxEntries=100
#int
minWordsPerEntry=3
Note, I've commented the property types above each property.
Here's the logging output:
DEBUG - BaseDaoTestCase.populate(75) | rb.key=privateStory, rb.string='1'
DEBUG - BaseDaoTestCase.populate(75) | rb.key=title, rb.string='Test Story
for Unit Test of DAO'
DEBUG - BaseDaoTestCase.populate(75) | rb.key=minWordsPerEntry,
rb.string='3'
DEBUG - BaseDaoTestCase.populate(75) | rb.key=maxEntries, rb.string='100'
DEBUG - BaseDaoTestCase.populate(75) | rb.key=useCustomMaxEntries,
rb.string='true'
DEBUG - BaseDaoTestCase.populate(80) | map='{privateStory=1, title=Test
Story for Unit Test of DAO, minWordsPerEntry=3, maxEntries=100,
useCustomMaxEntries=true}'
DEBUG - BaseDaoTestCase.populate(81) | before
obj='Story[privateStory=false,title=<null>,useCustomMaxEntries=false,maxEntries=<null>,minWordsPerEntry=0]'
DEBUG - BaseDaoTestCase.populate(83) | after
obj='Story[privateStory=false,title=<null>,useCustomMaxEntries=false,maxEntries=<null>,minWordsPerEntry=0]'
DEBUG - StoryDaoTest.testAddAndRemoveStory(65) | AFTER populate
story='Story[privateStory=false,title=<null>,useCustomMaxEntries=false,maxEntries=<null>,minWordsPerEntry=0]'
I also noticed that the populate methods in BaseDaoTestCase and
BaseManagerTestCase are different. BaseDaoTestCase iterates through the
resource bundle to build the map, BaseManagerTestCase uses
"ConvertUtil.convertBundleToMap(rb)" to do the same. I substituted the
ConvertUtil.convertBundleToMap(rb) in BaseDaoTestCase but it made no
difference.
Hope this helps understand the problem. Any ideas are appreciated.
--
View this message in context:
http://www.nabble.com/Bean-population-in-BaseDaoTestCase-%28Hibernate%29-tp16046539s2369p16149296.html
Sent from the AppFuse - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]