6 Replies Latest reply on Sep 28, 2010 4:18 AM by prossman

    Problems with initializing a pax-exam-based JUnit test

    prossman

      Hi,

       

      following the instructions given on http://fusesource.com/docs/esb/4.2/deploy_osgi/BestPractices-PaxExam.html, I implemented a simple JUnit test (see attachment).

       

      However, when I run it, I get an IllegalArgumentException ("URI is not hierarchical") originating from the call to Helper.getDefaultOptions(). In particular, the method MavenUtils.getFileFromClasspath() throws this exception when creating a new file from a URL ("return new File( fileURL.toURI() );"). The URL in question is:

      file:/D:/Dev/.m2/repository/org/apache/servicemix/servicemix-shared/2010.01.0-fuse-02-00/servicemix-shared-2010.01.0-fuse-02-00.jar!/META-INF/maven/dependencies.properties

       

       

      I've been looking for unit tests using pax-exam in the sources but couldn't find any. Any ideas what I might be doing wrong?

       

      I'm using Fuse 4.2.0-fuse-02-00, Pax-Exam 1.2.1 and JDK 1.5.0_12. POMs for parent and actual project are attached.

       

      Any help would be highly appreciated,

      Ciao, Philipp