This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 208616 - ClassNotFoundException after updating Equinox to 3.7.1
Summary: ClassNotFoundException after updating Equinox to 3.7.1
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Netigso (show other bugs)
Version: 7.2
Hardware: PC Linux
: P1 normal (vote)
Assignee: Jaroslav Tulach
URL:
Keywords:
: 208609 208613 208770 208773 213742 (view as bug list)
Depends on:
Blocks: 208609
  Show dependency tree
 
Reported: 2012-02-19 19:47 UTC by Vladimir Kvashin
Modified: 2012-06-07 12:37 UTC (History)
7 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Kvashin 2012-02-19 19:47:25 UTC
After change set
http://hg.netbeans.org/main/rev/d4a88ad80530
it is impossible to connect to any remote host,
because a ClassNotFoundException occurs:

java.lang.ClassNotFoundException: javax.crypto.spec.SecretKeySpec
org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:513)
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
java.lang.ClassLoader.loadClass(ClassLoader.java:248)

Caused: java.lang.NoClassDefFoundError: javax/crypto/spec/SecretKeySpec
com.jcraft.jsch.jce.AES256CTR.init(AES256CTR.java:55)
com.jcraft.jsch.Session.checkCipher(Session.java:1980)
com.jcraft.jsch.Session.checkCiphers(Session.java:1957)
com.jcraft.jsch.Session.send_kexinit(Session.java:565)
com.jcraft.jsch.Session.connect(Session.java:282)
org.netbeans.modules.nativeexecution.jsch.JSchChannelsSupport.startNewSession(JSchChannelsSupport.java:194)
...

This makes impossible CND development in remote area.
Comment 1 Jaroslav Tulach 2012-02-20 15:36:07 UTC
Reproduced.
Comment 2 Jaroslav Tulach 2012-02-20 15:38:11 UTC
I've heard about similar problem at 
http://blog.springsource.com/2009/01/19/exposing-the-boot-classpath-in-osgi
Comment 3 Jaroslav Tulach 2012-02-20 19:43:18 UTC
No, the problem is caused by incompatible change in behavior of Equinox between 3.6 and 3.7.1: https://bugs.eclipse.org/bugs/show_bug.cgi?id=344850

Proper fix includes changing the manifest of jsch module to import the necessary packages it needs from JRE using "Import-Package" manifest tag.
Comment 4 Vladimir Voskresensky 2012-02-20 20:53:29 UTC
Could someone do what Jarda proposes asap. This issue *completely* block development of 2 features.
Comment 5 Jesse Glick 2012-02-20 22:32:28 UTC
(In reply to comment #4)
> This issue *completely* block development of 2 features.

We have version control so that statements like this are not true. Just update to b158bc702c70 (the last default-branch cset before the merge of the new Equinox) and work from there. (You cannot push extra heads to the default branch, of course, but you can merge with the other default head just to push it, then return to your anonymous branch to continue work.)
Comment 6 Jaroslav Tulach 2012-02-21 04:57:15 UTC
For now today please run your IDE with -J-Dosgi.compatibility.bootdelegation=true
Comment 7 Vladimir Voskresensky 2012-02-21 08:31:17 UTC
(In reply to comment #6)
> For now today please run your IDE with
> -J-Dosgi.compatibility.bootdelegation=true
Thanks. Will try.
Comment 8 Vladimir Voskresensky 2012-02-21 08:32:27 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > This issue *completely* block development of 2 features.
> 
> We have version control so that statements like this are not true. 
Yes, we know, so backout was more appropiate advise here, but we'll use flag of course
Comment 9 Jesse Glick 2012-02-21 18:26:49 UTC
hg backout is also an option when a regression without workaround needs to be fixed in official trunk builds and a proper fix is not immediately apparent. Development of features affected by a regression on a branch rooted prior to the faulty changeset is less disruptive and works as well if testing of CI binaries is not needed.
Comment 10 Jaroslav Tulach 2012-02-22 18:56:17 UTC
ergonomics#586018b250dd

I've added import of few packages and I am able to connect to my ssh machine. Should you the library need more packages, feel free to extend the import list.
Comment 11 Jesse Glick 2012-02-23 00:45:26 UTC
Cf.: https://bugs.eclipse.org/bugs/show_bug.cgi?id=360663#c12
Comment 12 atsuhiko 2012-02-23 05:33:56 UTC
Hi, I'm the author of JSch.

That ssh2 library supports the packet compression,
and if that functionality is enabled, com.jcraft.jzlib will be also referred.
If NetBeans includes JZlib[1] by the default, I suggest to append
"com.jcraft.jzlib" to the "Import-Package" manifest tag.

[1] http://www.jcraft.com/jzlib/
Comment 13 atsuhiko 2012-02-23 06:34:52 UTC
(In reply to comment #12)
> Hi, I'm the author of JSch.
> 
> That ssh2 library supports the packet compression,
> and if that functionality is enabled, com.jcraft.jzlib will be also referred.
> If NetBeans includes JZlib[1] by the default, I suggest to append
> "com.jcraft.jzlib" to the "Import-Package" manifest tag.
> 
> [1] http://www.jcraft.com/jzlib/

"org.ietf.jgss" should be also appended to it 
for the authentication method "gssapi-with-mic".
Comment 14 Vladimir Voskresensky 2012-02-23 08:30:01 UTC
*** Bug 208773 has been marked as a duplicate of this bug. ***
Comment 15 Vladimir Voskresensky 2012-02-23 08:33:50 UTC
Jarda, can you do what atsuhiko have mentioned? (and yes, we do use compression => jzlib as well)
Comment 16 Quality Engineering 2012-02-24 09:29:41 UTC
Integrated into 'main-golden', will be available in build *201202240400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/586018b250dd
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #208616: In pure OSGi, it is necessary to import packages from javax namespace. Equinox 3.7.1 by default runs in pure OSGi mode.
Comment 17 Jaroslav Tulach 2012-02-24 11:55:58 UTC
(In reply to comment #15)
> Jarda, can you do what atsuhiko have mentioned? (and yes, we do use compression
> => jzlib as well)

I am adding import of "org.ietf.jgss", it was missing. Otherwise our JSch has a "require-bundle" dependency on "jzlib": ergonomics#2297a0262e78
Comment 18 Jaroslav Tulach 2012-02-24 13:41:37 UTC
*** Bug 208613 has been marked as a duplicate of this bug. ***
Comment 19 Jaroslav Tulach 2012-02-24 13:42:14 UTC
*** Bug 208770 has been marked as a duplicate of this bug. ***
Comment 20 Vladimir Kvashin 2012-02-24 14:16:52 UTC
*** Bug 208609 has been marked as a duplicate of this bug. ***
Comment 21 Quality Engineering 2012-02-26 11:16:12 UTC
Integrated into 'main-golden', will be available in build *201202260400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/2297a0262e78
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: Refinement to #208616: adding dep on org.ietf.jgss
Comment 22 Jaroslav Tulach 2012-06-07 12:37:19 UTC
*** Bug 213742 has been marked as a duplicate of this bug. ***