Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
fsa6tkk opened this issue Mar 28, 2019 · 1 comment

Comments

@fsa6tkk
Copy link

fsa6tkk commented Mar 28, 2019

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();

@klehmann
Copy link
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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants