ClassCastException while importing messages from a hornetq-journal file.
Issue
When executing the HornetQ importer tool, the following exception is thrown. The problem is triggered by queues with ID > max Integer. These IDs cause the ClassCastExceptions.
Examples
queue id 2147483667 - ClassCastException
queue id 54 - Ok
queue id 2147483673 - ClassCastException
java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer
at org.hornetq.jms.persistence.impl.journal.XmlDataImporter.sendMessage(XmlDataImporter.java:389)
at org.hornetq.jms.persistence.impl.journal.XmlDataImporter.processMessage(XmlDataImporter.java:329)
at org.hornetq.jms.persistence.impl.journal.XmlDataImporter.processXml(XmlDataImporter.java:225)
Environment
- Red Hat JBoss Enterprise Application Platform (EAP) 6.4.8
- HornetQ Importer tool
org.hornetq.jms.persistence.impl.journal.XmlDataImporter
- HornetQ Importer tool
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
