Pax-Exam - J8 - How to include javax.activation on the classpath?

195 views
Skip to first unread message

Dutch Dude

unread,
Jan 17, 2019, 8:59:11 PM1/17/19
to OPS4J
Hi,

This seems like a simple problem, but I am banging my head agains the wall for two days now and I can't figure it out.

I am trying to write an integration test with commons-email, which depends on javax.activation...

    systemPackages("javax.activation", "com.sun.*"),

...
    mavenBundle("javax.activation", "javax.activation-api", "1.2.0"),

    mavenBundle("com.sun.mail", "javax.mail", "1.5.6"),

    mavenBundle("org.apache.commons", "commons-email", "1.5"),

    mavenBundle("com.sun.activation", "jakarta.activation", "1.2.1"),


I keep getting this error though:
    [RMI TCP Connection(1)-127.0.0.1] ERROR my.impl - [MyServiceImpl(0)] Error during instantiation of the implementation object
    java.lang.NoClassDefFoundError: javax/activation/DataSource
at java.lang.Class.getDeclaredConstructors0(Native Method)
   ...

If I add javax.activation to the Import-Packes the runtime fails because the class cannot be instantiated. I assume because of some interface conflict but I don't know that for sure.

It must be something obvious, but I don't see it (anymore). 

Any help or insight is greatly appreciated.


Pax-Exam: tried versions: 4.10.0 and 4.13.1
Java 1.8.0_92


Kind Regards,

Dutch.

Dutch Dude

unread,
Jan 17, 2019, 10:24:38 PM1/17/19
to OPS4J
Please Ignore. The problem was in the bundle Imports. No need for systemPackages.

Cheers,

Dutch.
Reply all
Reply to author
Forward
0 new messages