The problem had nothing to do with JAXB or Spring, it was oracle queue's type. Its type was SYS.AQ$_JMS_MESSAGE
which can receive messages only of type VARCHAR2
, which maximum equivalent in java is 500 symbols String
. When String
size exceeded 500 symbols, null was enqueued.
The solution was to change AQ's type to SYS.XMLTYPE
(this type of queue can receive XML's up to 4GB). Of course, message sending method had to be modified. Before sending, String
which was XML had to be converted to XMLType
.