8000 com.mindoo.domino.jna.errors.NotesError: Entry not found in index (error code: 1028, raw error with all flags: 1028) · Issue #26 · klehmann/domino-jna · GitHub
[go: up one dir, main page]

Skip to content

com.mindoo.domino.jna.errors.NotesError: Entry not found in index (error code: 1028, raw error with all flags: 1028) #26

Open

Description

@fsa6tkk

Hi Klehmann,

An error occurred when calling writeImage method if the mail contained images in nested reply mails. I have attached a .nsf file for your reference.

Let's see if you have any idea for the issue.

cadminis_local.zip

Here are the error log and the reference code

Error log:

filename:File2ERKSwoPreview.png
com.mindoo.domino.jna.errors.NotesError: Entry not found in index (error code: 1028, raw error with all flags: 1028)
at com.mindoo.domino.jna.errors.NotesErrorUtils.toNotesError(NotesErrorUtils.java:53)
at com.mindoo.domino.jna.errors.NotesErrorUtils.checkResult(NotesErrorUtils.java:26)
at com.mindoo.domino.jna.NotesNote.convertHtmlElement(NotesNote.java:4089)
at com.mindoo.domino.jna.NotesNote.convertHtmlElement(NotesNote.java:4032)
at com.mindoo.domino.jna.NotesNote$HtmlConversionResult$1.writeImage(NotesNote.java:4261)
at com.cmmp.hk.unclassified.MailbodyParser.extractInlineIcons(MailbodyParser.java:160)
at com.cmmp.hk.unclassified.MailbodyParser.Parse(MailbodyParser.java:53)
at com.cmmp.hk.unclassified.MailMigrator.migrate(MailMigrator.java:49)
at com.cmmp.hk.CMMPMailMigrator.lambda$migrateMail$0(CMMPMailMigrator.java:304)
at com.mindoo.domino.jna.gc.NotesGC.runWithAutoGC(NotesGC.java:481)
at com.cmmp.hk.CMMPMailMigrator.migrateMail(CMMPMailMigrator.java:175)
at com.cmmp.hk.CMMPMailMigrator.test(CMMPMailMigrator.java:548)
at com.cmmp.hk.App.main(App.java:185)

Reference code:

                 IHtmlImageRef image = null;

                String imgSrc = inlineIcon.attr("src");

                for (int i = 0; i < images.size(); i++) {

                    if (images.get(i).getReferenceText().equalsIgnoreCase(imgSrc)) {
                        image = images.get(i);
                        break;
                    }
                }

                String imgCID = java.util.UUID.randomUUID().toString();
                
                String fileName = inlineIcon.attr("alt");
                
                ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
                
                System.out.println("filename:"+ fileName);
                if (image != null) {
                   
                    image.writeImage(byteArrayOutputStream);
               
                }
                
                    byteArrayOutputStream.flush();
                    byte[] originalImg = byteArrayOutputStream.toByteArray();
                    byteArrayOutputStream.close();

Activity

  1. klehmann commented on Feb 19, 2021

    @klehmann
    Owner

    I think I finally fixed this one:
    117af3f

    Please try with 0.9.42 when it is available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0