+++ This bug was initially created as a clone of Bug #1110277 +++ JON 3.1.2 and JON 3.2.0 org/ rhq/ core/ domain/ event/ Event.java 126 @Column(name = "DETAIL", length = 4000, nullable = false) 127 private String detail; so the detail string is trimming the text to 4000 UTF8 characters. org/ rhq/ enterprise/ server/ event/ EventManagerBean.java is responsible to insert the event into the database: 112 public void addEventData(Map<EventSource, Set<Event>> events) { ... 167 // Then insert the "values" (i.e. the Events). 168 ps = conn.prepareStatement(statementSql); 169 try { 170 for (EventSource eventSource : events.keySet()) { 171 Set<Event> eventData = events.get(eventSource); 172 for (Event event : eventData) { .... 181 ps.setString(paramIndex++, event.getDetail()); However, then the database (oracle in our case) has not been setup to use UTF-8, but only a standard 8-bit character set then trying to insert a "detail" which has international (e.g. 16 bit) characters in it will break the 4000 limit with: ORA-01461: can bind a LONG value only for insert into a LONG column because the number of bytes form the "detail" will be bigger then 4000. Solution: - make the database being UTF-8 a requirement (JON installer to check) or modify the above code: byte[] detailBytes = event.getDetail().getBytes(); ps.setBytes(paramIndex++,Arrays.copyOf(detailBytes, 4000));
MASTER commit 1d836a790f8e8d2da79a31e8c796324e85ae7851 Setting to VERIFIED since the clone was verified with a master build.
Bulk close of items fixed in RHQ 4.12 If you think this is not solved, then please open a *new* BZ and link to this one.