Forum Discussion

Hoobajoob's avatar
Hoobajoob
Occasional Contributor
12 years ago

Anybody able to get LoadUI groovy scripts to use JAXB?

The OSGi jre on which LoadUI is based appears to be incompatible with JAXB, circa Java 6. In various different SoapUI test cases I'm trying to run from LoadUI I have different groovy scripts using a jar that uses JAXB under the covers. These test cases run without error in SoapUI, but fail miserably in LoadUI.

I haven't yet been able to find any combination of JAXB jars to copy into LoadUI's ext directory that will enable these scripts to run error-free in LoadUI.

I have also tried fiddling with conf/config.properties settings, but OSGi does not provide any of the jaxb packages as far as I can tell, so there's no way I've found to get LoadUI to load them from its jre distribution.

The exceptions in LoadUI are like so:

com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 24 counts of IllegalAnnotationExceptions
XmlType has not defined a factory method for Factory class ""javax.xml.bind.annotation.XmlType$DEFAULT"".
this problem is related to the following location:
at com.be.impl.jaxb.rendition.RequestType
at public javax.xml.bind.JAXBElement com.be.impl.jaxb.rendition.ObjectFactory.createRequest(com.be.impl.jaxb.rendition.RequestType)
at com.be.impl.jaxb.rendition.ObjectFactory

I know there is absolutely nothing wrong with the JAXB generated classes that are used by this api - they've been in production use in various different environments for more than a year.

If anyone has any idea how to configure LoadUI to work with Jre 6 JAXB, please post details!

2 Replies

  • sbrey's avatar
    sbrey
    Occasional Contributor
    Hi, please have a look at issue: LoadUI and SoapUi don't use the same groovy lib version.
    Seems to be the same reason for your problem.
  • Hoobajoob's avatar
    Hoobajoob
    Occasional Contributor
    Yes, I read that thread and can see that the groovy libs are different between the products. That knowledge does not help resolve my problem on my system. Furthermore, that thread is referencing a newer version of the products than the one I am using.

    The thread closest to my question is the one titled "LoadUI custom plugin: JVM and classloader", to which I posted a question asking if the OP ever got it to work on their system. Nobody responded to my question on that thread, so I started this thread. So far, I have not found any information on this forum that describes how this can be made to work.