continuum-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "VanIngen, Erik (FIES)" <Erik.VanIn...@fao.org>
Subject RE: @RunWith(SpringJUnit4ClassRunner.class) NoSuchMethodError
Date Fri, 21 Aug 2009 07:19:27 GMT
I tried to come up with a more isolated testcase but it did not gave the
errors... Therefore the original failing class:




package org.fao.fishstat.sdmx.formaliser;

import org.jdom.Document;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import static org.junit.Assert.*;

@RunWith(SpringJUnit4ClassRunner.class)
//@ContextConfiguration(locations = { "/applicationContext-test.xml" })
@ContextConfiguration

public class FormalisationProcessDsdTest {

	FormalisationProcessDsd formalisationProcessDsd;
	Step4Dsd step4Dsd;

	@Test
	public final void testExecuteProcess() {
		Document document = formalisationProcessDsd.executeProcess();
		UtilityXsd utilityXsd = new UtilityXsd();
//		assertFalse(utilityXsd.getFile().exists());
		step4Dsd.document2File(document, utilityXsd.getFile());
		assertTrue(utilityXsd.getFile().exists());
		assertTrue(utilityXsd.getFile().delete());
	}

	@Autowired
	public void setFormalisationProces(FormalisationProcessDsd
formalisationProcessDssdd) {
		this.formalisationProcessDsd = formalisationProcessDssdd;
	}

	@Autowired
	public final void setStep4Dsd(Step4Dsd step4Dsd) {
		this.step4Dsd = step4Dsd;
	}

}









-----Original Message-----
From: Paul Davis [mailto:pauledavis@gmail.com] 
Sent: 20 August 2009 18:06
To: users@continuum.apache.org
Subject: Re: @RunWith(SpringJUnit4ClassRunner.class) NoSuchMethodError


Could you post a sample (minimal) test?

I use @RunWith(SpringJUnit4ClassRunner.class) quite a bit and haven't had any
issues (both with standalone Maven and using Continuum to drive Maven)

I'd be interested in helping to find a fix.

-Paul

On Thu, Aug 20, 2009 at 2:37 AM, VanIngen, Erik (FIES) <
Erik.VanIngen@fao.org> wrote:

> It does also not run on Maven outside Continuum. Which makes this a 
> Maven issue, not a Continuum issue...
>
> Linux: 
> erik@Ubuntu-810-intrepid-64-minimal:~/projects/openfigis/fishstat-sdmx
> $
> mvn
> --version
> Apache Maven 2.2.1 (r801777; 2009-08-06 21:16:01+0200)
> Java version: 1.6.0_10
> Java home: /usr/lib/jvm/java-6-sun-1.6.0.10/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "linux" version: "2.6.27-11-server" arch: "amd64" Family: "unix"
>
> Windows XP:
> D:\workspaces\galileo\fishstat-sdmx>mvn --version 
> D:\workspaces\galileo\fishstat-sdmx>SET MAVEN_OPTS=-Xms256m -Xmx1400m 
> Apache Maven 2.1.0 (r755702; 2009-03-18 20:10:27+0100) Java version: 
> 1.6.0_13 Java home: C:\Program Files\Java\jdk1.6.0_13\jre
> Default locale: en_GB, platform encoding: Cp1252
> OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"
> D:\workspaces\galileo\fishstat-sdmx>
>
>
>
> -----Original Message-----
> From: Brett Porter [mailto:brett@porterclan.net] On Behalf Of Brett 
> Porter
> Sent: 19 August 2009 22:39
> To: users@continuum.apache.org
> Subject: Re: @RunWith(SpringJUnit4ClassRunner.class) NoSuchMethodError
>
>
> Does it run with Maven outside of Continuum?
>
> On 19/08/2009, at 10:51 AM, VanIngen, Erik (FIES) wrote:
>
> >
> >
> > Running my Spring unit test on Continuum give errors. Any idea how 
> > to solve this?
> >
> > Running the same test in eclipse or on the prompt runs without 
> > problems.
> >
> > More info: http://forum.springsource.org/showthread.php?t=76434
> >
>
>

Mime
View raw message