The problem seems to be resolved in last versions of org.apache.commons.lang3. I used v. 3.18. It works ok with OSGi. Previous v. 2.6 throws org.apache.commons.lang.SerializationException: java.lang.ClassNotFoundException.