After fixing 2 more things in the test case, I got it to run. The two things were: the descriptor at the top level of the installed pear, uimaj-pear-forTesting_pear.xml, had \ which I changed to /. The second was that the entry in the installed PEAR for setting the CLASSPATH env var ended with a semicolon; I removed the semicolon. These changes will need to be back-tested on Windows to make sure nothing broke there :-)
I think the semicolon is put there by the pear packager, which ran on Windows; perhaps it was trying to handle the case where there was more than one entry in the class path and hard-coding the Windows class path separator. This will take a bit more investigation to verify the root issue, and how to fix it. My linux testing environment had become unusable, so I had to spend most of yesterday upgrading it, installing the right version of Eclipse (need one which can do plug-in development in order to build UIMA), getting maven to build UIMA on this platform, etc. etc. On top of all this, the computer that I use for this is starting to require multiple reboots per day due to hangs - something involved with switching displays when going from docked to undocked... So that delayed resolution of this... more later. -Marshall Jörn Kottmann wrote: >> Hi Joern - do you think this is just a case of using "backslashes" >> instead of forward slashes? If it's easy for you to test, can see if >> switching this "fixes" the problem? > > Sure, I replaced the backslashes with slashes and now I got another > exception. > Just give me a note, I can test for you again. > > Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.007 sec > Running org.apache.uima.collection.impl.cpm.PearCasPoolTest > org.apache.uima.resource.ResourceInitializationException: > Initialization of CAS Processor with name "ErrorTestAnnotator" failed. > at > org.apache.uima.collection.impl.CollectionProcessingEngine_impl.initialize(CollectionProcessingEngine_impl.java:83) > > at > org.apache.uima.impl.UIMAFramework_impl._produceCollectionProcessingEngine(UIMAFramework_impl.java:395) > > at > org.apache.uima.UIMAFramework.produceCollectionProcessingEngine(UIMAFramework.java:865) > > at > org.apache.uima.collection.impl.cpm.PearCasPoolTest.setupCpm(PearCasPoolTest.java:166) > > at > org.apache.uima.collection.impl.cpm.PearCasPoolTest.core(PearCasPoolTest.java:91) > > at > org.apache.uima.collection.impl.cpm.PearCasPoolTest.testCasPool(PearCasPoolTest.java:72) > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > > at java.lang.reflect.Method.invoke(Method.java:597) > at junit.framework.TestCase.runTest(TestCase.java:154) > at junit.framework.TestCase.runBare(TestCase.java:127) > 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 junit.framework.TestSuite.runTest(TestSuite.java:208) > at junit.framework.TestSuite.run(TestSuite.java:203) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > > at java.lang.reflect.Method.invoke(Method.java:597) > at > org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:213) > > at > org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:138) > > at > org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:125) > > at org.apache.maven.surefire.Surefire.run(Surefire.java:132) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > > at java.lang.reflect.Method.invoke(Method.java:597) > at > org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:290) > > at > org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:818) > > Caused by: org.apache.uima.resource.ResourceConfigurationException: > Initialization of CAS Processor with name "ErrorTestAnnotator" failed. > at > org.apache.uima.collection.impl.cpm.container.CPEFactory.produceIntegratedCasProcessor(CPEFactory.java:1104) > > at > org.apache.uima.collection.impl.cpm.container.CPEFactory.getCasProcessors(CPEFactory.java:550) > > at > org.apache.uima.collection.impl.cpm.BaseCPMImpl.init(BaseCPMImpl.java:253) > > at > org.apache.uima.collection.impl.cpm.BaseCPMImpl.<init>(BaseCPMImpl.java:127) > > at > org.apache.uima.collection.impl.CollectionProcessingEngine_impl.initialize(CollectionProcessingEngine_impl.java:75) > > ... 31 more > Caused by: org.apache.uima.resource.ResourceInitializationException: > Error initializing > "org.apache.uima.analysis_engine.impl.PearAnalysisEngineWrapper" from > descriptor > file:/home/joern/Documents/uima-dev/uimaj-cpe/target/test-classes/pearTests/installedSimpleTokenPear/uimaj-pear-forTesting/uimaj-pear-forTesting_pear.xml. > > at > org.apache.uima.util.SimpleResourceFactory.produceResource(SimpleResourceFactory.java:143) > > at > org.apache.uima.impl.CompositeResourceFactory_impl.produceResource(CompositeResourceFactory_impl.java:62) > > at > org.apache.uima.UIMAFramework.produceResource(UIMAFramework.java:258) > at > org.apache.uima.UIMAFramework.produceAnalysisEngine(UIMAFramework.java:352) > > at > org.apache.uima.analysis_engine.asb.impl.ASB_impl.setup(ASB_impl.java:243) > > at > org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initASB(AggregateAnalysisEngine_impl.java:413) > > at > org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initializeAggregateAnalysisEngine(AggregateAnalysisEngine_impl.java:361) > > at > org.apache.uima.analysis_engine.impl.AggregateAnalysisEngine_impl.initialize(AggregateAnalysisEngine_impl.java:183) > > at > org.apache.uima.impl.AnalysisEngineFactory_impl.produceResource(AnalysisEngineFactory_impl.java:94) > > at > org.apache.uima.impl.CompositeResourceFactory_impl.produceResource(CompositeResourceFactory_impl.java:62) > > at > org.apache.uima.UIMAFramework.produceResource(UIMAFramework.java:258) > at > org.apache.uima.UIMAFramework.produceResource(UIMAFramework.java:303) > at > org.apache.uima.UIMAFramework.produceAnalysisEngine(UIMAFramework.java:383) > > at > org.apache.uima.collection.impl.cpm.container.CPEFactory.produceIntegratedCasProcessor(CPEFactory.java:1088) > > ... 35 more > Caused by: org.apache.uima.resource.ResourceInitializationException: > Annotator class > "org.apache.uima.test.pear.tokenizer.SimpleTokenAndSentenceAnnotator" > was not found. (Descriptor: > file:/home/joern/Documents/uima-dev/uimaj-cpe/src/test/resources/pearTests/installedSimpleTokenPear/uimaj-pear-forTesting/desc/SimpleTokenAndSentenceAnnotator.xml) > > at > org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.initializeAnalysisComponent(PrimitiveAnalysisEngine_impl.java:202) > > at > org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.initialize(PrimitiveAnalysisEngine_impl.java:151) > > at > org.apache.uima.impl.AnalysisEngineFactory_impl.produceResource(AnalysisEngineFactory_impl.java:94) > > at > org.apache.uima.impl.CompositeResourceFactory_impl.produceResource(CompositeResourceFactory_impl.java:62) > > at > org.apache.uima.UIMAFramework.produceResource(UIMAFramework.java:258) > at > org.apache.uima.UIMAFramework.produceResource(UIMAFramework.java:303) > at > org.apache.uima.UIMAFramework.produceAnalysisEngine(UIMAFramework.java:383) > > at > org.apache.uima.analysis_engine.impl.PearAnalysisEngineWrapper.initialize(PearAnalysisEngineWrapper.java:215) > > at > org.apache.uima.util.SimpleResourceFactory.produceResource(SimpleResourceFactory.java:122) > > ... 48 more > Caused by: java.lang.ClassNotFoundException: > org.apache.uima.test.pear.tokenizer.SimpleTokenAndSentenceAnnotator > at java.net.URLClassLoader$1.run(URLClassLoader.java:200) > at java.security.AccessController.doPrivileged(Native Method) > at java.net.URLClassLoader.findClass(URLClassLoader.java:188) > at java.lang.ClassLoader.loadClass(ClassLoader.java:306) > at > org.apache.uima.internal.util.UIMAClassLoader.loadClass(UIMAClassLoader.java:150) > > at java.lang.ClassLoader.loadClass(ClassLoader.java:251) > at > org.apache.uima.analysis_engine.impl.PrimitiveAnalysisEngine_impl.initializeAnalysisComponent(PrimitiveAnalysisEngine_impl.java:196) > > ... 56 more > Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.095 > sec <<< FAILURE! > > Jörn
