[mule-user] Test MULE with JUnit

3 views
Skip to first unread message

Mikael Schulz

unread,
Nov 9, 2010, 8:44:17 AM11/9/10
to us...@mule.codehaus.org
Hello,
I have a problem. Maybe someone could help? I'am running MULE 2.2.1 from a JUnit-test in Eclipse. Here is the snippet that fails:

public class TestClass extends FunctionalTestCase {

@Override
protected String getConfigResources() {
return "config1.xml,common-config.xml";
}
}

I got the following error:

2010-11-09 13:53:47,664 ERROR [main] [org.mule.config.spring.SpringXmlConfigurationBuilder] - Configuration with "org.mule.config.spring.SpringXmlConfigurationBuilder" failed.
org.mule.api.lifecycle.InitialisationException: Initialisation Failure: Configuration problem: Failed to import bean definitions from relative location [common-config.xml]
Offending resource: URL [file:/C:/project/config1.xml]; nested exception is org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate NamespaceHandler for namespace [http://www.mulesource.org/schema/mule/vm/2.2]
Offending resource: URL [file:/C:/project/common-config.xml]
at org.mule.registry.AbstractRegistry.initialise(AbstractRegistry.java:76)
at org.mule.config.spring.SpringXmlConfigurationBuilder.createSpringRegistry(SpringXmlConfigurationBuilder.java:98)
at org.mule.config.spring.SpringXmlConfigurationBuilder.doConfigure(SpringXmlConfigurationBuilder.java:69)
at org.mule.config.builders.AbstractConfigurationBuilder.configure(AbstractConfigurationBuilder.java:39)
at org.mule.config.builders.AbstractResourceConfigurationBuilder.configure(AbstractResourceConfigurationBuilder.java:78)
at org.mule.context.DefaultMuleContextFactory.createMuleContext(DefaultMuleContextFactory.java:79)
at org.mule.tck.AbstractMuleTestCase.createMuleContext(AbstractMuleTestCase.java:410)
at org.mule.tck.AbstractMuleTestCase.setUp(AbstractMuleTestCase.java:379)
at junit.framework.TestCase.runBare(TestCase.java:125)
at org.mule.tck.AbstractMuleTestCase.runBare(AbstractMuleTestCase.java:255)
at junit.framework.TestResult$1.protect(TestResult.java:106)
at junit.framework.TestResult.runProtected(TestResult.java:124)
at junit.framework.TestResult.run(TestResult.java:109)
at junit.framework.TestCase.run(TestCase.java:118)
at org.mule.tck.AbstractMuleTestCase.run(AbstractMuleTestCase.java:235)
at junit.framework.TestSuite.runTest(TestSuite.java:208)
at junit.framework.TestSuite.run(TestSuite.java:203)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)


I'am able to run MULE with these config-files from the command-line.

Thanks in advance
Mikael

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

http://xircles.codehaus.org/manage_email


Mikael Schulz

unread,
Nov 9, 2010, 9:32:18 AM11/9/10
to us...@mule.codehaus.org
Hello again!
I figured out that I have to include the mule-transport-vm-2.2.1.jar in the classpath.

/Mikael

Reply all
Reply to author
Forward
0 new messages