ok, test passed :)

thanks
-Quan



On Sun, Nov 22, 2009 at 2:39 AM, mraible [via AppFuse]
<ml-node+687607-443633...@n4.nabble.com> wrote:
> Adding @Autowired to your personDao should solve this problem. You'll also
> need a @Test annotation on your test method. I've updated the tutorial to
> reflect this.
>
> Matt
>
> On Sat, Nov 21, 2009 at 9:36 AM, QuanNH <[hidden email]> wrote:
>>
>> hi
>>
>> i follow this tut http://appfuse.org/display/APF/Using+Hibernate and get
>> error when Run the DAO Test:
>>
>> Running com.mycompany.dao.PersonDaoTest
>> Tests run: 2, Failures: 0, Errors: 2, Skipped: 0
>>
>> testFindPersonByLastName(com.mycompany.dao.PersonDaoTest)  Time elapsed:
>> 0.356 sec  <<< ERROR!
>> java.lang.NullPointerException
>>        at
>>
>> com.mycompany.dao.PersonDaoTest.testFindPersonByLastName(PersonDaoTest.java:23)
>>  line 23: List<Person> people = personDao.findByLastName("Raible");
>>
>> Testcase: testAddAndRemovePerson(com.mycompany.dao.PersonDaoTest):
>> Caused an ERROR
>> null
>> java.lang.NullPointerException
>>        at
>>
>> com.mycompany.dao.PersonDaoTest.testAddAndRemovePerson(PersonDaoTest.java:32)
>>  line 32: person = personDao.save(person);
>>
>> sample_data has push to database.
>>
>> i dont know how to fix this error
>>
>> please help me
>>
>> Thanks
>>
>> --
>> View this message in context:
>> http://n4.nabble.com/error-NullPointerException-when-using-hibernate-tp680382p680382.html
>> Sent from the AppFuse - User mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>
>
>
>
> ________________________________
> View message @
> http://n4.nabble.com/error-NullPointerException-when-using-hibernate-tp680382p687607.html
> To unsubscribe from error: NullPointerException when using hibernate, click
> here.
>

-- 
View this message in context: 
http://n4.nabble.com/error-NullPointerException-when-using-hibernate-tp680382p758636.html
Sent from the AppFuse - User mailing list archive at Nabble.com.

Reply via email to