could not resolve <local:Item> to a component implementation - apache-flex

I am trying to implement item rendere example from TourdeFlex application. However, when I tried to run the application its giving me " could not resolve to a component implementation" error message beside the local items. I also added the assets folder and verified the visualization.swc.
Please let me know the solution to fix the issue.
THanks in advance.
Serenity.

local is XML namespace declared at the top of example, its like import in ActionScript. "Could not resolve" means referenced class is not found. Look at that namespace to determine where it must be placed. For example, xmlns:gui="gui.*" declares namespace gui which references classes from folder "gui".
Edit: xmlns:local="*" means "import all files from src directory". In src should be file Item.mxml or Item.as and it is missing (or failed to compile).

Related

xquery error library modules cannot be evaluated or no namespace declared

When I deploy modules in JBoss, I'm getting errors:
Library modules cannot be evaluated.
Function 'hello' is in reserved namespace.
No namespace declared for 'm:hello'.
xquery version "3.0" encoding "utf-8";
import module namespace m = 'http://basex.org/modules/Hello' at 'HelloWorld2.xq';
m:hello("Universe")
I already had Helloworld2.xq file in my src/main/resources. It is not recognizing or showing as duplicate namespace. Can anyone help me with this?
Unless you are the owner of the domain "basex.org", you should probably use a different namespace for functions you write. Create a namespace in a part of URI space for which you actually do have some naming rights. That should clear at least the second error.
What relative URI to use to find a module appears to be a frequent source of confusion; if you are using BaseX, be sure to read the BaseX documentation on configuring BaseX via web.xml.

executing jar file

I'm trying to get my class "lzw.java" deployed as a jar file ,
I made a manifest.txt , compiled and got all .class files ,put the manifest file along with the created .class files , and entered the command
jar -cvmf manifest.txt lzw.jar *.class
a .jar was created , when I double click it , it gives me "Java Exception error has occured",
having tried to execute it through cmd it gave me " java.lang.NoClassDefFoundError
note : the manifest file contains just a "Main-Class: LZW" followed by new line character
Since you use lzw.java, class and LZW interchanging, I suspect it might be a spelling problem.
lzw.java is the source file, not a class. The class should have the name lzw in this case.
The class file should be lzw.class - if it is not, the name of your class will be like the file-name without dot-class. Of course you choose the right class name in the manifest file.
Post the whole errormessage, not just parts, if this isn't the source of your problem.
Btw.: I suspect you didn't use a package name for your class? And do you know the convention, to user Uperrcase for class names, which would be Lzw in your case - maybe LZW if it is a well established acronym.
This exception means that the JRE is unable to locate the main Java class you are trying to reach. Make sure you are providing the correct class path when running the command.

NoClassDefFoundError: org/jbox2d/collision/shapes/Shape in netbeans

I am trying to add jbox2d as a dependency to my project in netbeans (playn-jbox2d-1.1-SNAPSHOT.jar), but at run time, I get:
Exception in thread "main" java.lang.NoClassDefFoundError: org/jbox2d/collision/shapes/Shape
All other classes can be accessed fine, just not Shape.
I simply right clicked dependencies in my core directory and did add dependency and searched for jbox2d.
Anyone know what could be wrong?
What version of jbox2d do you have, as a dependency? You can crosscheck in the dependency jar file, if that class (Shape.class) exists or not?
EDIT: Most of the times, 'NoClassDefFoundError' happens due to incorrect classpath settings or when there's more than one class (or jar file) in the classpath, with the same namespace.

Compile error in empty cocos2d 2.0 (iPhone)

When I try to compile new cocos2d+box2d project in xcode4.
I got error message like:
/Users/bla-bla/Cocos2d testing/Cocos2d testing/libs/cocos2d/CCDirector.h:32:9: fatal error: 'kazmath/mat4.h' file not found [2]
/Users/bla-bla/Cocos2d testing/Cocos2d testing/libs/cocos2d/CCNode.h:37:9: fatal error: 'kazmath/kazmath.h' file not found [2]
File I checked, what is wrong?
This is caused by having a space in the path name to your project. To work around this, you'll need to add the following under your project's configuration... in Build Settings, in the group of Search Paths, set the Header Search Paths to the following value:
"${SRCROOT}/Cocos2d testing/libs/kazmath/include"
Be sure to include the double-quotes.
did you check in Finder to see if there is a real folder named kazmath in the same path as where CCNode is ? if not, there is probably a flaw in the templates install script for that version of coco. But dont rely on the 'tree view' of the Xcode project navigator to really know whether a file is present or not. If the path is wrong in the include, suggest you report it to the coco team. You could temporarily fix the import statements to get going, but that would be throw-away code :) when coco issues another release candidate, presumably fixed.
Ensure you are editing the right header search paths for the right target. 1 hour of my life wasted editing the main project or the app rather than the test!

"Error #1014: Class mx.core::BitmapAsset could not be found" while trying to use Runtime Shared Library

I've made a runtime shared library for my project, let's call it ResourceLibrary. It contains all of the embedded assets for my project (images, sounds, movie clips) and it's used as a singleton in a lot of other bits of code.
I am compiling it using this batch (Windows unfortunately):
SET normalstuff=--namespace+=http://ns.adobe.com/mxml/2009,${flexlib}/mxml-2009-manifest.xml --namespace+=http://www.adobe.com/2006/mxml,${flexlib}/mxml-manifest.xml --namespace+=library://ns.adobe.com/flex/spark,${flexlib}/spark-manifest.xml -external-library-path lib -external-library-path+=${flexlib}/libs -external-library-path+=${flexlib}/libs/player/10.0
call compc -source-path src/ -output lib-ext/resources.swc -include-namespaces+=http://MYPROJECT -namespace+=http://MYPROJECT,confs/ResourceLibrary-manifest.xml %normalstuff% -library-path+=data/characters -library-path+=data/menus -library-path+=data/icons/relationships -include-lookup-only=true
That makes my resources.swc file, which, when I include this swc in my library and have -static-link-runtime-shared-libraries=true. But I want to not embed my runtime shared libraries in my main swf (cuts down the file size from 10mb to ~3mb), so static-link-runtime-shared-libraries must be false.
When I run my code, however, I get this error:
[Starting debug session with FDB]
[Fault] exception, information=VerifyError: Error #1014: Class mx.core::BitmapAsset could not be found.
I've been raking my brain over this probably super simple solution, but everywhere I look the answer everyone else gets is "static-link-runtime-shared-libraries to true".
Anyone have any clues/ideas on where to start?
I figured this out but forgot to post here.
What you have to do is tell it where the swf to be used will be located, and what classes will be in it (the swc arg)
-runtime-shared-library-path=lib/MyLibrary.swc,MyLibrary.swf
I then extract the swc (using 7zip, but any works) and re-name the extracted swf to "MyLibrary.swf" and move it into the same directory as my main program.
If you're using a SDK that doesn't match the version of Flash Builder you're using, you may need to manually link to that SDK in the project properties.
You do know that creating a swc is not an RSL, right? swc = compile time library. swf = runtime library (or swz if it's Adobe signed libs).
http://livedocs.adobe.com/flex/3/html/help.html?content=rsl_01.html#168690
http://livedocs.adobe.com/flex/3/html/help.html?content=compilers_14.html

Resources