Open issues

java.lang.AbstractMethodError/ClassCastException when creating integration test for osgi using felix and PaxRunner Framework
PAXRUNNER-443
Pax Runner takes 5 minutes to start - looking for scm.ops4j.org.
PAXRUNNER-437
Unable to provision bundles to Equinox with Pax Runner 1.7.5
PAXRUNNER-405
Bundles won't start when provisioned from zip file.
PAXRUNNER-438
Support for Equinox 3.13.200
PAXRUNNER-456
Jar contains ops4j artifacts, causes java.lang.AbstractMethodError in pax-runner
PAXRUNNER-450
Update to Pax-URL 1.6.0 with support of mvn:[repositoryURL !]
PAXRUNNER-439
Resolve OSGi Framework Links offline for HTTP protocol
PAXRUNNER-433
fails to build with org.apache.felix.framework 4.0.2
PAXRUNNER-417
Cannot launch several pax runner daemons with the same user because of hardcoded path of org.ops4j.pax.runner.daemon.lock file
PAXRUNNER-416
pax-runner-no-jcl v1.7.6 includes a REALLY old version of Felix
PAXRUNNER-415
Improvements on pax runner eclipse ui
PAXRUNNER-413
Add JBoss OSGi Framework
PAXRUNNER-403
Load-time-weaving support in equinox
PAXRUNNER-401
Script download not available
PAXRUNNER-400
Add option to change overwrite arguments preference
PAXRUNNER-391
Split pax-runner module in two artifact one for osgi standelone minial impl and one to start osgi framework
PAXRUNNER-390
Change Equinox artifacts to be loaded from Eclipse Maven repo
PAXRUNNER-386
Change Knopflerfish artifacts to be loaded from KF Maven repo
PAXRUNNER-385
com.sun packages not visible
PAXRUNNER-383
Use enforcer to ensure dependency version converge to one version
PAXRUNNER-382
Update to Pax Scanner 1.2.0
PAXRUNNER-381
different behavior of bundles loaded from repo (profile) or provided bundle directory
PAXRUNNER-356
Eclipse plugin broken on Eclipse 3.6 (Helios)
PAXRUNNER-353
Missing plugin dependency: org.eclipse.pde.api.tools
PAXRUNNER-346
PaxRunner can only be executed one time - org.ops4j.pax.scanner.ScannerException: Could not parse the provision file
PAXRUNNER-345
support for properties as versions of dependencies in pom
PAXRUNNER-344
Pax Runner unable to download Maven artifacts when settings.xml uses properties for repository URLs
PAXRUNNER-342
Update Pax runner eclipse plugin for Felix 2.05
PAXRUNNER-340
repositories with an scpexe-url are not handled well
PAXRUNNER-337
PAX DAEMON : pax-rund.sh --startd doses not work in absence of /runner directory
PAXRUNNER-335
PAX DAEMON : pax-rund.sh --startd run failure with vmOptions
PAXRUNNER-334
Latest Equinox not accessible in maven repo
PAXRUNNER-333
java.lang.Enum dependency in pax-runner_1.4.0 for jdk1.4
PAXRUNNER-330
Allow to run exploded bundles if the container supports it
PAXRUNNER-328
Frameworks loaded by the --snapshot option are broken or outdated
PAXRUNNER-322
Add support for DynamicJava's Servlet Bridge
PAXRUNNER-269
Add Papoose OSGi platform
PAXRUNNER-252
Felix does not set System properties out of framework properties
PAXRUNNER-229
Pax Runner Eclipse Plugin - Update site unavailable (?)
PAXRUNNER-440
pax-runner with pax:provision
PAXRUNNER-432
The run.sh script output from --executor=zip should use "exec java" instead of "java" to support capturing the java pid.
PAXRUNNER-402
Bring Pax Runner Eclipse Plugin back to work
PAXRUNNER-373
Cannot run on cygwin environnement under window
PAXRUNNER-364
Executor to generate a java service wrapper
PAXRUNNER-290
Pax Runner should provide handles to the started OSGi framework
PAXRUNNER-288
"Pax Runner" launch configuration tab should be placed after "Bundles" tab
PAXRUNNER-282
Inter-process way to check the on bundle status
PAXRUNNER-264
Use multithreading to improve performance
PAXRUNNER-261
Add support for adding Maven artifacts via Pax Runner Tab
PAXRUNNER-260
issue 1 of 65

java.lang.AbstractMethodError/ClassCastException when creating integration test for osgi using felix and PaxRunner Framework

Description

I am trying to create integration test for my bundle. basically I want to mimic the setup I have in normal web app project(wherein the test are in src/test folder)

I am almost there except that I have exception when the bundle tries to activate

*native container exception*

Running com.grundfos.wcm.impl.HelloWorldServiceImplIntegrationTest
Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.196 sec <<< FAILURE! - in com.grundfos.wcm.impl.HelloWorldServiceImplIntegrationTest
whenSuppliedNullNameThenThrowException(com.grundfos.wcm.impl.HelloWorldServiceImplIntegrationTest) Time elapsed: 0.792 sec <<< ERROR!
java.lang.AbstractMethodError: org.apache.felix.framework.BundleImpl.adapt(Ljava/lang/ClassLjava/lang/Object; at org.ops4j.pax.exam.nat.internal.NativeTestContainer.installAndStartBundles(NativeTestContainer.java:311)
at org.ops4j.pax.exam.nat.internal.NativeTestContainer.start(NativeTestContainer.java:177)
at org.ops4j.pax.exam.spi.reactors.AllConfinedStagedReactor.invoke(AllConfinedStagedReactor.java:79)
at org.ops4j.pax.exam.junit.impl.ProbeRunner$2.evaluate(ProbeRunner.java:264)
at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.ops4j.pax.exam.junit.impl.ProbeRunner.run(ProbeRunner.java:98)
at org.ops4j.pax.exam.junit.PaxExam.run(PaxExam.java:93)
at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264)
at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153)
at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124)
at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)

*forked container exception*

java.lang.ClassCastException: org.ops4j.pax.exam.inject.internal.Activator cannot be cast to org.osgi.framework.BundleActivator
at org.apache.felix.framework.Felix.createBundleActivator(Felix.java:3814)
at org.apache.felix.framework.Felix.activateBundle(Felix.java:1899)
at org.apache.felix.framework.Felix.startBundle(Felix.java:1822)
at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1192)
at org.apache.felix.framework.StartLevelImpl.run(StartLevelImpl.java:266)
at java.lang.Thread.run(Thread.java:745)
java.lang.ClassCastException: org.ops4j.pax.exam.raw.extender.intern.Activator cannot be cast to org.osgi.framework.BundleActivator

Can someone expert help me with my problem? I am at the end of my ropes already

Sample Project(If the project file does not work just tell me):

git clone git@bitbucket.org:aldrintingson/cq-training.git

commands:

mvn clean verify

Fix propsed:
1. Make sure that org.osgi.core has a provided scope

in the parent project it is provided already, plus i tried explicitly specifying it in pom.xml of the bundle(core folder) and still no avail.

2. Create a package first of the project then bundle then add it to bundles during the Configuration phase

did the following steps:

a. uncommented out this line of code in HelloWorldServiceImplIntegrationTest.java
//bundle("file:target/cq-training-core-1.0-SNAPSHOT.jar"),

b. mvn clean package -DskipTests
c. mvn verify

same error

Thanks

Environment

JDK 1.7 64bit, windows 7 64bit

Status

Assignee

Toni Menzel

Reporter

Aldrin Tingson

Labels

Priority

Blocker
Configure