I keep getting this error
Uncaught exception java/lang/NoClassDefFoundError: org/xmlpull/v1/XmlPullParserException.
when I try to run a MIDlet with KXmlParser.
I have included the kxml2-2.3.0.jar lib into project build path, and it is visible under the 'Referenced libraries'.
I guess that the library is still not included in the Midlet JAR, but do not know how to correct this?
I am using Nokia SDK 1.0 and Eclipse Indigo.
On the build path dialog of your project, select the Order and Export tab and select the kxml jar file so that it is exported.
Related
I recently moved a couple of applications to a server that is running Domino 9.0.1FP8 (JVM version: JRE 1.8.0 Windows Server 2008 R2 amd64-64). Since I did this I've been unable to load any, but the most basic of Xpages. I get the "Error 500 HTTP Web Server: Command Not Handled Exception" page.
Via the ...IBM\Domino\data\IBM_TECHNICAL_SUPPORT\xpages_exec I get Exceptions such as:
The type java.util.Comparator cannot be resolved. It is indirectly referenced from required .class files
The type java.util.Map$Entry cannot be resolved. It is indirectly referenced from required .class files
The import java.util.Arrays cannot be resolved
I'm also getting the following Errors in the "Problems" tab in Designer:
"The project was not built since its build path is incomplete. Cannot
find the class file for java.util.Comparator. Fix the build path then
try building this project"
"The type java.util.Comparator cannot be resolved. It is indirectly
referenced from required .class files"
Is there a reason the java.util is failing in Java 1.8? Is there anything I can do? Thanks for any help.
Dan
This problem occurs when Domino Designer 9.0.1 FP8 attempts to compile against a Java8 JRE. The version of eclipse in that Designer install does not know how to parse some of the runtime jar files in Java8. The workaround is to compile against a Java6 JRE instead. There were changes in the Domino Designer installation as part of SPR#BGLN9PXEVM to change the configuration of the preferences in Designer to point to a Java6 JRE instead of using the default JRE. If there was some install problem or you manually modified your preferences, you may need to manually re-apply the workaround as follows.
In Domino Designer, menu File, Preferences, Java, Installed JREs.
There should be 2 listed JVMs with paths like so:
[x] jvm C:\Notes\jvm1.6\
[ ] Notes 8.5.1 VM (locked) C:\Notes\jvm
If your entry named "jvm" is incorrectly pointing to the C:\Notes\jvm\ folder instead of the jvm1.6 folder, then you will need to edit it to point to the jvm1.6 folder instead.
On the Domino Designer team we are investigating potentially upgrading the eclipse version in Designer, so that it might be possible to compile against a Java8 JRE.
It sounds like the installer has not installed successfully. There's no reason java.util packages should be failing. I would recommend running the installer again, making sure all services are stopped prior to running it. That will ensure that anything that needs replacing isn't locked by another process.
I'm new to this. I generated a new project using libgdx project generator, all worked fine. Then I tried to add liquidfun extension to the library using the following tutorial: https://github.com/finnstr/gdx-liquidfun-extension/wiki/Setup.
It compiles all the dependencies are seen in the editor but at runtime I get this error.
java.lang.NoClassDefFoundError: Failed resolution of:
Lcom/badlogic/gdx/physics/box2d/World; 10-09 10:29:50.698
12790-12895/com.mygdx.game.android E/AndroidRuntime: at
com.mygdx.game.MyGdxGame.createBox2DWorld(MyGdxGame.java:87)
Caused
by: java.lang.ClassNotFoundException: Didn't find class
"com.badlogic.gdx.physics.box2d.World" on path: DexPathList[[zip file
"/data/app/com.mygdx.game.android-1/base.apk"],nativeLibraryDirectories=[/data/app/com.mygdx.game.android-1/lib/arm,
/vendor/lib, /system/lib]]
I am concered of this part of the tutorial which is made for eclipse. I don't know how to configure this in Android Studio.
To do so you should right click on android project and select
Properties -> Java Build Path -> Add external Jar and pick
core/libs/gdx-liquidfun.jar. Last step is to check this library in
Order and export.
Note: I also tried to load the native libraries and they throw no error.
static {
System.loadLibrary("gdx-liquidfun");
System.loadLibrary("gdx-box2d");
}
I figured it out. I had to right click the jar and Add As Library. I had to copy the jar to android/libs. The one from core/libs didn't have the option to Add as Library
I'm migrating an existing, working project from Eclipse to Android Studio. The code base consists of a native C++ library built with the NDK (libMylib.so), a Java class that wraps all the native code (MyClass.java), and a test harness(MyApp).
In Android Studio, I've created a stand-alone project (not just a module) that builds "MyClass", and that project has a "src/main/jniLibs" folder where I place "libMyLibrary.so".
The project builds and produces "MyClass.aar", which contains all of its dependencies -- including those .so files.
My test app imports this .aar file as a new dependency "module". It builds and deploys to a device, but encounters a runtime exception when trying to call a native method contained in the .so file.
Trying to load lib /data/data/com.mycompany.webview/lib/libMylib.so 0x4131cd18
Added shared lib /data/data/com.mycompany.webview/lib/libMylib.so 0x4131cd18
nativeCalls.cpp﹕ JNI_OnLoad() called successfully.
No implementation found for native Lcom/mycompany/Mylib/MyClass;.nativeInit
Shutting down VM
The debug statement printed in "JNI_OnLoad()" is mine, so I know the correct .so is being loaded without issue. But then something goes wrong with the call to 'nativeInit()'.
What sorts of things could cause this kind of failure?
Thanks.
1) What value does JNI_OnLoad() return? In the code that I have it is JNI_VERSION_1_6.
2) Are the function names correct?
cd bin/classes
javah com.example.MyClass com.example.OneMoreClass
This will generate the correct C/C++ headers for your native functions.
Has anyone had success implementing IBM Worklight 5.0.6 Adapters using the Groovy language? Ie. Instead of calling a Java class from the JS adapter call a Groovy class. We have tried this and it seems to work most of the time but randomly we will get strange errors when invoking an adapter procedure. Ie.
Failed to create DGM method proxy : java.lang.NoSuchMethodException: org.codehaus.groovy.runtime.dgm$24.<init>(java.lang.String, org.codehaus.groovy.reflection.CachedClass, java.lang.Class, [Ljava.lang.Class;)
FWLSE0101E: Caused by: java.lang.NoSuchMethodException: org.codehaus.groovy.runtime.dgm$24.<init>(java.lang.String, org.codehaus.groovy.reflection.CachedClass, java.lang.Class, [Ljava.lang.Class;)
Unit tests executing the Groovy code run fine within Eclipse and the Groovy code seems to be compiling fine down to .class files and included in the adapter package. We're wondering if this is an issue with Groovy itself or invoking Groovy within the Worklight server container. I believe Worklight is using Rhino behind the scenes which may also be a culprit?
We are using Groovy 2.1.5 and the Eclipse plugin 2.8
did you open the .war and check if all compiled classes and libraries are actually in there?
We had the case quite often that the WL Eclipse Plugin/Build did not compile and package our Java Classes for the Adapter in the "server" folder ... they were missing in the .war file that we deployed and we got all sorts of Rhino, ClassNotFound etc. errors.
In addition to previous answer. You can always force a rebuild by selecting the project in the Enterprise Explorer or Navigator views, then select menu Project -> Clean -> Clean Projects Selected Below (the only choice should be your project).
This will clean the binaries, then rebuild your entire project.
I was trying to add the actionbarsherlock libary moet I'm getting the following error:
The project cannot be built until build path errors are resolved Unknown Java Problem
When I look into the tab 'Builth path' I see libary.jar is missing. But there isn´t a file called libary.jar?
I've already set the compiler to Java 1.6, but it's still not working. The target SDK of both projects is Android 4.0
I hope anyone can help!
I tried to switch to Java 1.7 and let Android fix my project properties. (I got a message). After that, it worked for me!