So, you’re ready to migrate your application to a new environment, be it Liberty, a newer Java SE version, or a newer version of WebSphere traditional? However, you aren’t sure what changes you might need to make to your application for it to run. That’s where the analysis report of the Migration Toolkit for Application Binaries (binary scanner) can help.
Generating the Detailed Migration Analysis Report
When creating the detailed migration analysis report, the binary scanner scans your application binaries against a number of rules based on your migration scenario to help you understand what updates might be required to get your application working. To generate the report:
1. Download the binary scanner from here
2. Unpack the binary scanner using java -jar binaryAppScannerInstaller.jar
3. Run the unpacked jar on your application java -jar binaryAppScanner.jar SampleApplication.ear
--analyze
By default, the binary scanner produces a report for an application moving from WebSphere 8.5.5 running Java SE 6 going to WebSphere Liberty running Java 8. If your migration scenario is different, you can specify different values for the --sourceAppServer
, --targetAppServer
, --sourceJava
, and --targetJava
options. A full list of the supported migration scenarios can be found by using the java -jar binaryAppScanner.jar --help analyze
command.
In my case, I have an application that is currently running on WebSphere 8.5.5 that I want to move to Liberty and run with Java 11, so my command is:
java -jar binaryAppScanner.jar /path/to/guide-rest-intro.war --analyze --targetJava=java11
.
What’s in the Analysis Report?
The report that is produced gives details about what potential issues were flagged for your application binaries. For each flagged result, the report
provides a detailed description of the potential problem, how to address
it, and lists all affected file
s along with the match criteria, the method name if applicable, and the line number if available. Line numbers are only available for results that occur within a method body.
The rules are given severities based on how likely it is an than application will need to be updated: severe rules indicate breaking changes that will require updates, warning rules indicate behavior changes that might break an application and need to be evaluated, and info rules indicate the use of deprecated APIs or minor behavior changes that will not affect most applications.In my case, there is one severe rule flagged related to the migration from WebSphere traditional to Liberty and one warning rule related to the migration from Java SE 8 to Java SE 11.
For the severe rule it looks like I am using a WebSphere proprietary API to get the server name. The rule help provides me with an alternative I can use on Liberty and tells me where I need to update my code!
For the warning rule it looks like the format of the Java version String has changed in Java SE 11. This might or might not break an application and after looking at
how I was using the version string for my application I determined that I didn’t need to make any updates.
One helpful piece of information that is included at the bottom of the analysis report is a list of all the rules that the application was analyzed for. This can be helpful to see what rules your application was scanned for but for which we didn't find any match criteria.
Try the binary scanner today and let us know in the comments if you have any questions or feedback - we are always trying to make the migration process easier!
See the IBM Developer learning path Modernizing applications to use WebSphere Liberty to discover all the application modernization tools available with WebSphere Hybrid Edition.
Also, check out the other articles in this app modernization blog series.