JAXB on domino

I’m developing a Java agent which is using JAXB.If my jaxb annotated classes are placed in lib/ext on domino server it works fine. But if I place them directly in the agent it doesn’t work anymore. The unmarshalling process returns object structure like in XML but with no values.

Does anyone have any idea what’s going on?