Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Virgo » java.lang.ClassNotFoundException on virgo (java.lang.ClassNotFoundException: javax.crypto.Mac excpetiin in Virgo 3.6.4)
java.lang.ClassNotFoundException on virgo [message #1712144] Wed, 21 October 2015 13:57 Go to next message
Kees Pieters is currently offline Kees PietersFriend
Messages: 6
Registered: October 2015
Junior Member
After a few weeks of fruitless experimenting, I have come to the conclusion that I need help. This is the situation:

1: I run a virgo 3.6.4 kernel with a Jetty server
2: One of the bundles I have built uses twitter4j.jar, which is packed as a library in the bundle
3: When I run the bundle on a local target (RAP application) everything works fine.

Then I put the bundle on Virgo, and it throws the exception:

Caused by: java.lang.ClassNotFoundException: javax.crypto.Mac
(it starts up without problems, so the the exception is thrown when the code is called)

The Virgo kernel is configured with a standard java6 profile, which contains the required javax.crypto packages, so I fail to see why the packages are not recognised. I jave used various JRE/JDK versions, but all seem to throw the same exception.

The only thing that I can come up with is that the jetty server somehow does not see the javax.to code. I run the jetty server as a plan in its own repository and plan.

Any help as to where I need to look in order to fix this problem would be greatly appreciated!
Thanks

Re: java.lang.ClassNotFoundException on virgo [message #1712377 is a reply to message #1712144] Fri, 23 October 2015 12:03 Go to previous messageGo to next message
daniel marthaler is currently offline daniel marthalerFriend
Messages: 77
Registered: April 2012
Location: Z├╝rich
Member
Hi Kees

You could add "javax.crypto" and "javax.crypto.*" to the "org.osgi.framework.bootdelegation" property in the "$SERVER_HOME/configuration/java6-server.profile" as we did on our side using Virgo Server for Apache Tomcat.
Or you can try to add it to "packageImports" in the "$SERVER_HOME/configuration/org.eclipse.virgo.kernel.userregion.properties". I can't remeber if we tried that but reading the documentation [1] this should be sufficient.
Let me know if you could resolve the issue.

[1] https://www.eclipse.org/virgo/documentation/virgo-documentation-3.6.4.RELEASE/docs/virgo-user-guide/htmlsingle/virgo-user-guide.html#configuring-framework-profile

[Updated on: Fri, 23 October 2015 12:25]

Report message to a moderator

Re: java.lang.ClassNotFoundException on virgo [message #1712406 is a reply to message #1712377] Fri, 23 October 2015 15:56 Go to previous message
Kees Pieters is currently offline Kees PietersFriend
Messages: 6
Registered: October 2015
Junior Member
Hi Daniel,

That solved it! java6-server.profile already has the packageImports set correctly, but not the bootdelegation. I added this and everything works fine now!

Thanks a lot!

Kees
Previous Topic:Install Virgo Tools without internet access
Next Topic:Duplicate jars
Goto Forum:
  


Current Time: Sun Sep 23 08:02:52 GMT 2018

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

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

Back to the top