[ 
https://issues.apache.org/jira/browse/FLEX-33421?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Frédéric Leroy updated FLEX-33421:
----------------------------------

    Description: 
A library build with Flex SDK 4.5 and using the metadata RequiresLicense fails 
at runtime: the handler class is not found.

In attachment:
test-apache-flex-4.9-compatibility-library.fxpl -- defines a library build with 
Flex 4.5 that defines a LicenseHandler class and a RequiresLicenseHandler class
test-apache-flex-4-9-compatibility-using-library -- defines an application 
build with Flex 4.9.1 that uses the RequiresLicenseHandler class.

To reproduce:
1. Run (in a debug player) the application from the xxx-using-library project

Observed:
An exception is thrown:
ReferenceError: Error #1065: Variable LicenseHandler is not defined.
        at 
RequiresLicenseHandler()[C:\Workspace\elixir-dev\test-apache-flex-4.9-compatibility-library\src\RequiresLicenseHandler.as:9]
        at 
Main()[C:\Workspace\elixir-dev\test-apache-flex-4.9-compatiblity-using-library\src\Main.mxml:7]
        at 
_Main_mx_managers_SystemManager/create()[_Main_mx_managers_SystemManager.as:51]
        at 
mx.managers.systemClasses::ChildManager/initializeTopLevelWindow()[/Users/justinmclean/Documents/ApacheFlexSDK/frameworks/projects/framework/src/mx/managers/systemClasses/ChildManager.as:319]
        at 
mx.managers::SystemManager/initializeTopLevelWindow()[/Users/justinmclean/Documents/ApacheFlexSDK/frameworks/projects/framework/src/mx/managers/SystemManager.as:3065]
        at 
mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::kickOff()[/Users/justinmclean/Documents/ApacheFlexSDK/frameworks/projects/framework/src/mx/managers/SystemManager.as:2851]
        at 
mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::preloader_completeHandler()[/Users/justinmclean/Documents/ApacheFlexSDK/frameworks/projects/framework/src/mx/managers/SystemManager.as:2731]
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at 
mx.preloaders::Preloader/timerHandler()[/Users/justinmclean/Documents/ApacheFlexSDK/frameworks/projects/framework/src/mx/preloaders/Preloader.as:550]
        at flash.utils::Timer/_timerDispatch()
        at flash.utils::Timer/tick()

Expected:
The application should display "Loaded".

Workaround:
In the xxx-using-library project, change the Link Type for the library to 
"Runtime Shared Library".
In FlashBuilder this is option is located in the project properties/Flex Build 
Path/Library Path/Build path libraries, select the library, extend the node, 
and change the Link Type.


  was:
A library build with Flex SDK 4.5 and using the metadata RequiresLicense fails 
at runtime: the handler class is not found.

In attachment:
test-apache-flex-4.9-compatibility-library.fxpl -- defines a library build with 
Flex 4.5 that defines a LicenseHandler class and a RequiresLicenseHandler class
test-apache-flex-4-9-compatibility-using-library -- defines an application 
build with Flex 4.9.1 that uses the RequiresLicenseHandler class.

To reproduce:
1. Run (in a debug player) the application from the xxx-using-library project

Observed:
An exception is thrown:
ReferenceError: Error #1065: Variable LicenseHandler is not defined.
        at 
RequiresLicenseHandler()[C:\Workspace\elixir-dev\test-apache-flex-4.9-compatibility-library\src\RequiresLicenseHandler.as:9]
        at 
Main()[C:\Workspace\elixir-dev\test-apache-flex-4.9-compatiblity-using-library\src\Main.mxml:7]
        at 
_Main_mx_managers_SystemManager/create()[_Main_mx_managers_SystemManager.as:51]
        at 
mx.managers.systemClasses::ChildManager/initializeTopLevelWindow()[/Users/justinmclean/Documents/ApacheFlexSDK/frameworks/projects/framework/src/mx/managers/systemClasses/ChildManager.as:319]
        at 
mx.managers::SystemManager/initializeTopLevelWindow()[/Users/justinmclean/Documents/ApacheFlexSDK/frameworks/projects/framework/src/mx/managers/SystemManager.as:3065]
        at 
mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::kickOff()[/Users/justinmclean/Documents/ApacheFlexSDK/frameworks/projects/framework/src/mx/managers/SystemManager.as:2851]
        at 
mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::preloader_completeHandler()[/Users/justinmclean/Documents/ApacheFlexSDK/frameworks/projects/framework/src/mx/managers/SystemManager.as:2731]
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at 
mx.preloaders::Preloader/timerHandler()[/Users/justinmclean/Documents/ApacheFlexSDK/frameworks/projects/framework/src/mx/preloaders/Preloader.as:550]
        at flash.utils::Timer/_timerDispatch()
        at flash.utils::Timer/tick()

Expected:
The application should display "Loaded".

Workaround:
Change the library linkage to "Runtime Shared Library".


    
> Broken metadata RequiresLicense
> -------------------------------
>
>                 Key: FLEX-33421
>                 URL: https://issues.apache.org/jira/browse/FLEX-33421
>             Project: Apache Flex
>          Issue Type: Bug
>    Affects Versions: Apache Flex 4.9.0
>            Reporter: Frédéric Leroy
>              Labels: metadata
>         Attachments: test-apache-flex-4.9-compatibility-library.fxpl, 
> test-apache-flex-4.9-compatiblity-using-library.fxp
>
>
> A library build with Flex SDK 4.5 and using the metadata RequiresLicense 
> fails at runtime: the handler class is not found.
> In attachment:
> test-apache-flex-4.9-compatibility-library.fxpl -- defines a library build 
> with Flex 4.5 that defines a LicenseHandler class and a 
> RequiresLicenseHandler class
> test-apache-flex-4-9-compatibility-using-library -- defines an application 
> build with Flex 4.9.1 that uses the RequiresLicenseHandler class.
> To reproduce:
> 1. Run (in a debug player) the application from the xxx-using-library project
> Observed:
> An exception is thrown:
> ReferenceError: Error #1065: Variable LicenseHandler is not defined.
>       at 
> RequiresLicenseHandler()[C:\Workspace\elixir-dev\test-apache-flex-4.9-compatibility-library\src\RequiresLicenseHandler.as:9]
>       at 
> Main()[C:\Workspace\elixir-dev\test-apache-flex-4.9-compatiblity-using-library\src\Main.mxml:7]
>       at 
> _Main_mx_managers_SystemManager/create()[_Main_mx_managers_SystemManager.as:51]
>       at 
> mx.managers.systemClasses::ChildManager/initializeTopLevelWindow()[/Users/justinmclean/Documents/ApacheFlexSDK/frameworks/projects/framework/src/mx/managers/systemClasses/ChildManager.as:319]
>       at 
> mx.managers::SystemManager/initializeTopLevelWindow()[/Users/justinmclean/Documents/ApacheFlexSDK/frameworks/projects/framework/src/mx/managers/SystemManager.as:3065]
>       at 
> mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::kickOff()[/Users/justinmclean/Documents/ApacheFlexSDK/frameworks/projects/framework/src/mx/managers/SystemManager.as:2851]
>       at 
> mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::preloader_completeHandler()[/Users/justinmclean/Documents/ApacheFlexSDK/frameworks/projects/framework/src/mx/managers/SystemManager.as:2731]
>       at flash.events::EventDispatcher/dispatchEventFunction()
>       at flash.events::EventDispatcher/dispatchEvent()
>       at 
> mx.preloaders::Preloader/timerHandler()[/Users/justinmclean/Documents/ApacheFlexSDK/frameworks/projects/framework/src/mx/preloaders/Preloader.as:550]
>       at flash.utils::Timer/_timerDispatch()
>       at flash.utils::Timer/tick()
> Expected:
> The application should display "Loaded".
> Workaround:
> In the xxx-using-library project, change the Link Type for the library to 
> "Runtime Shared Library".
> In FlashBuilder this is option is located in the project properties/Flex 
> Build Path/Library Path/Build path libraries, select the library, extend the 
> node, and change the Link Type.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to