TopLink and Jenkins

Today was chasing down a problem with the TopLink on Jenkins

Caused by: java.lang.AssertionError
    at oracle.toplink.essentials.ejb.cmp3.persistence.PersistenceUnitProcessor.computePURootURL(PersistenceUnitProcessor.java:248)

Tests worked fine on the localhost but were failing on Jenkins. The persistence.xml is correct, mvn -X displayed that all dependencies are in place. I was almost in desperation when I noticed that my Jenkins job name contains spaces: “Application. Deployment”.

For some unclear reason TopLink has problems with the spaces. At least on a pretty old version we use for the project. So I’ve stopped Jenkins, renamed folders in .jenkins/workspace and .jenkins/jobs to remove spaces and voilà – everything works.

As usual: several hours to figure out the reason of the problem and 5 minutes to fix it.