With simple unit tests you do not use the process classloader from the database, but the normal classloader. Since the custom exception is on the latter it works. Afaik (but I'm not sure) jBPM only supports loading actionhandlers from the processclassloader and not all other classes.
The 'solution' is to not put the Exception in the processarchive but on another (web/ear/system/...) classpath
I guess you are right, but this make me a little bit confusing.
Putting Action and exception-handler inside the Process Archive give me an easy (and already built) way for managing versioning (I'm thinking about point 18.2.2 in http://docs.jboss.org/jbpm/v3/userguide/jpdl.html#delegation ).
Does it means that i can version Action but i can't version exception-handler?
You can version the exception-handler class, but not the exception class.