Search code examples
ibm-cloudwebsphere-liberty

Bluemix - jaxb jar


My application uses jaxb jar (jaxb-impl-2.2.1.1.jar)from apache wink. I deployed my application on bluemix.

When it accesses com.sun.xml.bind.marshaller.CharacterEscapeHandler it fails with NoClassDefFoundError on bluemix.

Does bluemix use some other version of this jar which does not have this class? How can I check this?


Solution

  • Enable jaxb-2.2 feature:

    cf set-env <appname> JBP_CONFIG_LIBERTY "app_archive: {features: ["jsf-2.0", "jsp-2.2", "servlet-3.0", "ejbLite-3.1", "cdi-1.0", "jpa-2.0", "jdbc-4.0", "jndi-1.0", "managedBeans-1.0", "jaxrs-1.1", "jaxb-2.2"]}"

    You can also try using OpenJDK

    cf set-env myapp JVM 'openjdk'