Fixed it by setting the class name to the property "classesToBeBound" of the JAXB marshaller:
<bean id="jaxbMarshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshaller">
<property name="classesToBeBound">
<list>
<value>myclass</value>
</list>
</property>
</bean>