Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 16:42 Go to next message
Huy Ho is currently offline Huy HoFriend
Messages: 3
Registered: September 2016
Junior Member
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 15:54]

Report message to a moderator

Re: Need help on javax.smartcardio [message #1743804 is a reply to message #1743641] Mon, 19 September 2016 17:56 Go to previous messageGo to next message
Matteo Maiero is currently offline Matteo MaieroFriend
Messages: 423
Registered: July 2015
Location: Italy
Senior Member
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] Tue, 20 September 2016 02:10 Go to previous messageGo to next message
Huy Ho is currently offline Huy HoFriend
Messages: 3
Registered: September 2016
Junior Member
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 15:44 Go to previous messageGo to next message
Huy Ho is currently offline Huy HoFriend
Messages: 3
Registered: September 2016
Junior Member
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 16:42]

Report message to a moderator

Re: Need help on javax.smartcardio [message #1743933 is a reply to message #1743920] Tue, 20 September 2016 18:07 Go to previous messageGo to next message
Matteo Maiero is currently offline Matteo MaieroFriend
Messages: 423
Registered: July 2015
Location: Italy
Senior Member
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 13:34 Go to previous message
Olivier GUICHARD is currently offline Olivier GUICHARDFriend
Messages: 1
Registered: June 2018
Junior Member
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: Fri Apr 19 15:31:51 GMT 2024

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

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

Back to the top