Hi,
I just retry my build with latest snapshot from hudson (#398) and it seems to work again.

thanks,
René



RenŽé Gröschke schrieb:
Hi Adam,
I'm using spring version 2.5.1.

cheers,
René



Adam Murdoch schrieb:

Hi,

Which version of spring are you using?

On 12/02/10 4:03 PM, Ren?é Gröschke wrote:
Hi Adam,
enclosed the test report including the stacktrace:

<?xml version="1.0" encoding="UTF-8" ?>
<testsuite errors="1" failures="0" hostname="rene-groschkes-macbook-pro.local" name="tinyProject.service.SpringStartupTest" tests="1" time="0.11" timestamp="2010-02-11T20:45:32">
<properties />
<testcase classname="tinyProject.service.SpringStartupTest" name="initializationError0" time="0.011"> <error message="IOException parsing XML document from class path resource [applicationContext.xml]; nested exception is java.io.FileNotFoundException: class path resource [applicationContext.xml] cannot be opened because it does not exist" type="org.springframework.beans.factory.BeanDefinitionStoreException">org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from class path resource [applicationContext.xml]; nested exception is java.io.FileNotFoundException: class path resource [applicationContext.xml] cannot be opened because it does not exist at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:334) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:295) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:143) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:178) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:149) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:212) at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:112) at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:79) at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:97) at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:411) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:338) at org.springframework.context.support.ClassPathXmlApplicationContext.&lt;init&gt;(ClassPathXmlApplicationContext.java:123) at org.springframework.context.support.ClassPathXmlApplicationContext.&lt;init&gt;(ClassPathXmlApplicationContext.java:76) at org.gienah.testing.junit.ContextLoader.loadContext(ContextLoader.java:27) at org.gienah.testing.junit.CacheProvider.registerTestContext(CacheProvider.java:104) at org.gienah.testing.junit.CacheProvider.getContext(CacheProvider.java:54) at org.gienah.testing.junit.CacheProvider.getTestDefinition(CacheProvider.java:72) at org.gienah.testing.junit.SpringRunner$SpringTestClassMethodsRunner.&lt;init&gt;(SpringRunner.java:163) at org.gienah.testing.junit.SpringRunner$SpringCompositeRunner.&lt;init&gt;(SpringRunner.java:141) at org.gienah.testing.junit.SpringRunner.&lt;init&gt;(SpringRunner.java:53)
   at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
   at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at org.gradle.api.internal.tasks.testing.junit.AntJUnitTestClassProcessor.processTestClass(AntJUnitTestClassProcessor.java:76) at org.gradle.api.testing.execution.fork.TestWorker.processTestClass(TestWorker.java:66) at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:31) at org.gradle.messaging.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:22) at org.gradle.messaging.dispatch.MethodInvocationUnmarshallingDispatch.dispatch(MethodInvocationUnmarshallingDispatch.java:45) at org.gradle.messaging.dispatch.MethodInvocationUnmarshallingDispatch.dispatch(MethodInvocationUnmarshallingDispatch.java:22) at org.gradle.messaging.dispatch.DiscardOnFailureDispatch.dispatch(DiscardOnFailureDispatch.java:31) at org.gradle.messaging.dispatch.AsyncDispatch.dispatchMessages(AsyncDispatch.java:194) at org.gradle.messaging.dispatch.AsyncDispatch.access$200(AsyncDispatch.java:34) at org.gradle.messaging.dispatch.AsyncDispatch$2.run(AsyncDispatch.java:84) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
   at java.lang.Thread.run(Thread.java:637)
Caused by: java.io.FileNotFoundException: class path resource [applicationContext.xml] cannot be opened because it does not exist at org.springframework.core.io.ClassPathResource.getInputStream(ClassPathResource.java:142) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:321)
</error>
</testcase>
<system-out><![CDATA[]]></system-out>
<system-err><![CDATA[]]></system-err>
</testsuite>


Adam Murdoch schrieb:


On 11/02/10 10:40 PM, Rene Groeschke wrote:
Hi guys,
I'm trying to migrate a tiny project build to gradle and have issues with
resolving test resources. Actually I have two eclipse projects
'TinyProject' and 'TinyProjectTests'. As expected, the TinyProject
contains productive code and TinyProjectTests the junit tests for the
project. In my build script located in the TinyProject folder I configured
my sourcesets in the following way:

...
sourceSets.main.java.srcDirs = ['src']
sourceSets.main.resources.srcDirs = ['config']
sourceSets.test.java.srcDirs = ['../TinyProjectTests/src']
sourceSets.test.resources.srcDirs = ['../TinyProjectTests/src']
...

When running the a test like the following one

@RunWith(value = SpringRunner.class)
@Configuration(locations = {"applicationContext.xml"})
public class SpringStartupTest{
...
}

I get a FileNotFoundException for 'applicationContext.xml'. The file is
located in ../TinyProjectTests/src and also (as expected) in
TinyProject/build/classes/test.

Could you send in the stack trace for the FileNotFoundException?









--
------------------------------------
Rene Groeschke

[email protected]
http://www.breskeby.com
http://twitter.com/breskeby
------------------------------------


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to