Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jgit-dev] (no subject)


I have one error with egit >= 2.2.0 until 3.5.2 eclipse 4.4.1.
egit <= 2.1.x works fine.

But I think that the problem is in the jgit.
Lot's of the times it give me Cast error when fetch/push with GITBLIT server.


!ENTRY org.eclipse.egit.core 4 0 2014-11-19 09:23:04.674
!MESSAGE An exception occurred during push on URI https://git.agbar.local/r/AquaCIS_CF/proyectos.git: com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnectionOldImpl cannot be cast to javax.net.ssl.HttpsURLConnection
!STACK 0
java.lang.ClassCastException: com.sun.net.ssl.internal.www.protocol.https.HttpsURLConnectionOldImpl cannot be cast to javax.net.ssl.HttpsURLConnection
at org.eclipse.jgit.transport.http.JDKHttpConnection.configure(JDKHttpConnection.java:191)
at org.eclipse.jgit.transport.TransportHttp.disableSslVerify(TransportHttp.java:570)
at org.eclipse.jgit.transport.TransportHttp.httpOpen(TransportHttp.java:544)
at org.eclipse.jgit.transport.TransportHttp.httpOpen(TransportHttp.java:526)
at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:468)
at org.eclipse.jgit.transport.TransportHttp.openPush(TransportHttp.java:399)
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:228)
at org.eclipse.egit.ui.internal.push.PushOperationUI.execute(PushOperationUI.java:167)
at org.eclipse.egit.ui.internal.push.PushOperationUI$1.run(PushOperationUI.java:229)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

I think that the problem is there:

https://github.com/eclipse/jgit/blob/9fd1325ecbdfaa41965782166e77d0dc8dd936ec/org.eclipse.jgit/src/org/eclipse/jgit/transport/TransportHttp.java#L460


The URL is constructed without define any implementation.
u = new URL(b.toString());

This change should fix it :
HTTP
= new URL(b.toString(), new sun.net.www.protocol.https.Handler());

HTTPS
= new URL(b.toString(), new sun.net.www.protocol.https.Handler());


Articles
http://stackoverflow.com/questions/23517139/java-lang-classcastexception-com-sun-net-ssl-internal-www-protocol-https-httpsu
https://community.oracle.com/thread/1536137?start=0&tstart=0


-------------------------------------
Marco Sousa

Back to the top