Skip to main content



      Home
Home » Eclipse Projects » Kura » Need help on javax.smartcardio(Got the "java.lang.NoClassDefFoundError: javax/smartcardio/CardException" when deployed the bundle to kura)
Need help on javax.smartcardio [message #1743641] Sat, 17 September 2016 12:42 Go to next message
Eclipse UserFriend
Hi,
Have tried to deploy the bundle using javax.smartcardio.* to communicate with the smartcard on Kura and got the "java.lang.NoClassDefFoundError: javax/smartcardio/CardException".

Although added below virtual parameter to start_kura_background.sh
-Dorg.osgi.framework.system.packages.extra=javax.smartcardio,version=1.0, the problem was not solved.
Moreover, also tried to add the above parameter to either kura_custom.properties or config.ini, the issue still same.

Please help me on this issue.

NOTE: When tried to run the bundle as a standalone application, it was working fine.

Thanks.
Huy

[Updated on: Mon, 19 September 2016 11:54] by Moderator

Re: Need help on javax.smartcardio [message #1743804 is a reply to message #1743641] Mon, 19 September 2016 13:56 Go to previous messageGo to next message
Eclipse UserFriend
Hi Huy,
could you give us some more details on your bundle and how it interacts with javax.smartcardio?
Did you import the Java.smartcardio package in the dependencies section of the MANIFEST.MF file?

Matteo
Re: Need help on javax.smartcardio [message #1743820 is a reply to message #1743804] Mon, 19 September 2016 22:10 Go to previous messageGo to next message
Eclipse UserFriend
Hi Matteo,

The bundle communicates with card by using javax.smartcardio.CommandAPDU and runs on equinox OSGI within eclipse without any error. Then, the bundle is deployed on Kura and gets the ClassNotFoundException.

Later, the bundle is simplified by removing everything and only importing the javax.smartcardio.CardException class in the Activator class, and the same issue still occurs when it is deployed on Kura. This showed that the javax.smartcardio.* are not seen by the bundle.

In the MANIFEST.MF, tried to import javax.smartcardio in Imported-Packages section, but it doesn't allow as this package doesn't export for reference in the bundle. Then I've try to import the package by using DynamicImport-Package section but got same issue.

I've confirmed that javax.smartcardio.* are inside in the rt.jar whose JDK is using by Kura.
Re: Need help on javax.smartcardio [message #1743920 is a reply to message #1743820] Tue, 20 September 2016 11:44 Go to previous messageGo to next message
Eclipse UserFriend
Finally, got it working by adding the -Dorg.osgi.framework.system.packages.extra=javax.smartcardio,version=1.0 to kura/start_kura_background.sh, and adding javax.smartcardio;version="0.0.0";resolution:=optional to Import-Package.

[Updated on: Tue, 20 September 2016 12:42] by Moderator

Re: Need help on javax.smartcardio [message #1743933 is a reply to message #1743920] Tue, 20 September 2016 14:07 Go to previous messageGo to next message
Eclipse UserFriend
Great news!
Thanks for reporting this success!

Matteo
Re: Need help on javax.smartcardio [message #1791235 is a reply to message #1743641] Tue, 26 June 2018 09:34 Go to previous message
Eclipse UserFriend
Hello,
I tried to use javax.smartcardio in a Kura bundle, but I still have a ClassNotFoundException even with suggestions above.
I checked that javax.smartcardio package is available in my Java environment.
Any advice welcome!
Thanks
Previous Topic:Kura 3.2.0 CA-signed x.509 Azure IoT Hub
Next Topic:Something is wrong in Eclipse repository (same in Eclipse Kura repository).
Goto Forum:
  


Current Time: Wed Jun 18 02:29:18 EDT 2025

Powered by FUDForum. Page generated in 0.07862 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top