If you run "mvn package" in your project and refresh it in Eclipse,
you should be able to run your JUnit tests.

Matt

On 5/17/07, Will Berger <[EMAIL PROTECTED]> wrote:

I am having the same problem,  when I reference sessionFactory in my dao
definition in the applicationContext.xml the junit tests fail.

Anyone know why this is the case?

Will


wnqq wrote:
>
> Have anyone successfully executed junit tests in eclipse?
>
> My environment:
> * Appfuse v2.0M4 + struts + hibernate
> * eclipse v3.2.1
>
> I can successfully run PersonManagerTest, however, I am unable to finish
> the tests of PersonDaoTest nor PersonActionTest.
> The steps I did are: right click on PersonDao/ActionTest.java => Run As =>
> JUnit Test
>
> The error message while running PersonDaoTest is as follows:
>
> ==========================================================
>
> org.springframework.beans.factory.BeanDefinitionStoreException: Error
> registering bean with name 'sessionFactory' defined in URL
> 
[jar:file:/C:/Res/Platform/.m2/repository/org/appfuse/appfuse-hibernate/2.0-m4/appfuse-hibernate-2.0-m4.jar!/applicationContext-dao.xml]:
> Circular placeholder reference 'hibernate.dialect' in property definitions
>       at
> 
org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.processProperties(PropertyPlaceholderConfigurer.java:249)
>       at
> 
org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:75)
>       at
> 
org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:422)
>       at
> 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:334)
>       at
> 
org.springframework.test.AbstractSingleSpringContextTests.createApplicationContext(AbstractSingleSpringContextTests.java:199)
>       at
> 
org.springframework.test.AbstractSingleSpringContextTests.loadContextLocations(AbstractSingleSpringContextTests.java:179)
>       at
> 
org.springframework.test.AbstractSingleSpringContextTests.loadContext(AbstractSingleSpringContextTests.java:158)
>       at
> 
org.springframework.test.AbstractSpringContextTests.getContext(AbstractSpringContextTests.java:105)
>       at
> 
org.springframework.test.AbstractSingleSpringContextTests.setUp(AbstractSingleSpringContextTests.java:87)
>       at junit.framework.TestCase.runBare(TestCase.java:128)
>       at
> 
org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:69)
>       at junit.framework.TestResult$1.protect(TestResult.java:106)
>       at junit.framework.TestResult.runProtected(TestResult.java:124)
>       at junit.framework.TestResult.run(TestResult.java:109)
>       at junit.framework.TestCase.run(TestCase.java:120)
>       at junit.framework.TestSuite.runTest(TestSuite.java:230)
>       at junit.framework.TestSuite.run(TestSuite.java:225)
>       at
> 
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
>       at
> org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
>       at
> 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
>       at
> 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
>       at
> 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
>       at
> 
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
>
> ==========================================================
>
> Any hints?
>

--
View this message in context: 
http://www.nabble.com/execute-junit-tests-in-eclipse-tf3504799s2369.html#a10675952
Sent from the AppFuse - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




--
http://raibledesigns.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to