Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Hudson » Classpath in Hudson
Classpath in Hudson [message #1234064] Tue, 21 January 2014 01:39 Go to next message
nandan jain is currently offline nandan jain
Messages: 1
Registered: January 2014
Junior Member
Hi,
I have set of Integration test cases which are using spring JUnit class runner @RunWith(SpringJUnit4ClassRunner.class). I have referred applicationContext.xml and other required xml files using @ContextConfiguration annotation.

@ContextConfiguration(locations = { "classpath:spring/components/framework-context-integrationTest.xml",
"classpath:spring/components/bi-connector-context.xml",
"classpath:spring/components/dataservices-context.xml",
"classpath:spring/components/service-context.xml",
"classpath:spring/resources/pojo/aci-data-sources-def.xml" })

I have executed these test cases and they are running file on my local machine. The problem is when I execute these test cases using Hudson they don't run and throw exception

Caused by: org.springframework.beans.factory.BeanInitializationException: Could not load properties; nested exception is java.io.FileNotFoundException: class path resource [spring/components/framework-context-integrationTest.xml] cannot be opened because it does not exist

On local machine I have set class path before execute the test case but on Hudson somehow classpath is not being set. I tried setting classpath in 'Set environment variables' of Configure Job of Hudson but nothing worked.

Please can someone explain how do I set classpath so that a job can read it.

Thanks
Re: Classpath in Hudson [message #1284991 is a reply to message #1234064] Fri, 04 April 2014 23:31 Go to previous message
Winston Prakash is currently offline Winston Prakash
Messages: 393
Registered: August 2011
Location: Fremont, CA USA
Senior Member
What kind of build script are you using. If you are using maven, then the dependencies will be correctly resolved and you can specify the classpath in the sure-fire plugin properties

Winston Prakash
Eclipse Hudson team
Previous Topic:hudson job failing
Next Topic:Migration to 3.0 - security problem
Goto Forum:
  


Current Time: Fri Aug 01 01:55:52 EDT 2014

Powered by FUDForum. Page generated in 0.05438 seconds