8.22. Troubleshooting in Bean Builder
Some of the troubleshooting tips in Bean Builder are listed below. The format of the document is: first the problem is stated and then its causes & steps to fix the same is explained.
1. Version mismatch between java and Configuration file
Bean Builder maintains its own version of screens and Java files to avoid loss of Source and Configuration files. If java file version is not synchronized with the configuration file, a confirmation dialog pops up which asks for overwriting with current configuration file. Following are some troubleshooting tips.
Java File is Older than Configuration File
If you have latest version of java file in some other directory, then press No in the confirmation dialog. Browse and specify the java file.
The valid extensions for java file are "java","javabkup", "javabkup1", "javabkup~", "javabkupvc". Otherwise press yes to generate the java file in Source directory with reference to the current configuration file. A copy of the generated java file is placed in the tmpSource directory. A backup of current java file is placed in the Backup directory with ".javabkupvc" extension.
Configuration File is Older than java File
If you have latest version configuration file in some other directory, then press No in the confirmation dialog. Browse and specify the configuration file. The valid extensions for configuration file are "config", "configbkup", "configbkup1", "configbkup~", "configbkupvc". Otherwise press yes to generate the java file in Source directory with reference to the current configuration file. A copy of the generated java file is placed in the tmpSource directory. A backup of current configuration file is placed in the Backup directory with ".configbkupvc" extension.
2. Parsing error during Source Generation
If a parsing error is encountered during source regeneration, then it is an indication of the presence of invalid characters or improper source format.
Go to the source tab and check whether the user added code is entered below the version tag.
Check your template files (project level or global templates).
Any invalid entries in the source file.
3. Builder does not accept package names
If the package name is directly provided in the source tab, then during source regeneration the package name is removed from the source tab. The package name should always be specified in the Source Generation tab of Project Properties form.
4. Unexpected loss of source and configuration files.
When you loose any source or configuration files, check the immediate backup in Project's Backup directory.
5. NoClassDefFound Error while dropping screens.
if NoClassDefFound exception is thrown while dropping screen (which has panel build type) into another screen, check whether the classes which were used in the dropped screen are present in the builder classpath (not only in compilation classpath of the project). Specify all the required jars or classes in Bean Builder environment file (setEnv.bat/sh).
6. IllegalArgumentException in WebNMS
If two NAR (NMS archive) files are created with same names, one with NMS_FRAME build type and the other with NMS_PANEL build type, both the NARs will be installed in NMS. But when the installed NMS_PANEL NAR is invoked, an IllegalArgumentException is thrown.
To avoid this, NARs should not be created for NMS_PANEL and NMS_FRAME with the same screen name.
7. Package Name problem while creating NAR
When a new file is created for a project with a package name, and If it is attempted to be packaged as a NAR, the file is listed in the classes list without its package name. So the package name should always be specified in the Source Generation tab of Project Properties form.
8. Compilation error after deleting the bean
If the compilation error is thrown after deleting a bean even though the source has been regenerated, check whether you have used the deleted bean instance in any of the custom code editing area either in the Interaction Wizard or in the screen menu configuration UI. This is because while deleting a bean the builder generated code only removed from source during regeneration. It won't remove the custom code that is added by you in the Interaction Wizard, Screen Menu Configuration UI or in any other bean properties form. So while deleting a bean, you have to manually delete the custom code which uses the particular bean instance.
9. Blocking done for builder generated code are collapsed in the source tab.
The source code (.java file) may have ^M characters. Please remove the ^M characters from the source. This should solve the problem.
10. Unable to paste screen in another project
If an error message is thrown while pasting a screen that contains other screens (classes) dropped as beans in another project, then do the following step. Copy all the missing classes which are listed in the error message in to the classes directory of the project in which the copied screen is being pasted.
11. Unable to start Bean Builder in Windows
If you are not able to start the Bean Builder in Windows (by extracting zip archive), specify the correct java path in setEnv.bat file.
12. InnerClass Connection compilation failure and "class must be declared abstract"error
In a screen containing inner class connections, if you see errors saying that class must be declared abstract and other errors pertaining to failure of compilation for the inner class then the problem needs to be fixed in the InnerClass code. Once the Inner class connection gets compiled successfully the screen(s) will also get compiled.
You can refer to the Troubleshooting in Migration Wizard page for issues related to Migration.