When i try to make a test to get the offline message, i got a error

this is the error

this is my code

AbstractXMPPConnection connection = login.getConnection();

        System.out.println(connection.isConnected());
        OfflineMessageManager offlineMessageManager = OfflineMessageManager.getInstanceFor(connection);
        List<Message> list = offlineMessageManager.getMessages();

        List<OfflineMessageHeader> list1 = offlineMessageManager.getHeaders();
        System.out.println(offlineMessageManager.getMessageCount());


        System.out.println(list);
        for (Message message : list) {
            System.out.println(message.toXML());
            System.out.println(message.getBody());
        }
        System.out.println(list1);

this is the openfire server log

And in addition to the above features, some other features such as httpfileupload and filetransfer will get similar errors, but these two functions were still useful yesterday

The above shows a StringIndexOutOfBoundsException, however without the accompanying stacktrace it is hard to tell where the exception is thrown. Please present the full stacktrace.

This topic was automatically closed 62 days after the last reply. New replies are no longer allowed.