IBM Support

PM89002: Regenerating multiple J2C Beans from a modified Ant script results in the bean being created without contents.

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Abstract:
    
    Regenerating multiple J2C Beans from a modified Ant script,
    originating from the J2C option: 'Save session as Ant script',
    results in the bean being created without contents.
    
    Problem:
    
    When generating a J2C bean from COBOL module, there is an option
    called 'Save session as Ant script'. The session was captured
    the session as an ant script and uses the script to create an
    ant macro (J2CBeanProject/generate-j2c-bean.xml) so that you can
    use an ant script to generate the j2c bean repeatedly instead of
    running the wizard every single time
    (J2CBeanProject/generate-j2c.xml).
    
    Steps to replicate:
    
    1. Create a J2C Bean from the J2C wizard with a data binding and
    enable the option to save the settings to an Ant file.
    
    2. Modify the Ant script to create more than one (possibly 3)
    J2C Beans using a common Ant task for the generation with
    properties to define the Bean name. This can be done in the
    wizard during generation by selecting multiple J2C beans to be
    added that specify different COBOL files for the importer.
    
    3. Run the Ant script (possibly twice if the beans do not
    already exist) and note that the Impl class is missing methods
    and returns null for the method.
    
    Note that running from the command line or cleaning the
    workspace will generate the beans correctly.
    
    Local fix:
    
    Delete the affected Impl class(s) prior to generation in the
    script. For example
    
     '?delete
    file='${basedir}/${j2c.java.src.dir}/${j2c.package.dir}/${j2c.ci
    cs.modul
    e}Impl.java' /?'
    

Local fix

Problem summary

  • When using Ant script to regenerate a J2C Java bean for a second
     or third time, the bean code is not properly generated: all
    methods contain "return null;" statements.
    

Problem conclusion

  • When java bean skeleton class are created (before annotation
    processing) an incremental build is performed to assure the EMF
    model is clean and to assure the Annotation Builder will use the
     clean model when kicked off. This assures all code generation
    will end successfully.
    
    The fix for this APAR is included in Rational Application
    Developer v8.0.4.3.
    

Temporary fix

Comments

APAR Information

  • APAR number

    PM89002

  • Reported component name

    RATL APP DEV WI

  • Reported component ID

    5724J1901

  • Reported release

    804

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2013-05-14

  • Closed date

    2013-10-28

  • Last modified date

    2013-10-28

  • APAR is sysrouted FROM one or more of the following:

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    RATL APP DEV WI

  • Fixed component ID

    5724J1901

Applicable component levels

  • R804 PSY

       UP

[{"Business Unit":{"code":"BU053","label":"Cloud & Data Platform"},"Product":{"code":"SSRTLW","label":"Rational Application Developer for WebSphere Software"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"8.0.4","Edition":"","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
28 October 2013