Hi,

I'm trying to create integration tests for the akka project (https://github.com/akka/akka/pull/589) with Pax Exam. However I got stuck. I will post the three options I tried and the errors I get in each.

A more readable version of this mail can be found here: https://gist.github.com/4007904

You can try this on your own, pulling this repository: https://github.com/muuki88/akka and run:
> sbt
> test-only akka.osgi.test.LocalActorTest

OSGi 4.2 is required. If you want to retry, comment in/out the mentioned values mentioned.
paxExamVersion = "3.0.0.M4"
felix = "org.apache.felix" % "org.apache.felix.framework" % "4.0.3" % "test" // ApacheV2 equinox = "org.eclipse.tycho" % "org.eclipse.osgi" % "3.8.1.v20120830-144521" % "test" // EPL

Dependencies:
val paxExamUnit = "org.ops4j.pax.exam" % "pax-exam-junit4" % paxExamVersion % "test" val paxExamSpi = "org.ops4j.pax.exam" % "pax-exam-spi" % paxExamVersion % "test" val paxInject = "org.ops4j.pax.exam" % "pax-exam-inject" % paxExamVersion % "test" val paxLinkAssembly = "org.ops4j.pax.exam" % "pax-exam-link-assembly" % paxExamVersion % "test" val paxExamForge = "org.ops4j.pax.exam" % "pax-exam-testforge" % paxExamVersion % "test" val paxExamMvn = "org.ops4j.pax.exam" % "pax-exam-link-mvn" % paxExamVersion % "test" val paxAether = "org.ops4j.pax.url" % "pax-url-aether" % "1.5.0" % "test"

1.

val paxExamRunner = "org.ops4j.pax.exam" % "pax-exam-container-native" % paxExamVersion % "test"

1.1 Native container with equinox and pax-runner-no-jcl

# Config #

val osgiTests = Seq(osgiCore, slf4jApi, Test.scalatest, Test.junit, Test.paxExamUnit , Test.paxLinkAssembly, Test.paxExamSpi, Test.paxInject, Test.paxExamRunner, Test.paxNoJcl, Test.paxExamForge, Test.paxExamMvn, Test.paxAether, Test.javaxInject, Test.equinox )

# Error #
Cause: java.lang.SecurityException: class "org.osgi.framework.hooks.service.EventListenerHook"'s signer information does not match signer information of other classes in the same package
 at java.lang.ClassLoader.checkCerts(ClassLoader.java:943)


1.2 Native container with felix and pax-runner-no-jcl

# Config #
val osgiTests = Seq(osgiCore, slf4jApi, Test.scalatest, Test.junit, Test.paxExamUnit , Test.paxLinkAssembly, Test.paxExamSpi, Test.paxInject, Test.paxExamRunner, Test.paxNoJcl, Test.paxExamForge, Test.paxExamMvn, Test.paxAether, Test.javaxInject, Test.felix )

# Error #
testActorSystem:akka.osgi.test.LocalActorTest.testActorSystem:Native:FrameworkFactory *** FAILED *** java.lang.NoSuchMethodError: org.apache.felix.framework.Felix.<init>(Ljava/util/Map;)V

1.3 Native container with equinox and no pax-runner-no-jcl

# Config #
val osgiTests = Seq(osgiCore, slf4jApi, Test.scalatest, Test.junit, Test.paxExamUnit , Test.paxLinkAssembly, Test.paxExamSpi, Test.paxInject, Test.paxExamRunner, /*Test.paxNoJcl,*/ Test.paxExamForge, Test.paxExamMvn, Test.paxAether, Test.javaxInject, Test.equinox )

# Error #
Cause: java.lang.SecurityException: class "org.osgi.framework.hooks.service.EventListenerHook"'s signer information does not match signer information of other classes in the same package
at java.lang.ClassLoader.checkCerts(ClassLoader.java:943)


1.4 Native container with felix and no pax-runner-no-jcl

# Config #
val osgiTests = Seq(osgiCore, slf4jApi, Test.scalatest, Test.junit, Test.paxExamUnit , Test.paxLinkAssembly, Test.paxExamSpi, Test.paxInject, Test.paxExamRunner, /*Test.paxNoJcl,*/ Test.paxExamForge, Test.paxExamMvn, Test.paxAether, Test.javaxInject, Test.felix )

# Error #
 
testActorSystem:akka.osgi.test.LocalActorTest.testActorSystem:Native:FrameworkFactory
 *** FAILED ***
java.lang.NoSuchMethodError: org.apache.felix.framework.util.Util.getDefaultProperty(Lorg/apache/felix/framework/Logger;Ljava/lang/String;)Ljava/lang/String;

2.
val paxExamRunner = "org.ops4j.pax.exam" % "pax-exam-container-forked" % paxExamVersion % "test"

2.1 Forked container with equinox and pax-runner-no-jcl

# Config #
val osgiTests = Seq(osgiCore, slf4jApi, Test.scalatest, Test.junit, Test.paxExamUnit , Test.paxLinkAssembly, Test.paxExamSpi, Test.paxInject, Test.paxExamRunner, Test.paxNoJcl, Test.paxExamForge, Test.paxExamMvn, Test.paxAether, Test.javaxInject, Test.equinox )

# Error #
testActorSystem:akka.osgi.test.LocalActorTest.testActorSystem:Forked:EquinoxFactory *** FAILED ***
[info]   java.net.MalformedURLException: unknown protocol: link

all other configurations produce same error.

3. Paxrunner container
paxExamVersion = "2.5.0"

With no-jcl
# Error #
testActorSystem:akka.osgi.test.LocalActorTest.testActorSystem:PaxRunnerTestContainer{felix} *** FAILED *** [info] java.lang.NoSuchMethodError: org.apache.felix.framework.ServiceRegistry.<init>(Lorg/apache/felix/framework/Logger;)V

Without no-jcl
- initializationError *** FAILED ***
java.lang.NoClassDefFoundError: org/ops4j/pax/runner/platform/JavaRunner
at org.ops4j.pax.exam.container.def.internal.PaxRunnerTestContainerFactory.create(PaxRunnerTestContainerFactory.java:58)



cheers,
Muki

--
Nepomuk Seiler
Java/Scala Developer
*Email:* nepomuk.sei...@mukis.de
*Homepage:* www.mukis.de
*Github:* github/muuki88
*Twitter:* twitter/muuki88
_______________________________________________
general mailing list
general@lists.ops4j.org
http://lists.ops4j.org/mailman/listinfo/general

Reply via email to