You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@karaf.apache.org by abhilashb <ab...@in.bosch.com> on 2015/12/04 07:04:07 UTC

Karaf issue while connecting to svn repository via svnkit. - SSLContext issue

Hello All,

I am trying to connect SVN repository with the help of svnkit api. to
checkout few files from svn to local drive.

Below is the code that i am using.

-------

                final String svnurl =
"https://svn_repository_path/folderNameToBeCheckedout";

		String[] bits = svnurl.split("/");
		String folderName = bits[bits.length-1];
		final String destPath = "D:\\svnfiles\\"+folderName;
		SVNRepository repository = null;
		DAVRepositoryFactory.setup();
		repository = SVNRepositoryFactory.create(SVNURL.parseURIEncoded(svnurl));
		ISVNAuthenticationManager authManager =
		SVNWCUtil.createDefaultAuthenticationManager(svnUserName,svnPassword);
		repository.setAuthenticationManager(authManager);
		long latestRevision = repository.getLatestRevision();
		SVNClientManager ourClientManager = SVNClientManager.newInstance();
		ourClientManager.setAuthenticationManager(authManager);
		SVNUpdateClient updateClient = ourClientManager.getUpdateClient();
		updateClient.setIgnoreExternals(false);
		updateClient.doExport(repository.getLocation(), new File(destPath),
	
SVNRevision.create(latestRevision),SVNRevision.create(latestRevision),null,
true, SVNDepth.INFINITY);
		updateClient.setIgnoreExternals(false);
		System.out.println("SVN Checkout complete");
		
----------

Its running perfectly fine when i run it locally.

But when i create OSGI compatible jar and deploy into karaf and try to run .
I am getting the below error-

java.security.NoSuchAlgorithmException: class configured for SSLContext:
sun.security.ssl.SSLContextImpl$TLS10Context not a SSLContext
        at
sun.security.jca.GetInstance.checkSuperClass(GetInstance.java:258)
        at sun.security.jca.GetInstance.getInstance(GetInstance.java:237)
        at sun.security.jca.GetInstance.getInstance(GetInstance.java:164)
        at javax.net.ssl.SSLContext.getInstance(SSLContext.java:27)
        at
com.bosch.service.MServiceManager.execute(MServiceManager.java:149)
        at com.bosch.manager.MManager.onDataResponse(MManager.java:68)
        at com.bosch.redis.MRedis.onDataResponse(MRedis.java:134)
        at
com.bosch.redis.MRedisSubscriber.onMessage(MRedisSubscriber.java:24)
        at redis.clients.jedis.JedisPubSub.process(JedisPubSub.java:113)
        at redis.clients.jedis.JedisPubSub.proceed(JedisPubSub.java:83)
        at redis.clients.jedis.Jedis.subscribe(Jedis.java:1974)
        at
com.bosch.redis.MRedisSubscribeWorker.run(MRedisSubscribeWorker.java:43)
        at java.lang.Thread.run(Thread.java:745)
        at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)


We are trying to resolve this issue by setting the JKS truststore. But even
after setting truststore its not getting resolved.

Anybody out there to help me out to fix this issue, Appreciate the time that
you guys put here to resolve this issue for me.

I am not able to resolve this even after spending so many days.

Please could anybody help me.

fyi - I have installed the below packages in karaf - 

install -s wrap:mvn:org.tmatesoft.svnkit/svnkit/1.8.9








--
View this message in context: http://karaf.922171.n3.nabble.com/Karaf-issue-while-connecting-to-svn-repository-via-svnkit-SSLContext-issue-tp4044097.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.

Re: Karaf issue while connecting to svn repository via svnkit. - SSLContext issue

Posted by abhilashb <ab...@in.bosch.com>.
Hello All,

Could anybody help me out to fix this SSLContext issue in karaf?

Regards,
Abhilash B.



--
View this message in context: http://karaf.922171.n3.nabble.com/Karaf-issue-while-connecting-to-svn-repository-via-svnkit-SSLContext-issue-tp4044097p4044191.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.

Re: Karaf issue while connecting to svn repository via svnkit. - SSLContext issue

Posted by abhilashb <ab...@in.bosch.com>.
Hello JB,

Thank you for the reply.

No I do not use any JCE.

Karaf version is 3.0.1 (apache-karaf-3.0.1).
We start the karaf by running karaf.bat file which is in bin folder.

It looks like the SSLContext doesn't know the security algorithm.  - Then
whats the solution? Any idea?

