flex Error: unable to resolve resource bundle "core" for locale "en_US" - flex3

I'm trying to include a swc library in a flowplayer plugin I'm building, but when I include this swc it is referencing some of the core framework resource bundles. But for some reason the mxmlc compiler is not finding them.
I've added the -include-resource-bundles=core,effects,skins,styles to the mxmlc arguments, but I'm still getting this error for each core, effects, etc:
Error: Unable to resolve resource bundle "core" for local "en_US".
I have the .properties files in my flexsdk folders.
Is there some other flag I'm missing for the mxmlc compiler to find these?

Maybe this is a just an artifact of the flowplayer ant scripts, but I was able to solve this by including the path to the bundles explicitly in the mxmlc_bin call:
<arg line="-source-path #{src} ${mxmlc-library-path} ${mxmlc-sources} ${flex3dir}/frameworks/projects/framework/bundles/en_US/src" />

Related

gradle AbortException: FileNotFoundException when minifyEnable=true

I have an android project where we just upgraded to gradle wrapper 4.9-all and using gradle tools plugin com.android.tools.build:gradle:3.3.0-alpha04. I have different build variants. The build types using proguard and minifyEnabled=true are failing because they can't find the /libs folder:
Caused by: com.android.tools.r8.utils.AbortException: Error: /Users/username/projects/projectA/path-to-project/libs, java.io.FileNotFoundException:/Users/username/projects/projectA/path-to-project/libs (Is a directory)
at com.android.tools.r8.utils.Reporter.failIfPendingErrors(Reporter.java:116)
at com.android.tools.r8.utils.Reporter.fatalError(Reporter.java:74)
at com.android.tools.r8.dex.ApplicationReader.read(ApplicationReader.java:119)
at com.android.tools.r8.dex.ApplicationReader.read(ApplicationReader.java:86)
at com.android.tools.r8.R8.run(R8.java:251)
at com.android.tools.r8.R8.run(R8.java:229)
at com.android.tools.r8.R8.lambda$run$0(R8.java:134)
at com.android.tools.r8.utils.ExceptionUtils.withCompilationHandler(ExceptionUtils.java:55)
If i set minifyEnabled=false, then the build completes successfully.
I have googled and haven't found anything specific to this issue. Is anyone else running into this?
[SOLVED] It was a proguard issue. In my proguard-rules.pro file, there was a setting of
-injars libs
The intent was to apply to all jars in the libs folder.
Well...somewhere between upgrading to gradle-wrapper 4.9
the behavior with proguard changed. Now I have to explicitly specify the
jar files.
-injars libs/a.jar
-injars libs/b.jar
-injars libs/c.jar
etc...

How to load a dll in Karaf container?

I have a dll which provides a simple functionality (called HelloCpp.dll) and
I need to access to the content of this library from Karaf container via REST calls.
I created a simple maven bundle which provides the REST api and a class (HelloJNI) which loads HelloCpp.dll using: System.loadLibrary("HelloCpp");
I have also addressed this dll in my POM file using: <Bundle-NativeCode>HelloCpp.dll</Bundle-NativeCode>
I have coppied the dll in both project directory and also karaf/lib folder.
I can successfuly install the bundle and I don't receive any compilation error as well, but when I deploy my bundle into Karaf container and try to start bundle, I get this error message: No matching native libraries found.
Could you please help me to solve the problem? Maybe I don't address the dll correctly in the POM file.
Thanks in advance,
Mandana

Glassfish application not working with maven library (gf-client)

For a school assignment I received a Netbeans project using JNDI and JMS with Glassfish (3 open source edition). All the Glassfish libraries this application is using are referenced by absolute path and all the other libraries (in the "lib" folder) are referenced by relative path.
Since my group is working with a version control system the "lib" folder is included in the repository. This works fine because it is a small project. However the Glassfish libraries are problematic as I am a Linux user and the others are Windows users. We have worked around this problem by letting Netbeans take care of the library paths.
The chosen solution 'works' but is not the best solution. I thought Maven would be a better solution.
However the "gf-client" library is giving problems. Whenever I use the Maven "gf-client" the application throw an exception:
javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
Both libraries have "3.1.2" as version. The structures of the libraries look identical and both MANIFEST.MF files too. The size and the md5sum of both files however are not equal.
I've tried all "gf-client" libraries I could find in the default Maven repository and none worked. No other library gives me problems.
Was able to resolve it by adding this to my pom.xml:
<dependency>
<groupId>org.glassfish.main.extras</groupId>
<artifactId>glassfish-embedded-all</artifactId>
<version>3.1.2</version>
</dependency>
The gf-client jar is referring to classes in other jars. The first class it was missing was probably java.naming.factory.initial. But after fixing this it still needed a bunch of other classes. Quickest way for me was to add the glassfish-embedded-all dependency.

Eclipse RCP: Dependencies correct (?) but get a NoClassDefFoundError

I have a RCP project where I cannot fix a NoClassDefFoundError: One plugin depends on another plugin. The plugin-dependencies are set in the manifest, packages exported, and there is no error at compile time. Both plugins are in the product dependencies and visible in the installation details of the product.
But when I run the application I get a java.lang.NoClassDefFoundError when the one plugin wants to use a class from the other plugin.
Any hints how to find the reason for this are greatly appreciated.
Thanks,
Michael
I found the problem: I created the plugin which could not be loaded from an existing Java project. And somehow I deleted the "." in the entry Bundle-classpath in the plugin manifest (the plugin has some jars which -> so lib/xyz.jar was in the Bundle-classpath entry but not the ".").
For the class-loader of the bundle the "." means to search for classes from the root path of the bundle (or something like that), so it could not find the classes. However, there were no errors in the IDE so it was hard to find.
Is the configuration for running the application correct i.e. all dependencies are also put in the running configuration?

Apache Felix Bundle Repository - Calling from another bundle

I have a simple test program which is designed to consume the Apache Felix Bundle Repository bundle service however I am having trouble configuring it through eclipse.
I am using the jar for the bundle (org.apache.felix.bundlerepository-1.4.0.jar) as an referenced library and have added it to the classpath in the manifest.
When I try to start my bundle it gives the error:
java.lang.ClassCastException: org.apache.felix.bundlerepository.RepositoryAdminImpl cannot be cast to org.apache.felix.bundlerepository.RepositoryAdmin
I can't add org.osgi.service.obr to the list of imported packages in my bundle (as it doesnt resolve) and I think this is the reason for the issue.
Any ideas?
Thanks
This was resolved by including the Apache Felix Bundle Repository bundle (org.apache.felix.bundlerepository-1.4.0.jar) in the eclipse/plugins folder which allowed me to reference the org.osgi.service.obr package in the list of imported packages in the manifest.