Forum Discussion

Entersekt_Suppo's avatar
Entersekt_Suppo
Occasional Contributor
12 years ago

LoadUI custom plugin: JVM and classloader

Dear support team,

I have a SoapUI pro license.
After porting my custom plugins from SoapUI (that work) to LoadUI I encountered problems with the JVM.

I make use of Java's JAXB interface to marshall and un-marshall data within my plugin.
However, when loaded to the LoadUI container, I encounter the following:

09:22:22,227 ERROR [AbstractTestRunner] Exception during Test Execution
java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException
at com.qualitykernel.soapui.entersekt.extension.execution.EntersektCommand$RequestCommand$RequestCommandBuilder.build(EntersektCommand.java:338)


It seems as if LoadUI does not load all the classes from its packaged JRE runtime library.
I've attempted to circumvent this by packaging the plugin with a corresponding JAXB api and implementation,
but then I run into other problems (an internal Java class not having access to a particular superclass, which throws an IllegalAccessError).

Could someone please explain to me how the LoadUI JVM container is different from SoapUI's container.
How can I access standard Java classes like JAXB from LoadUI ?
Is this a defect or perhaps an intended feature for distributed load testing ?

Thank you,
- michael

3 Replies

  • Please include any required jars in the LoadUI ext folder and restart LoadUI.

    The difference between SoapUI and LoadUI's JRE is actually the fact that LoadUI uses OSGi, which restricts which classes can be used and loaded by LoadUI.

    To allow all OSGi bundles within LoadUI to see specific packages (all classes within them) you need to add those packages to the org.osgi.framework.system.packages.extra property, inside the conf/config.properties file with your LoadUI directory. For details on how this file works, see the OSGi Felix documentation.

    Renato
    SmartBear Software
  • Entersekt_Suppo's avatar
    Entersekt_Suppo
    Occasional Contributor
    Fantastic, thanks !
    I will give the OSGi config a go and give you guys an update on my progress ...
  • Hoobajoob's avatar
    Hoobajoob
    Occasional Contributor
    Did you ever get this to work? As far as I can tell, the javax.xml.binding.* packages aren't among the available osgi packages.

    If I edit the config.properties file to include the javax.xml.bind.* packages (without the wildcard), I still get NoClassDef exceptions.

    If I drop the older jaxb jars into the LoadUI ext directory, I get serialization errors that don't occur with the standard jre 6 and later java installs.