Hi Praveen, You should find all necessary information in https://github.com/apache/jackrabbit/pull/92/files <https://github.com/apache/jackrabbit/pull/92/files> but be aware that you need 2.20.2 or newer for it to work (https://issues.apache.org/jira/browse/JCR-4536 <https://issues.apache.org/jira/browse/JCR-4536>).
An example usage can be found in https://github.com/apache/jackrabbit-filevault/blob/0b8a264140b23daf474443e30117bd77a70667de/vault-davex/src/main/java/org/apache/jackrabbit/vault/davex/DAVExRepositoryFactory.java#L115 <https://github.com/apache/jackrabbit-filevault/blob/0b8a264140b23daf474443e30117bd77a70667de/vault-davex/src/main/java/org/apache/jackrabbit/vault/davex/DAVExRepositoryFactory.java#L115> You have to populate the https://jackrabbit.apache.org/api/2.20/org/apache/jackrabbit/spi2dav/ConnectionOptions.html <https://jackrabbit.apache.org/api/2.20/org/apache/jackrabbit/spi2dav/ConnectionOptions.html> first and then call https://jackrabbit.apache.org/api/2.20/org/apache/jackrabbit/spi2dav/ConnectionOptions.html#toServiceFactoryParameters-- <https://jackrabbit.apache.org/api/2.20/org/apache/jackrabbit/spi2dav/ConnectionOptions.html#toServiceFactoryParameters-->. Those parameters you have to pass to the repository factory. Hope this helps, Konrad > On 18. Aug 2022, at 07:53, Praveen Kumar SM <praveenkumar0809...@gmail.com> > wrote: > > Hi All, > > Please let me know how to disable cert check from java code for https > jackrabbit url. > > I tried below approaches but did not work. > > > *java -Dcom.sun.jndi.ldap.object.disableEndpointIdentification=true -cp > target/mymvnproj-1.0-SNAPSHOT.jar org.example.Main* > > *java -Dcom.sun.net.ssl.checkRevocation=false -cp > target/mymvnproj-1.0-SNAPSHOT.jar org.example.Main* > > My code is below, > > Repository repository = new URLRemoteRepository(" > https://myhost:8443/jackrabbit-webapp-2.20.6/rmi",verify=False); > Session session = repository.login(new > SimpleCredentials("admin","admin".toCharArray())); > > I am getting below exception. > > javax.jcr.RepositoryException: Remote repository not found: The resource at > https:// myhost:8443/jackrabbit-webapp-2.20.6/rmi could not be retrieved: > sun.security.validator.ValidatorException: PKIX path building failed: > sun.secur > ity.provider.certpath.SunCertPathBuilderException: unable to find valid > certification path to requested target: > sun.security.validator.ValidatorException: PKIX path building failed: > sun.security.provider.certpath.SunCertPathBuilderE > xception: unable to find valid certification path to requested target > at > org.apache.jackrabbit.rmi.repository.URLRemoteRepositoryFactory.getRemoteRepository(URLRemoteRepositoryFactory.java:84) > at > org.apache.jackrabbit.rmi.repository.AbstractRemoteRepositoryFactory.getRepository(AbstractRemoteRepositoryFactory.java:59) > at > org.apache.jackrabbit.commons.repository.ProxyRepository.getRepository(ProxyRepository.java:101) > at > org.apache.jackrabbit.commons.repository.ProxyRepository.login(ProxyRepository.java:198) > at > org.apache.jackrabbit.commons.AbstractRepository.login(AbstractRepository.java:144) > at org.example.Main.main(Main.java:19) > Caused by: javax.net.ssl.SSLHandshakeException: > sun.security.validator.ValidatorException: PKIX path building failed: > sun.security.provider.certpath.SunCertPathBuilderException: unable to find > valid certification path to requested t > arget > at sun.security.ssl.Alert.createSSLException(Unknown Source) > at sun.security.ssl.TransportContext.fatal(Unknown Source) > > > Thanks > Praveen.