I'm able to run the junit test inside eclipse now.. that is using appfuse-2.0-RC1 created using commandline. Followed the guidelines given on how to use appfuse with eclipse.
Maybe Abel was right, that i need to configure the .classpath file correctly so that everything can be resolved perfectly by eclipse-junit. But i'm not sure how to do that in Candy. Since it is working fine now, maybe i'll wait for the next version of Candy. Furthermore, it seems that i couldn't fetch the appfuse-2.0-RC1 using it (create new project)... is it because of the changes of archetype folder? or .. maybe due to my eclipse :( Anyway, thanks for all your help :) Great work guys. Cheers arief wrote: > > Yes, I could run the "mvn test". All test ran successfully. > Initially, i used Candy4Appfuse. But now, the project that created just > now is not using candy. And it still showing me that error. > > After googling around, several result came out and one of it answered by > Rod ( http://forum.springframework.org/showthread.php?t=16198 found here > ). > > >> Make the target an inner bean. That is, make the contents of the "target" >> property value a bean definition rather than a reference. >> > > Not sure, if the answer really fits to my situation right now. > Furthermore, I didn't know how to implement that in my context :D. > Maybe, I just need to stick with "mvn test" after all. > > Thanks Matt > > > mraible wrote: >> >> Can you run your tests from the command line using "mvn test"? If so, >> then it's probably an Eclipse issue. If you're using Candy4AppFuse, it >> may be related to that as well. >> >> Matt >> >> On 8/8/07, arief <[EMAIL PROTECTED]> 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#a12058705 >>> >>> 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#a12526767 Sent from the AppFuse - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]