When you use the "Maven > Update Source Folders", the 
http://m2eclipse.codehaus.org/ m2eclipse  plugin bundled with 
http://candy4appfuse.sourceforge.net Candy  tries to set the eclipse build
path exactly as the maven classpath.

You should review the eclipse Build Path for the project and make sure that
every config file and generated classes that needs to be in the Classpath
during tests is included in the Project Build Path in Eclipse.

Hope it helps!


arief wrote:
> 
> Thanks Matt, I have tried them.. first running the "mvn resources..." but
> failed. Then I replaced the jdbc.properties with the actual values.. and
> still not working.
> 
> Then, i tried to create the project using the mvn create new project from
> archtype (not from candy4appfuse that i used before) and still not
> working. Lastly, i used the maven command from the eclipse "Maven > Update
> Source Folders". and it did something with my workspace. And i'm able to
> get rid of the
> "org.springframework.beans.factory.NoSuchBeanDefinitionException:...." but
> encounter another error :(
> 
> The stack trace is:
> org.springframework.beans.factory.UnsatisfiedDependencyException: Error
> creating bean with name 'com.xyz.dao.FellowDaoTest': Unsatisfied
> dependency expressed through bean property 'fellowDao': Set this property
> value or disable dependency checking for this bean.
> 
> According to your tutorial ( http://appfuse.org/display/APF/Using+iBATIS
> Using iBatis ), 
> 
> 
>> This is an error message from Spring - indicating that you need to
>> specify a bean named "personDao" in a Spring context file. Before you do
>> that, you need to create the PersonDao implementation.
>> 
> 
> Actually I did create that implementation class and my
> applicationContext.xml is as follows:
>               <bean id="fellowDao" class="com.xyz.dao.ibatis.FellowDaoiBatis">
>                   <property name="dataSource" ref="dataSource"/>
>                   <property name="sqlMapClient" ref="sqlMapClient"/>
>               </bean>
> 
> So, now I'm clueless :(
> Please advice.
> Thanks
> 
> 
> mraible wrote:
>> 
>> If you run "mvn resources:testResources", you should be able to
>> refresh your project in Eclipse and run tests. The reason for this is
>> jdbc.properties needs to be parsed and replaced with the proper values
>> from your pom.xml.
>> 
>> If that doesn't work for you, you can make jdbc.properties your source
>> of information for pom.xml. I'd like to do everything to make testing
>> as easy as possible, so it's possible this is a better solution
>> anyway.
>> 
>> Matt
>> 
>> On 8/6/07, arief <[EMAIL PROTECTED]> wrote:
>>>
>>> Hi,
>>>
>>> Anybody able to run junit test in eclipse?
>>> my environment:
>>> - appfuse 2.0 rc1
>>> - struts 2.0.9
>>> - ibatis with oracle9
>>>
>>> I'm a newbie on appfuse. Tried following the tutorial. I could build it
>>> using "mvn test" but if i could do run test inside eclipse, that would
>>> be
>>> great.
>>>
>>> my eclipse stack trace is as follows:
>>>
>>> org.springframework.beans.factory.BeanCreationException: Error creating
>>> bean
>>> with name 'transactionManager' defined in URL
>>> [jar:file:/D:/xxx/Maven-Repo/repository/org/appfuse/appfuse-ibatis/2.0-rc1-SNAPSHOT/appfuse-ibatis-2.0-rc1-SNAPSHOT.jar!/applicationContext-dao.xml]:
>>> Cannot resolve reference to bean 'dataSource' while setting bean
>>> property
>>> 'dataSource'; nested exception is
>>> org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean
>>> named 'dataSource' is defined
>>> Caused by:
>>> org.springframework.beans.factory.NoSuchBeanDefinitionException:
>>> No bean named 'dataSource' is defined
>>>         at
>>> org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanDefinition(DefaultListableBeanFactory.java:356)
>>>         at
>>> org.springframework.beans.factory.support.AbstractBeanFactory.getMergedBeanDefinition(AbstractBeanFactory.java:916)
>>>         at
>>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:243)
>>>         at
>>> org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
>>>         at
>>> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:261)
>>>         at
>>> org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:109)
>>>         at
>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1099)
>>>         at
>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:861)
>>>         at
>>> org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireC....
>>>
>>> I have copied the application-dao.xml into my own folder. Not sure if
>>> that
>>> causes this problem.
>>> Any kind help is very much appreciated.
>>>
>>> Thanks
>> 
> 
> 

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

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

Reply via email to