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:


    PBJ1072| Message: Library not found C:\src\TailwindProductCatalog.pbl. | StackTrace: 

A usual error is when a PowerBuilder object isn't parsed, in this case, the XML file will have the following section.


    PBJ1064| Message: Error parsing pb object: w_invalid_window.srw..

The previous error will produce more errors while converting. In this case the statement will be commented out in the target source code.


    PBJ1017| Location issues.issues at line 38,17 | Message: symbol W_INVALID_WINDOW not found for single access

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.


    PBJ1017| Location issues.w_symboltable_error at line 30,12 | Message: symbol SLE_1 not found for single access

When a statement is not converted, we can find the following section in the XML. In this case, the argument type is not supported.


    PBJ1003| Location library.f_global_function at line 1053 | Message: Error converting PbCall could not resolve argument type for xmlHttpReq.status

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.


    
    
    
    
    
    
    
    
    
    
    
    

    PBJ1071| Message: Summary: LibraryCount = 1
    PBJ1071| Message: Summary: InvalidObjectCount = 1
    PBJ1071| Message: Summary: ValidObjectCount = 2
    PBJ1071| Message: Summary: ValidMigratedCount = 2
    PBJ1071| Message: Summary: DuplicatedObjectCount = 0
    PBJ1071| Message: Summary: TotalObjectCount = 3
    PBJ1071| Message: Summary: InvalidStatCount = 0
    PBJ1071| Message: Summary: SqlCount = 0
    PBJ1071| Message: Summary: InvalidSqlCount = 0
    PBJ1071| Message: Summary: ValidSqlCount = 0
    PBJ1071| Message: Summary: MigratedLines = 66
    PBJ1071| Message: Summary: NoMigratedLines = 35
    PBJ1071| Message: Summary: TotalLines = 101
    PBJ1071| Message: Summary: Coverage = 65.35%
    PBJ1071| Message: Summary: ParsingErrorsCount = 0
    PBJ1071| Message: Summary: ConversionErrorsCount = 6
    PBJ1071| Message: Summary: HtmlConversionErrorsCount = 2
    PBJ1071| Message: Summary: NoClassifyErrorsCount = 1
    PBJ1071| Message: Summary: Html = 1
    PBJ1071| Message: Summary: Scss = 1
    PBJ1071| Message: Summary: Ts = 1

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