NPE in migration tool CopyResourcesStep
See original GitHub issueExecution of the migration tool fails with the following exception at CopyResourcesStep:130
Caused by: java.lang.NullPointerException
at com.vaadin.flow.migration.CopyResourcesStep$HtmlImportRewriter.adjustContent (CopyResourcesStep.java:130)
at com.vaadin.flow.migration.CopyResourcesStep$HtmlImportRewriter.handle (CopyResourcesStep.java:84)
at com.vaadin.flow.migration.AbstractCopyResourcesStep$CopyFileVisitor.visitFile (AbstractCopyResourcesStep.java:88)
at com.vaadin.flow.migration.AbstractCopyResourcesStep$CopyFileVisitor.visitFile (AbstractCopyResourcesStep.java:68)
at java.nio.file.Files.walkFileTree (Files.java:2803)
at java.nio.file.Files.walkFileTree (Files.java:2875)
at com.vaadin.flow.migration.AbstractCopyResourcesStep.doCopyResources (AbstractCopyResourcesStep.java:186)
at com.vaadin.flow.migration.AbstractCopyResourcesStep.copyResources (AbstractCopyResourcesStep.java:178)
at com.vaadin.flow.migration.CopyResourcesStep.copyResources (CopyResourcesStep.java:191)
at com.vaadin.flow.migration.Migration.migrate (Migration.java:171)
at com.vaadin.flow.plugin.maven.MigrateMojo.execute (MigrateMojo.java:120)
No information is provided in the log about what file caused that.
Vaadin 14.1.17
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:6 (6 by maintainers)
Top Results From Across the Web
An NPE Exception occur when using Connector Migration ...
When using Connector Migration Tool to migrate the job with any connector stages, it might report the following error, SEVERE Migration failed: jobxxx: ......
Read more >Migrate dependancies NPE — OpenText - Forums
running the migrate dependencies (workarea) as root, no log generated, getting an NPE, not certain how to proceed. Starting migration tool .
Read more >New Commerce Experience Batch Migration Tool (BAM)
Learn how to use the New Commerce Experience Batch Migration Tool to migrate your customer's subscription's to NCE.
Read more >TTP - A365 Email Migration
The migration of your email data may appear intimidating, but the following processes ... an NPE have migrated the NPE should be migrated...
Read more >Configure the Secure Firewall Migration Tool for ASA ... - Cisco
This document describes the procedure to migrate Cisco Adaptive Security Appliance (ASA) to Cisco Firepower.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Instead of closing as WON’T FIX, how about we help the customer and harden the sources of the migration tool?
Looking at CopyResourcesStep:130, the
body
variable is clearly null, which means that there is a html file which clearly has no body. If this can happen, simply return from the function. If this should not happen, add a simple check which will fail with an informative error message!Indeed, when I added the lines above, recompiled the migration tool on the 2.6 branch and ran it, the exception is now much more informative:
The HTML file in question is:
It can be safely skipped. Indeed, this code does the trick: