Flex - Localization and Resource Modules - Runtime errors - apache-flex

I've created an application that includes a number of Modules and uses Parsley framework.
Ant is used to build the application.
Recently I thought of using Resource Bundles and implemented it in the system by creating a locale/en_US folder under the src. I added a portal.properties file with all my strings defined.
In my modules, I added the metadata
<fx:Metadata>
[ResourceBundle("portal")]
</fx:Metadata>
In the ant build file, I added the below lines within mxmlc.
<locale>#{locale}</locale>
<source-path path-element="${myapp.flex.app.locale}/{locale}"/>
<include-resource-bundles>portal</include-resource-bundles>
The build works fine and when I deploy the application and open it in my browser, I'm greeted with many errors thrown by the Flash player.
But if I dismiss the messages, its working fine. My strings are replaced with the values in the property file, but how do I stop the runtime errors being thrown up?
I get the below error.
Error: Unable to load resource module from portal
at MethodInfo-637()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at ModuleInfoProxy/moduleEventHandler()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at ModuleInfoProxy/moduleEventHandler()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at ModuleInfo/errorHandler()
Any help would be greatly appreciated.

Do you include into your ant build the following
<keep-as3-metadata>ResourceBundle</keep-as3-metadata>
?

Related

UWP app errors when built in .Net Native

We've got a Windows 8.1 app that we've converted to a Windows 10 UWP app. The app works fine in debug, but when running in Release (.Net Native), we are getting a runtime error on app load. It's not at all clear what's causing the error. The error happens in the OnLaunched event in App.xaml.cs where some data is being initialized. The error:
An exception of type System.NullReferenceException occurred in
System.Private.CoreLib.dll
Additional information: Arg_NullReferenceException
We're using the latest versions of MVVM Light.
I know this isn't a lot of info, but it's really all we have right now and are pretty stumped. Anyone seen and issue like this or know where to start in tracking it down?
If, you're still using SQLite or any Reference.
Please Right Click to your Project => Add => Reference => Make sure your DLL of Nuget is checked.
Please Check this solution.
I had this exact problem in that I converted an 8.1 app to UWP. This was resolved by including a file called Default.rd.xml in the Properties folder. This was not mentioned in the migration guide that I had used.
Not including it means some pretty common coding patterns such as reflection will not work, and this includes in imported .dll's.
A basic Default.rd.xml file looks like the following ...
<!--
This file contains Runtime Directives used by .NET Native. The defaults here are suitable for most
developers. However, you can modify these parameters to modify the behavior of the .NET Native
optimizer.
Runtime Directives are documented at https://go.microsoft.com/fwlink/?LinkID=391919
To fully enable reflection for App1.MyClass and all of its public/private members
<Type Name="App1.MyClass" Dynamic="Required All"/>
To enable dynamic creation of the specific instantiation of AppClass<T> over System.Int32
<TypeInstantiation Name="App1.AppClass" Arguments="System.Int32" Activate="Required Public" />
Using the Namespace directive to apply reflection policy to all the types in a particular namespace
<Namespace Name="DataClasses.ViewModels" Serialize="All" />
-->
<Directives xmlns="http://schemas.microsoft.com/netfx/2013/01/metadata">
<Application>
<!--
An Assembly element with Name="*Application*" applies to all assemblies in
the application package. The asterisks are not wildcards.
-->
<Assembly Name="*Application*" Dynamic="Required All" />
<!-- Add your application specific runtime directives here. -->
</Application>
</Directives>
If this does not work, then try creating a new empty UWP project to get the latest format for the file.

Distriqt Google Analytics Extension fails in Air Debug Launcher (ADL)

Exception fault: VerifyError: Error #1014: Class com.distriqt.extension.googleanalytics::Tracker could not be found.
The issue does NOT occur when installed to a device.
The extension has been added to the application descriptor.
I have other Distriqt extensions (notifications, dialog) already in my app which are working fine.
Setup: Mac / FDT / AIR SDK 18
We accidentally missed a few classes in default library of the first release of this ANE.
Grab the update and it should resolve this issue.
Cheers
try to copy and rename your ANE: ane-file-name.ane to ane-file-name.swc, and also add it to your project (you must have both ane and swc)

Trouble using Epplus and Service.svc

I have a Web Site with an Service.svc file, i created this using the Add New Item -> AJAX-enabled WCF Service, for weeks, everything works fine.
Today, i imported the EPplus.dll to generate some excel files. When i try to compile i get this error
Error 1 Reference.svcmap:
Failed to generate code for the service reference 'QUAY.Tractebel.COP.Servicos'.
Cannot import wsdl:portType Detail: An exception was thrown while running a WSDL import extension:
System.ServiceModel.Description.DataContractSerializerMessageContractImporter
Error: Type 'OfficeOpenXml.ExcelRangeBase' is a recursive collection data contract which is not supported.
Consider modifying the definition of collection 'OfficeOpenXml.ExcelRangeBase' to remove references to itself.
XPath to Error Source: //wsdl:definitions[#targetNamespace='']/wsdl:portType[#name='Servicos'] App_WebReferences/QUAY/Tractebel/COP/Servicos/
I have no idea how to solve it, someone can help me?
Just had the same problem while referencing a custom wcf class i use.
The strange problem is that on my old development pc (windows vista 32bit, visual studio 2010) i haven't got this problem, it only pops up in my new system (windows 8 64bit).
Bah.
However, i bypassed the problem opening App_WebReferences --> "your service name" --> Right click on depending Refrence icon --> "Configure service reference"
In this screen move the option button from "Reuse types in all referenced assembiles" to "Reuse types in specified assemblies" and check all the depending libraries EXCEPT EPPlus
Compile and ... voila
If someon has also a logic explanation, i'll gladly listen

VerifyError: Error #1014: Class mx.controls.advancedDataGridClasses::AdvancedDataGridRendererProvider could not be found

I am porting over a Flex application from 4.1 to 4.5 and have run into some issues with the AdvancedDataGrid classes being found. The application compiles ok under 4.5.1 but at runtime I get the following error:
VerifyError: Error #1014: Class mx.controls.advancedDataGridClasses::AdvancedDataGridRendererProvider could not be found.
It appears that what was the old datavisualization.swc was divided into to libraries (advancedgrids_4.5.21328.swf and charts_4.5.21328.swf) both of which are present in my project. is there anything in the configuration that I need to update?
I am currently using Eclipse Java EE IDE for Web Developers (Helios Service Release 1)
Many thanks,
Ian
Verify error really means that there's something wrong with versions of classes you are trying to access at runtime.
First of all, you can try plaing with 'merged/rsl' settings. Second, you can double-check your includes or try to build your app outside ide, with ant task, for example.
You will have to merge your libraries into code. This might be helpful -
VerifyError: Error #1014: class could not be found

Maven built swf(flex project) throwing errors at application start

I'm getting the following error at the start of my application:
ReferenceError: Error #1065: Variable mx.messaging.config::ConfigMap is not defined.
at _ABC_FlexInit$/init()
at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::kickOff()
at mx.managers::SystemManager/http://www.adobe.com/2006/flex/mx/internal::preloader_completeHandler()
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at mx.preloaders::Preloader/timerHandler()
at flash.utils::Timer/_timerDispatch()
at flash.utils::Timer/tick()
I have gone through a lot of posts on various forums. Most of them say that this error usually occurs in cases like:
not declaring classes as 'public'
trying to refer something that isn't there
syntax error
When i run my application, it actually runs just fine. When i try to run the swf that is generated from maven install on my application, that is when this error occurs. So i can safely say that the above mentioned cases are not the reason for this error. So why is my maven built swf throwing this error. Any help would be much appreciated.
Thanks.
You are not providing that class instance at runtime. My guess would be that your Maven configuration assumes that this class (which I think is in rpc.swc under your FLEX_HOME/frameworks/lib/ directory) will be loaded as an RSL - but it cannot be found. You need to double check your Maven configuration and find out how you are including all elements of the framework and that you are including all necessary RSL's with your application when you deploy.

Resources