Hello everybody,
I've stuck with this issue today.
I used Junit4.4 in the classpath and run the test from Ant. It works well in my Windows Environment. But It got errors in the Linux Environment.
please help me, thank you very much for any inputs!
Code:Testsuite: org.openarchnet.util.metadata.xmp.TestXMPParser Tests run: 1, Failures: 0, Errors: 1, Time elapsed: 0.003 sec Testcase: initializationError0 took 0.001 sec Caused an ERROR org.junit.internal.runners.MethodValidator.<init>(Lorg/junit/internal/runners/TestClass;)V at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.<init>(SpringJUnit4ClassRunner.java:75) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
Code:import java.io.File; import java.io.StringReader; import java.util.ArrayList; import java.util.List; import java.util.Map; import junit.framework.Assert; import org.apache.commons.io.FileUtils; import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.openarchnet.global.config.service.GPSConfigService; import org.openarchnet.global.config.service.OaGlobalConfigService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.xml.sax.InputSource; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations={"/applicationContext.xml"}) public class TestXMPParser{ private static String imageDir; static { imageDir = System.getProperty("imgbasedir"); } @Autowired private GPSConfigService gpsConfigService; @Autowired private OaGlobalConfigService oaGlobalConfigService; @Autowired private XMP2OAProsessor xmp2OAProsessor;


Reply With Quote