thanks matt...that definantly got it. Here is the final syntax. I included
the WEB-INF directory and that was incorrect. Here is what my spring
subpublic class ScenarioDAOFileImplTest extends
AbstractSingleSpringContextTests
{
public ScenarioDAOFileImplTest(String testName)
{
super(testName);
}
protected String[] getConfigLocations()
{
String[] retCode = {
"classpath:/WEB-INF/applicationContext.xml","classpath*:/applicationContext-dao.xml","classpath:/applicationContext-resources.xml","classpath*:/applicationContext-dao.xml"};
return retCode;
} class looked liked when i finally got it working.
mraible wrote:
>
> If looks like you need a comma between your last two paths. Also, it
> should be "classpath*:/applicationContext-dao.xml" for
> appfuse-hibernate.
>
> Matt
>
> On 5/18/07, Will Berger <[EMAIL PROTECTED]> wrote:
>>
>> It appears we deriving from a spring class.
>>
>> public class ScenarioDAOFileImplTest extends
>> AbstractSingleSpringContextTests
>>
>>
>>
>> String[] retCode = {
>>
>> "classpath:/WEB-INF/applicationContext.xml","classpath:/applicationContext-resources.xml"};
>>
>> does this need to become
>>
>> protected String[] getConfigLocations()
>> {
>> String[] retCode = {
>>
>> "classpath:/WEB-INF/applicationContext.xml","classpath:/WEB-INF/applicationContext-doa.xml""classpath:/applicationContext-resources.xml"};
>> return retCode;
>> }
>>
>> Will
>>
>>
>> mraible wrote:
>> >
>> > Are you extending one of AppFuse's TestCase classes, or are you
>> > writing your own? If your own, what path are you using to load
>> > applicationContext-dao.xml? It should be the same one that's used in
>> > web.xml and the Base*TestCase classes.
>> >
>> > Matt
>> >
>> > On 5/18/07, Will Berger <[EMAIL PROTECTED]> wrote:
>> >>
>> >> Matt, I am not having an issue with eclipse, but rather, I am using
>> the
>> >> sessionFactory in one of my dao it is referenced in my bean defn in
>> muy
>> >> web-inf/applicationContext.xml. When I run the appserver(jetty)
>> without
>> >> the
>> >> unit test, apparently the appfuse-hibernate.jar that contains the
>> >> seesionfactory bean defn resolves and it works fine, if I run the
>> junit
>> >> test from the command line using maven, the tests fail because it
>> can't
>> >> find
>> >> the bean defn for the sessionfactory.
>> >>
>> >> I tried the mvn package. Didnlt help.
>> >>
>> >> Any help much appreciated.
>> >>
>> >> Will
>> >>
>> >>
>> >> mraible wrote:
>> >> >
>> >> > 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
>> >> > B> >
>> >> >
>> >>
>> 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]
>> >> >
>> >> >
>> >> >
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/execute-junit-tests-in-eclipse-tf3504799s2369.html#a10680288
>> >> 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]
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/execute-junit-tests-in-eclipse-tf3504799s2369.html#a10683506
>> 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]
>
>
>
--
View this message in context:
http://www.nabble.com/execute-junit-tests-in-eclipse-tf3504799s2369.html#a10700409
Sent from the AppFuse - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]