Regards,
Abhilash B.





--
View this message in context: http://karaf.922171.n3.nabble.com/Karaf-issue-while-connecting-to-svn-repository-via-svnkit-SSLContext-issue-tp4044097p4044100.html
Sent from the Karaf - Dev mailing list archive at Nabble.com.

Re: Karaf issue while connecting to svn repository via svnkit. - SSLContext issue

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Do you have the JCE ? What's your Karaf version and how do you start it ?

It looks like the SSLContext doesn't know the security algorithm.

Regards
JB

On 12/04/2015 07:04 AM, abhilashb wrote:
> Hello All,
>
> I am trying to connect SVN repository with the help of svnkit api. to
> checkout few files from svn to local drive.
>
> Below is the code that i am using.
>
> -------
>
>                  final String svnurl =
> "https://svn_repository_path/folderNameToBeCheckedout";
>
> 		String[] bits = svnurl.split("/");
> 		String folderName = bits[bits.length-1];
> 		final String destPath = "D:\\svnfiles\\"+folderName;
> 		SVNRepository repository = null;
> 		DAVRepositoryFactory.setup();
> 		repository = SVNRepositoryFactory.create(SVNURL.parseURIEncoded(svnurl));
> 		ISVNAuthenticationManager authManager =
> 		SVNWCUtil.createDefaultAuthenticationManager(svnUserName,svnPassword);
> 		repository.setAuthenticationManager(authManager);
> 		long latestRevision = repository.getLatestRevision();
> 		SVNClientManager ourClientManager = SVNClientManager.newInstance();
> 		ourClientManager.setAuthenticationManager(authManager);
> 		SVNUpdateClient updateClient = ourClientManager.getUpdateClient();
> 		updateClient.setIgnoreExternals(false);
> 		updateClient.doExport(repository.getLocation(), new File(destPath),
> 	
> SVNRevision.create(latestRevision),SVNRevision.create(latestRevision),null,
> true, SVNDepth.INFINITY);
> 		updateClient.setIgnoreExternals(false);
> 		System.out.println("SVN Checkout complete");
> 		
> ----------
>
> Its running perfectly fine when i run it locally.
>
> But when i create OSGI compatible jar and deploy into karaf and try to run .
> I am getting the below error-
>
> java.security.NoSuchAlgorithmException: class configured for SSLContext:
> sun.security.ssl.SSLContextImpl$TLS10Context not a SSLContext
>          at
> sun.security.jca.GetInstance.checkSuperClass(GetInstance.java:258)
>          at sun.security.jca.GetInstance.getInstance(GetInstance.java:237)
>          at sun.security.jca.GetInstance.getInstance(GetInstance.java:164)
>          at javax.net.ssl.SSLContext.getInstance(SSLContext.java:27)
>          at
> com.bosch.service.MServiceManager.execute(MServiceManager.java:149)
>          at com.bosch.manager.MManager.onDataResponse(MManager.java:68)
>          at com.bosch.redis.MRedis.onDataResponse(MRedis.java:134)
>          at
> com.bosch.redis.MRedisSubscriber.onMessage(MRedisSubscriber.java:24)
>          at redis.clients.jedis.JedisPubSub.process(JedisPubSub.java:113)
>          at redis.clients.jedis.JedisPubSub.proceed(JedisPubSub.java:83)
>          at redis.clients.jedis.Jedis.subscribe(Jedis.java:1974)
>          at
> com.bosch.redis.MRedisSubscribeWorker.run(MRedisSubscribeWorker.java:43)
>          at java.lang.Thread.run(Thread.java:745)
>          at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>          at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>          at java.lang.Thread.run(Thread.java:745)
>
>
> We are trying to resolve this issue by setting the JKS truststore. But even
> after setting truststore its not getting resolved.
>
> Anybody out there to help me out to fix this issue, Appreciate the time that
> you guys put here to resolve this issue for me.
>
> I am not able to resolve this even after spending so many days.
>
> Please could anybody help me.
>
> fyi - I have installed the below packages in karaf -
>
> install -s wrap:mvn:org.tmatesoft.svnkit/svnkit/1.8.9
>
>
>
>
>
>
>
>
> --
> View this message in context: http://karaf.922171.n3.nabble.com/Karaf-issue-while-connecting-to-svn-repository-via-svnkit-SSLContext-issue-tp4044097.html
> Sent from the Karaf - Dev mailing list archive at Nabble.com.
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com