Errors
In this section we will show some of the possible errors that may arise during the migration process and their respective cause.
Input, output errors
Required parameters errors
If any required (-i, -o, -p) parameter is missing, the following error message is displayed.
You have to type an existent path in the input (-i) or output (-o) parameter.
Quotation marks are mandatory for paths with whitespaces.
The path must have a valid format (the following special characters are not allowed: /:?*"<>|). The typed input folder must have a valid files extension.
Package parameter (-p) must contain a simple or qualified text.
Optional parameters errors
SymbolTable (-s) and XmlConfigPath (-r) arguments follow the same rules of the input parameter: they must contain a valid path.
For additional information, please refer to the Migration Process
Conversion process errors
In case of invalid states, the command prompt will show a brief description of the error, and a colored identifier for every type of error (error, warning, information).
In the image below you will see how the errors and warnings are displayed in the command prompt.
The image below shows how the information messages are displayed in the command prompt.
At the end of the conversion, the command prompt will show a summary of the migrated objects.
Logged errors
After the migration is finished, a reported errors file is created and stored in the output folder with the name Pb2JavaEwis.xml.
This file contains detailed information (object name and line from the original source code) of the errors shown in the command prompt during the conversion process and the summary results.
In case, a library isn't found, the following error is displayed:
A usual error is when a PowerBuilder object isn't parsed, in this case, the XML file will have the following section.
The previous error will produce more errors while converting. In this case the statement will be commented out in the target source code.
Another common error is when the Symbol Table does not contain a symbol. In this case the control sle_1 is used in a statement, but the control declaration wasn't found by the Symbol Table.
When a statement is not converted, we can find the following section in the XML. In this case, the argument type is not supported.
The XML file also has a section that contains all task that were executed and finalized. This file is updated every time a task finishes in order to avoid missing information.
At the end of the file there is summary of the conversion by both library and general.
System errors
A system error occurs when the conversion tool crashes, and migration does not finish successfully. If conversion tool crashes in the first task, the Pb2JavaEwis.XML file won't be generated, and only information displayed in the command prompt will be available.
For example, if the input .pbt file is damaged and PB2Java can't process it, messages in LoadTargetsTasks will be displayed. The same will happen with some other errors that may arise making the tool crash in different tasks.
Crashing in Load Targets Task
Crashing in Source Modification Task