Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Fail to pull/push"Could not initialize class javax.crypto.SunJCE_b"
Fail to pull/push"Could not initialize class javax.crypto.SunJCE_b" [message #1237673] Thu, 30 January 2014 09:47 Go to next message
Shai R is currently offline Shai RFriend
Messages: 7
Registered: January 2014
Junior Member
Hey !

I am having troubles pulling / pushing to a BitBucket account.
I am using - MAC OSX 10.9.1 , Java 1.6.0_65 64Bit

Everything was fine until 2 weeks ago. every time i tried to pull from BitBucket i get this error in Eclipse:
An internal error occurred during: "Pulling Branch master - projectName".
Could not initialize class javax.crypto.SunJCE_b


From command line, it works well but not using Egit.
I replaced the *_policy.jar , gave all the required permissions to security folder and files in it
Also generated new rsa keys

Still i get this error.

Any ideas what else i can do?

Thanks!
Re: Fail to pull/push"Could not initialize class javax.crypto.SunJCE_b" [message #1238024 is a reply to message #1237673] Fri, 31 January 2014 07:33 Go to previous messageGo to next message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1268
Registered: July 2009
Senior Member
- which egit version are you using ?
- did you change the Java version or the way how you access it in between ?
- obviously native git doesn't use Java so it can't be affected by a problem loading some Java class
- maybe you are trying to run Eclipse on JRE instead of JDK ?
- Open "Preferences > Java > Installed JREs" and check if you are using a full JDK or just JRE
Re: Fail to pull/push"Could not initialize class javax.crypto.SunJCE_b" [message #1238740 is a reply to message #1238024] Sun, 02 February 2014 08:08 Go to previous messageGo to next message
Shai R is currently offline Shai RFriend
Messages: 7
Registered: January 2014
Junior Member
I am using egit version 3.2.0.201312181205-r
Looking at Eclipse prefrences , I am using :
Java SE 6 [1.6.0_65-b14-462]
JRE home:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home

I guess this is pre installed in a Mac machine and i assume by the path it is a JDK.
The problem started when i installed JRE 7u51. I removed this installation but it still not working for me.

Any ideas how can i fix it?

Thanks !
Re: Fail to pull/push"Could not initialize class javax.crypto.SunJCE_b" [message #1238754 is a reply to message #1238740] Sun, 02 February 2014 09:12 Go to previous messageGo to next message
Shai R is currently offline Shai RFriend
Messages: 7
Registered: January 2014
Junior Member
I reinstalled Java 6 for Mac (Distributed by Apple - Java for OS X 2013-005)
Seems like problem solved.

Thanks
Re: Fail to pull/push"Could not initialize class javax.crypto.SunJCE_b" [message #1239065 is a reply to message #1238754] Mon, 03 February 2014 09:03 Go to previous messageGo to next message
Shai R is currently offline Shai RFriend
Messages: 7
Registered: January 2014
Junior Member
well, I thought the problem solved.... it did not Sad
Now here is the stack trace:

java.lang.NoClassDefFoundError: Could not initialize class javax.crypto.SunJCE_b
at javax.crypto.Cipher.getInstance(DashoA13*..)
at com.jcraft.jsch.jce.AES256CTR.init(AES256CTR.java:56)
at com.jcraft.jsch.Session.checkCipher(Session.java:2469)
at com.jcraft.jsch.Session.checkCiphers(Session.java:2446)
at com.jcraft.jsch.Session.send_kexinit(Session.java:615)
at com.jcraft.jsch.Session.connect(Session.java:307)
at org.eclipse.jgit.transport.JschConfigSessionFactory.getSession(JschConfigSessionFactory.java:116)
at org.eclipse.jgit.transport.SshTransport.getSession(SshTransport.java:121)
at org.eclipse.jgit.transport.TransportGitSsh$SshPushConnection.<init>(TransportGitSsh.java:306)
at org.eclipse.jgit.transport.TransportGitSsh.openPush(TransportGitSsh.java:152)
at org.eclipse.jgit.transport.PushProcess.execute(PushProcess.java:154)
at org.eclipse.jgit.transport.Transport.push(Transport.java:1173)
at org.eclipse.jgit.api.PushCommand.call(PushCommand.java:156)
at org.eclipse.egit.core.op.PushOperation.run(PushOperation.java:221)
at org.eclipse.egit.ui.internal.push.PushOperationUI.execute(PushOperationUI.java:164)
at org.eclipse.egit.ui.internal.push.PushOperationUI$1.run(PushOperationUI.java:226)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)

Re: Fail to pull/push"Could not initialize class javax.crypto.SunJCE_b" [message #1239180 is a reply to message #1239065] Mon, 03 February 2014 15:13 Go to previous messageGo to next message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1268
Registered: July 2009
Senior Member
Maybe Eclipse is still started using the JRE7 you installed.
Try to explicitly set the JVM to be used when starting Eclipse, see [1].

In short on a Mac navigate to the Eclipse.app of your Eclipse installation, click "Show package contents" to
show its content and edit Contents/MacOS/eclipse.ini as described in [1].

Alternatively you may change JAVA_HOME e.g. in your bash profile.
I have
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home
in my ~/.bash_profile

[1] https://wiki.eclipse.org/Eclipse.ini#Specifying_the_JVM
Re: Fail to pull/push"Could not initialize class javax.crypto.SunJCE_b" [message #1239904 is a reply to message #1239180] Wed, 05 February 2014 09:53 Go to previous messageGo to next message
Shai R is currently offline Shai RFriend
Messages: 7
Registered: January 2014
Junior Member
I edited eclipse.ini as described. this is how it looks:
startup
../../../plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
--launcher.library
../../../plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.200.v20130807-1835
-product
org.eclipse.epp.package.standard.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vm
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
-vmargs
-Dosgi.requiredJavaVersion=1.6
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts
-XX:MaxPermSize=256m
-Xms40m
-Xmx512m
-Xdock:icon=../Resources/Eclipse.icns
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts


I still get the same error message.
Re: Fail to pull/push"Could not initialize class javax.crypto.SunJCE_b" [message #1240062 is a reply to message #1239904] Wed, 05 February 2014 16:13 Go to previous messageGo to next message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1268
Registered: July 2009
Senior Member
Looking at the wiki page mentioned above I think you need to append /bin/java to your configuration.
So try

-vm
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java
Re: Fail to pull/push"Could not initialize class javax.crypto.SunJCE_b" [message #1240410 is a reply to message #1240062] Thu, 06 February 2014 11:40 Go to previous messageGo to next message
Shai R is currently offline Shai RFriend
Messages: 7
Registered: January 2014
Junior Member
I tried appending /bin/java yet it did not work....
I installed Java again , just as i did before and now i can pull and commit and it works great. (hope it will stay like it Smile )

Thanks for the help !
Re: Fail to pull/push"Could not initialize class javax.crypto.SunJCE_b" [message #1242317 is a reply to message #1240410] Sun, 09 February 2014 10:31 Go to previous message
Shai R is currently offline Shai RFriend
Messages: 7
Registered: January 2014
Junior Member
The problems returns....
As if something just goes by it self and modify things.

:-/
Previous Topic:Does EGit support the double asterisk in .gitignore files
Next Topic:Marketplace always shows update available
Goto Forum:
  


Current Time: Tue Apr 23 06:31:55 GMT 2024

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

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

Back to the top