Using External jars as a Library causes java.lang.NoClassDefFoundError | Telit Cinterion IoT Developer Community
May 17, 2017 - 5:24pm, 39879 views
I am running my MIDlet on the EHS5 and it gives me NoClassDefFoundError. I have tried to follow the previous thread : https://iot-developer.thalesgroup.com/threads/using-external-jars-library , but it didn't solve my problem. I have added my external jars to the Build Path (in libarires) as well as checked it in (Order and Export) , but the the problem still exists. Can anyone provide me a solution to that? Thanks .
Please open the Application Descriptor for the project and verify Runtime on the Overview tab. There should be IMP_NG_EHS5_REMOTE1 instead of IMP_NG_EHS5. Is the debug dialup connection established?
Hello Mr. Bartlomiej,
It (IMP_NG_EHS5_REMOTE1) has already been selected. Please have a look at Image ehs5img.png .I have already looked into those threads in which you have mentioned that. The IP is assigned ( debug connection established), but after that it doesn't connect to the module and timeout. Kindly have a look at the last post in which I have added an image to what happens.
- One thing I want to make sure is that by turning off the firewalls you mean only turning any sought of windows firewall or anything else ? Can you kindly guide me into that a bit because I have turned off only windows firewall.
- How it can be checked whether the IP traffic is not blocked ?
The debugging data is sent over the special dialup connection with TCP/IP. So you need to make sure that any software, in particular any firewall (Windows or other) is blocking the communication between the addresses 192.168.244.1 and 192.168.244.2.
The easiest way would be to disable all the firewall software for test. Then you could configure the software to allow this traffic.
The error in your log is not unambiguous unfortunately to be sure that there can be only one cause of the fail. But the firewall could be to blame here.
Hello Mr. Bartlomiej,
Does it mean I have to give APN , Username and Password of the Sim if it has one.
Is it similar to using the AT ^SJNET command ?
192.168.244.1 and 192.168.244.2 are IP addresses of what ( One would be for the debugging device I assume)?
No you don't need any APN configuration. The communication is local between the module and PC. And the addresses are used for the communication between the module and PC.
I have the same problem. Whenever I include an external .jar file, (bouncycastle or others), I allways get the error when I run the middlet on the EHS6 module: java.lang.NoClassDefFoundError.
Could you explain a little bit more how did you solve that problem using Ant Scripts in eclipse?
Thakns in advance.
I observed that obfuscation causes problems when I am using some external libraries ( No idea about that ). So, I just used ANT to make a build and deployed the resulting .jar and .jad files on the modules.
-Please have a look at the figures. Click on Export Antenna build files ( First Image).
- Click on Application Descriptor then create package and then J2me Preferences and then set the paths according to the installations. Go the .xml file under mtj-build ( it's named as mtj-build.xml ) then right click and run as ant build. If you get an error saying javac 1.8 not found then go to the mtj-build.xml and right click Run as External tool configurations and give this as an argument : -Dbuild.compiler=javac1.7 I hope it solves the problem.