Unable to open an ra_local session to URL

View: New views
6 Messages — Rating Filter:   Alert me  

Unable to open an ra_local session to URL

by Demin Morgan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

I tried this code where urlToRepo is  file:///D:/Repository/repo15

FSRepositoryFactory.setup();
SVNURL url = SVNURL.fromFile(new File(urlToRepo));
repository = SVNRepositoryFactory.create(url);
ISVNAuthenticationManager authManager = SVNWCUtil
                    .createDefaultAuthenticationManager(name, password);
((SVNRepository)repository).setAuthenticationManager(authManager);
repository.testConnection();

and I get the error below.
Note that the same code with other factory.setup() works for svnserve
and http.

A.



Message: svn: Unable to open an ra_local session to URL
svn: Unable to open repository
'file:///D:/workspace/ConnectionTest/CONNECTION/file:/D:/Repository/repo15'
svn: Unable to open repository
'file:///D:/workspace/ConnectionTest/CONNECTION/file:/D:/Repository/repo15'
org.tmatesoft.svn.core.SVNException: svn: Unable to open an ra_local
session to URL
svn: Unable to open repository
'file:///D:/workspace/ConnectionTest/CONNECTION/file:/D:/Repository/repo15'
svn: Unable to open repository
'file:///D:/workspace/ConnectionTest/CONNECTION/file:/D:/Repository/repo15'
        at
org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:64)
        at
org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:51)
        at
org.tmatesoft.svn.core.internal.io.fs.FSRepository.openRepository(FSRepository.java:725)
        at
org.tmatesoft.svn.core.internal.io.fs.FSRepository.testConnection(FSRepository.java:90)
        at
com.arcetis.connection.ConnectionManager.getRepository(ConnectionManager.java:213)
        at
com.arcetis.connection.ConnectionManager.main(ConnectionManager.java:65)
authenticated OK.Message: svn: Unable to open an ra_local session to URL
svn: Unable to open repository
'file:///D:/workspace/ConnectionTest/CONNECTION/file:/D:/Repository/repo15'
svn: Unable to open repository
'file:///D:/workspace/ConnectionTest/CONNECTION/file:/D:/Repository/repo15'
org.tmatesoft.svn.core.SVNException: svn: Unable to open an ra_local
session to URL
svn: Unable to open repository
'file:///D:/workspace/ConnectionTest/CONNECTION/file:/D:/Repository/repo15'
svn: Unable to open repository
'file:///D:/workspace/ConnectionTest/CONNECTION/file:/D:/Repository/repo15'
        at
org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:64)
        at
org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:51)
        at
org.tmatesoft.svn.core.internal.io.fs.FSRepository.openRepository(FSRepository.java:725)
        at
org.tmatesoft.svn.core.internal.io.fs.FSRepository.testConnection(FSRepository.java:90)
        at
com.arcetis.connection.ConnectionManager.main(ConnectionManager.java:67)

---------------------------------------------------------------------
To unsubscribe, e-mail: svnkit-users-unsubscribe@...
For additional commands, e-mail: svnkit-users-help@...


Re: Unable to open an ra_local session to URL

by AlexanderKitaev :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> I tried this code where urlToRepo is  file:///D:/Repository/repo15
>
> FSRepositoryFactory.setup();
> SVNURL url = SVNURL.fromFile(new File(urlToRepo));
Use the following code instead:
SVNURL url = SVNURL.fromFile(new File("D:/Repository/repo15"));

2009/6/15 Demin Morgan <alex.demin.morgan@...>:

> Hello,
>
> I tried this code where urlToRepo is  file:///D:/Repository/repo15
>
> FSRepositoryFactory.setup();
> SVNURL url = SVNURL.fromFile(new File(urlToRepo));
> repository = SVNRepositoryFactory.create(url);
> ISVNAuthenticationManager authManager = SVNWCUtil
>                   .createDefaultAuthenticationManager(name, password);
> ((SVNRepository)repository).setAuthenticationManager(authManager);
> repository.testConnection();
>
> and I get the error below.
> Note that the same code with other factory.setup() works for svnserve and
> http.
>
> A.
>
>
>
> Message: svn: Unable to open an ra_local session to URL
> svn: Unable to open repository
> 'file:///D:/workspace/ConnectionTest/CONNECTION/file:/D:/Repository/repo15'
> svn: Unable to open repository
> 'file:///D:/workspace/ConnectionTest/CONNECTION/file:/D:/Repository/repo15'
> org.tmatesoft.svn.core.SVNException: svn: Unable to open an ra_local session
> to URL
> svn: Unable to open repository
> 'file:///D:/workspace/ConnectionTest/CONNECTION/file:/D:/Repository/repo15'
> svn: Unable to open repository
> 'file:///D:/workspace/ConnectionTest/CONNECTION/file:/D:/Repository/repo15'
>       at
> org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:64)
>       at
> org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:51)
>       at
> org.tmatesoft.svn.core.internal.io.fs.FSRepository.openRepository(FSRepository.java:725)
>       at
> org.tmatesoft.svn.core.internal.io.fs.FSRepository.testConnection(FSRepository.java:90)
>       at
> com.arcetis.connection.ConnectionManager.getRepository(ConnectionManager.java:213)
>       at
> com.arcetis.connection.ConnectionManager.main(ConnectionManager.java:65)
> authenticated OK.Message: svn: Unable to open an ra_local session to URL
> svn: Unable to open repository
> 'file:///D:/workspace/ConnectionTest/CONNECTION/file:/D:/Repository/repo15'
> svn: Unable to open repository
> 'file:///D:/workspace/ConnectionTest/CONNECTION/file:/D:/Repository/repo15'
> org.tmatesoft.svn.core.SVNException: svn: Unable to open an ra_local session
> to URL
> svn: Unable to open repository
> 'file:///D:/workspace/ConnectionTest/CONNECTION/file:/D:/Repository/repo15'
> svn: Unable to open repository
> 'file:///D:/workspace/ConnectionTest/CONNECTION/file:/D:/Repository/repo15'
>       at
> org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:64)
>       at
> org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:51)
>       at
> org.tmatesoft.svn.core.internal.io.fs.FSRepository.openRepository(FSRepository.java:725)
>       at
> org.tmatesoft.svn.core.internal.io.fs.FSRepository.testConnection(FSRepository.java:90)
>       at
> com.arcetis.connection.ConnectionManager.main(ConnectionManager.java:67)
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: svnkit-users-unsubscribe@...
> For additional commands, e-mail: svnkit-users-help@...
>
>



--
Alexander Kitaev,
TMate Software,
http://svnkit.com/ - Java [Sub]Versioning Library!
Sent from Prague, Czech Republic

---------------------------------------------------------------------
To unsubscribe, e-mail: svnkit-users-unsubscribe@...
For additional commands, e-mail: svnkit-users-help@...


Re: Unable to open an ra_local session to URL

by Demin Morgan :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks.

Alexander Kitaev wrote:
I tried this code where urlToRepo is  file:///D:/Repository/repo15

FSRepositoryFactory.setup();
SVNURL url = SVNURL.fromFile(new File(urlToRepo));
    
Use the following code instead:
SVNURL url = SVNURL.fromFile(new File("D:/Repository/repo15"));

2009/6/15 Demin Morgan alex.demin.morgan@...:
  
Hello,

I tried this code where urlToRepo is  file:///D:/Repository/repo15

FSRepositoryFactory.setup();
SVNURL url = SVNURL.fromFile(new File(urlToRepo));
repository = SVNRepositoryFactory.create(url);
ISVNAuthenticationManager authManager = SVNWCUtil
                  .createDefaultAuthenticationManager(name, password);
((SVNRepository)repository).setAuthenticationManager(authManager);
repository.testConnection();

and I get the error below.
Note that the same code with other factory.setup() works for svnserve and
http.

A.



Message: svn: Unable to open an ra_local session to URL
svn: Unable to open repository
'file:///D:/workspace/ConnectionTest/CONNECTION/file:/D:/Repository/repo15'
svn: Unable to open repository
'file:///D:/workspace/ConnectionTest/CONNECTION/file:/D:/Repository/repo15'
org.tmatesoft.svn.core.SVNException: svn: Unable to open an ra_local session
to URL
svn: Unable to open repository
'file:///D:/workspace/ConnectionTest/CONNECTION/file:/D:/Repository/repo15'
svn: Unable to open repository
'file:///D:/workspace/ConnectionTest/CONNECTION/file:/D:/Repository/repo15'
      at
org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:64)
      at
org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:51)
      at
org.tmatesoft.svn.core.internal.io.fs.FSRepository.openRepository(FSRepository.java:725)
      at
org.tmatesoft.svn.core.internal.io.fs.FSRepository.testConnection(FSRepository.java:90)
      at
com.arcetis.connection.ConnectionManager.getRepository(ConnectionManager.java:213)
      at
com.arcetis.connection.ConnectionManager.main(ConnectionManager.java:65)
authenticated OK.Message: svn: Unable to open an ra_local session to URL
svn: Unable to open repository
'file:///D:/workspace/ConnectionTest/CONNECTION/file:/D:/Repository/repo15'
svn: Unable to open repository
'file:///D:/workspace/ConnectionTest/CONNECTION/file:/D:/Repository/repo15'
org.tmatesoft.svn.core.SVNException: svn: Unable to open an ra_local session
to URL
svn: Unable to open repository
'file:///D:/workspace/ConnectionTest/CONNECTION/file:/D:/Repository/repo15'
svn: Unable to open repository
'file:///D:/workspace/ConnectionTest/CONNECTION/file:/D:/Repository/repo15'
      at
org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:64)
      at
org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:51)
      at
org.tmatesoft.svn.core.internal.io.fs.FSRepository.openRepository(FSRepository.java:725)
      at
org.tmatesoft.svn.core.internal.io.fs.FSRepository.testConnection(FSRepository.java:90)
      at
com.arcetis.connection.ConnectionManager.main(ConnectionManager.java:67)

---------------------------------------------------------------------
To unsubscribe, e-mail: svnkit-users-unsubscribe@...
For additional commands, e-mail: svnkit-users-help@...


    



  


Re: Unable to open an ra_local session to URL

by Shekhar reddy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello ,

I am new to svn programming.
I am trying using following code to access local svn file (download from svn)  and using svnkit.jar file.

                  FSRepositoryFactory.setup();
                 SVNURL targetUrl = null;
                 File targetPath = new File("C:/bioportal");
                 targetUrl = SVNURL.fromFile(targetPath);
                 SVNRepository repository = FSRepositoryFactory.create(targetUrl);  
                 repository.testConnection();

i am getting following exception while executing repository.testConnection(); line  as follows


org.tmatesoft.svn.core.SVNException: svn: Unable to open an ra_local session to URL
svn: Unable to open repository 'file:///C:/bioportal'
svn: Unable to open repository 'file:///C:/bioportal'
        at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:49)
        at org.tmatesoft.svn.core.internal.io.fs.FSRepository.openRepository(FSRepository.java:93)
        at org.tmatesoft.svn.core.internal.io.fs.FSRepository.testConnection(FSRepository.java:81)
        at org.ncbo.stanford.util.svn.TestClass.getAllSVNEntries(TestClass.java:43)
        at org.ncbo.stanford.util.svn.TestClass.main(TestClass.java:28)

i want use following code to get Directories info
Collection entries = repository.getDir( path, -1 , null , (Collection) null );

Please help me to solve this.
Thanks in Advance!!!!!!!!!!!!.


Thanks,
Shekhar.









Demin Morgan wrote:
Hello,

I tried this code where urlToRepo is  file:///D:/Repository/repo15

FSRepositoryFactory.setup();
SVNURL url = SVNURL.fromFile(new File(urlToRepo));
repository = SVNRepositoryFactory.create(url);
ISVNAuthenticationManager authManager = SVNWCUtil
                    .createDefaultAuthenticationManager(name, password);
((SVNRepository)repository).setAuthenticationManager(authManager);
repository.testConnection();

and I get the error below.
Note that the same code with other factory.setup() works for svnserve
and http.

A.



Message: svn: Unable to open an ra_local session to URL
svn: Unable to open repository
'file:///D:/workspace/ConnectionTest/CONNECTION/file:/D:/Repository/repo15'
svn: Unable to open repository
'file:///D:/workspace/ConnectionTest/CONNECTION/file:/D:/Repository/repo15'
org.tmatesoft.svn.core.SVNException: svn: Unable to open an ra_local
session to URL
svn: Unable to open repository
'file:///D:/workspace/ConnectionTest/CONNECTION/file:/D:/Repository/repo15'
svn: Unable to open repository
'file:///D:/workspace/ConnectionTest/CONNECTION/file:/D:/Repository/repo15'
        at
org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:64)
        at
org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:51)
        at
org.tmatesoft.svn.core.internal.io.fs.FSRepository.openRepository(FSRepository.java:725)
        at
org.tmatesoft.svn.core.internal.io.fs.FSRepository.testConnection(FSRepository.java:90)
        at
com.arcetis.connection.ConnectionManager.getRepository(ConnectionManager.java:213)
        at
com.arcetis.connection.ConnectionManager.main(ConnectionManager.java:65)
authenticated OK.Message: svn: Unable to open an ra_local session to URL
svn: Unable to open repository
'file:///D:/workspace/ConnectionTest/CONNECTION/file:/D:/Repository/repo15'
svn: Unable to open repository
'file:///D:/workspace/ConnectionTest/CONNECTION/file:/D:/Repository/repo15'
org.tmatesoft.svn.core.SVNException: svn: Unable to open an ra_local
session to URL
svn: Unable to open repository
'file:///D:/workspace/ConnectionTest/CONNECTION/file:/D:/Repository/repo15'
svn: Unable to open repository
'file:///D:/workspace/ConnectionTest/CONNECTION/file:/D:/Repository/repo15'
        at
org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:64)
        at
org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:51)
        at
org.tmatesoft.svn.core.internal.io.fs.FSRepository.openRepository(FSRepository.java:725)
        at
org.tmatesoft.svn.core.internal.io.fs.FSRepository.testConnection(FSRepository.java:90)
        at
com.arcetis.connection.ConnectionManager.main(ConnectionManager.java:67)

---------------------------------------------------------------------
To unsubscribe, e-mail: svnkit-users-unsubscribe@svnkit.com
For additional commands, e-mail: svnkit-users-help@svnkit.com

Re: Unable to open an ra_local session to URL

by Alexander Sinyushkin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

What you are doing is you are trying to open a local SVN repository over
the file:/// protocol..
But SVNKit finds no repository layout under C:/bioportal. If I
understand correctly,
you have a working copy under this path.

SVNRepository class is intended for direct accessing a Subversion
repository, not working copies.
Set your targetURL to the repository URL (where you have checked out
your working copy).
If it's an svn:// URL, don't forget to call
SVNRepositoryFactoryImpl.setup(),
if http:// - DAVRepositoryFactory.setup() prior to any calls to
SVNRepository.

----
Alexander Sinyushkin,
TMate Software,
http://svnkit.com/ - Java [Sub]Versioning Library!
http://sqljet.com/ - Java SQLite Library!



Shekhar reddy wrote:

> Hello ,
>
> I am new to svn programming.
> I am trying using following code to access local svn file (download from
> svn)  and using svnkit.jar file.
>
>                   FSRepositoryFactory.setup();
> SVNURL targetUrl = null;
> File targetPath = new File("C:/bioportal");
> targetUrl = SVNURL.fromFile(targetPath);
> SVNRepository repository = FSRepositoryFactory.create(targetUrl);  
> repository.testConnection();
>
> i am getting following exception while executing
> repository.testConnection(); line  as follows
>
>
> org.tmatesoft.svn.core.SVNException: svn: Unable to open an ra_local session
> to URL
> svn: Unable to open repository 'file:///C:/bioportal'
> svn: Unable to open repository 'file:///C:/bioportal'
> at
> org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:49)
> at
> org.tmatesoft.svn.core.internal.io.fs.FSRepository.openRepository(FSRepository.java:93)
> at
> org.tmatesoft.svn.core.internal.io.fs.FSRepository.testConnection(FSRepository.java:81)
> at org.ncbo.stanford.util.svn.TestClass.getAllSVNEntries(TestClass.java:43)
> at org.ncbo.stanford.util.svn.TestClass.main(TestClass.java:28)
>
> i want use following code to get Directories info
> Collection entries = repository.getDir( path, -1 , null , (Collection) null
> );
>
> Please help me to solve this.
> Thanks in Advance!!!!!!!!!!!!.
>
>
> Thanks,
> Shekhar.
>
>
>
>
>
>
>
>
>
>
> Demin Morgan wrote:
>  
>> Hello,
>>
>> I tried this code where urlToRepo is  file:///D:/Repository/repo15
>>
>> FSRepositoryFactory.setup();
>> SVNURL url = SVNURL.fromFile(new File(urlToRepo));
>> repository = SVNRepositoryFactory.create(url);
>> ISVNAuthenticationManager authManager = SVNWCUtil
>>                     .createDefaultAuthenticationManager(name, password);
>> ((SVNRepository)repository).setAuthenticationManager(authManager);
>> repository.testConnection();
>>
>> and I get the error below.
>> Note that the same code with other factory.setup() works for svnserve
>> and http.
>>
>> A.
>>
>>
>>
>> Message: svn: Unable to open an ra_local session to URL
>> svn: Unable to open repository
>> 'file:///D:/workspace/ConnectionTest/CONNECTION/file:/D:/Repository/repo15'
>> svn: Unable to open repository
>> 'file:///D:/workspace/ConnectionTest/CONNECTION/file:/D:/Repository/repo15'
>> org.tmatesoft.svn.core.SVNException: svn: Unable to open an ra_local
>> session to URL
>> svn: Unable to open repository
>> 'file:///D:/workspace/ConnectionTest/CONNECTION/file:/D:/Repository/repo15'
>> svn: Unable to open repository
>> 'file:///D:/workspace/ConnectionTest/CONNECTION/file:/D:/Repository/repo15'
>>         at
>> org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:64)
>>         at
>> org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:51)
>>         at
>> org.tmatesoft.svn.core.internal.io.fs.FSRepository.openRepository(FSRepository.java:725)
>>         at
>> org.tmatesoft.svn.core.internal.io.fs.FSRepository.testConnection(FSRepository.java:90)
>>         at
>> com.arcetis.connection.ConnectionManager.getRepository(ConnectionManager.java:213)
>>         at
>> com.arcetis.connection.ConnectionManager.main(ConnectionManager.java:65)
>> authenticated OK.Message: svn: Unable to open an ra_local session to URL
>> svn: Unable to open repository
>> 'file:///D:/workspace/ConnectionTest/CONNECTION/file:/D:/Repository/repo15'
>> svn: Unable to open repository
>> 'file:///D:/workspace/ConnectionTest/CONNECTION/file:/D:/Repository/repo15'
>> org.tmatesoft.svn.core.SVNException: svn: Unable to open an ra_local
>> session to URL
>> svn: Unable to open repository
>> 'file:///D:/workspace/ConnectionTest/CONNECTION/file:/D:/Repository/repo15'
>> svn: Unable to open repository
>> 'file:///D:/workspace/ConnectionTest/CONNECTION/file:/D:/Repository/repo15'
>>         at
>> org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:64)
>>         at
>> org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:51)
>>         at
>> org.tmatesoft.svn.core.internal.io.fs.FSRepository.openRepository(FSRepository.java:725)
>>         at
>> org.tmatesoft.svn.core.internal.io.fs.FSRepository.testConnection(FSRepository.java:90)
>>         at
>> com.arcetis.connection.ConnectionManager.main(ConnectionManager.java:67)
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: svnkit-users-unsubscribe@...
>> For additional commands, e-mail: svnkit-users-help@...
>>
>>
>>
>>    
>
>  

---------------------------------------------------------------------
To unsubscribe, e-mail: svnkit-users-unsubscribe@...
For additional commands, e-mail: svnkit-users-help@...


Re: Unable to open an ra_local session to URL

by Shekhar reddy :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thank you Friend!,

Now I am able to get list all files from Working copy. I am doing like this , now it is working fine.
I am send my code , this will may help to developers.

               
          final HashMap<String ,CVSFile> update=new HashMap<String, CVSFile>();
                 DAVRepositoryFactory.setup();
                 ISVNAuthenticationManager  authManager = SVNWCUtil.createDefaultAuthenticationManager("anonymous","anonymous");
             ISVNOptions options = SVNWCUtil.createDefaultOptions(true);
                 SVNLogClient svnLogClient = new SVNLogClient(authManager,options);

              try{
String svnCheckoutDir="c:/wc"
                 svnLogClient.doList(new File(svnCheckoutDir),
                                     SVNRevision.WORKING,
                                     SVNRevision.WORKING,
                                     false,
                                     true,
                                     new ISVNDirEntryHandler()
                                        {
                                        public void handleDirEntry(SVNDirEntry entry) throws SVNException
                                           {
                                           if (entry.getKind() == SVNNodeKind.FILE)
                                              {
                                           Calendar cal = Calendar.getInstance();
                            cal.setTimeInMillis(entry.getDate().getTime());
                            GregorianCalendar gCal = new GregorianCalendar();
                            gCal.set(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH), cal.get(Calendar.DAY_OF_MONTH));
                            System.out.println("url"+entry.getURL());
                                          update.put(entry.getName(), new CVSFile(svnCheckoutDir+"/"+entry.getRelativePath(),gCal, new Long(entry.getRevision()).toString()));
                                              } // End of if
                                            } // End of handleDirEntry method
                                        } // End of ISVNDirEntryHandler
                                     );
                    } catch(Exception e){
                           e.printStackTrace();
                   } // End of try
               
                 for(Iterator iterator = update.entrySet (  ) .iterator (  ) ; iterator.hasNext (  ) ; )   {  
                     Map.Entry entry =  ( Map.Entry )  iterator.next (  ) ;
                     String key =  ( String ) entry.getKey (  ) ;
                     CVSFile value =  ( CVSFile ) entry.getValue (  ) ;
                     System.out.print("**key"+ key);
                     System.out.println("value :"+ value.getPath());
                     System.out.println("value :"+ value.getVersion());
                  }
           return update;
         
Thanks
Shekhar.


====================================


Alexander Sinyushkin wrote:
Hello,

What you are doing is you are trying to open a local SVN repository over
the file:/// protocol..
But SVNKit finds no repository layout under C:/bioportal. If I
understand correctly,
you have a working copy under this path.

SVNRepository class is intended for direct accessing a Subversion
repository, not working copies.
Set your targetURL to the repository URL (where you have checked out
your working copy).
If it's an svn:// URL, don't forget to call
SVNRepositoryFactoryImpl.setup(),
if http:// - DAVRepositoryFactory.setup() prior to any calls to
SVNRepository.

----
Alexander Sinyushkin,
TMate Software,
http://svnkit.com/ - Java [Sub]Versioning Library!
http://sqljet.com/ - Java SQLite Library!



Shekhar reddy wrote:
> Hello ,
>
> I am new to svn programming.
> I am trying using following code to access local svn file (download from
> svn)  and using svnkit.jar file.
>
>                   FSRepositoryFactory.setup();
> SVNURL targetUrl = null;
> File targetPath = new File("C:/bioportal");
> targetUrl = SVNURL.fromFile(targetPath);
> SVNRepository repository = FSRepositoryFactory.create(targetUrl);  
> repository.testConnection();
>
> i am getting following exception while executing
> repository.testConnection(); line  as follows
>
>
> org.tmatesoft.svn.core.SVNException: svn: Unable to open an ra_local session
> to URL
> svn: Unable to open repository 'file:///C:/bioportal'
> svn: Unable to open repository 'file:///C:/bioportal'
> at
> org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:49)
> at
> org.tmatesoft.svn.core.internal.io.fs.FSRepository.openRepository(FSRepository.java:93)
> at
> org.tmatesoft.svn.core.internal.io.fs.FSRepository.testConnection(FSRepository.java:81)
> at org.ncbo.stanford.util.svn.TestClass.getAllSVNEntries(TestClass.java:43)
> at org.ncbo.stanford.util.svn.TestClass.main(TestClass.java:28)
>
> i want use following code to get Directories info
> Collection entries = repository.getDir( path, -1 , null , (Collection) null
> );
>
> Please help me to solve this.
> Thanks in Advance!!!!!!!!!!!!.
>
>
> Thanks,
> Shekhar.
>
>
>
>
>
>
>
>
>
>
> Demin Morgan wrote:
>  
>> Hello,
>>
>> I tried this code where urlToRepo is  file:///D:/Repository/repo15
>>
>> FSRepositoryFactory.setup();
>> SVNURL url = SVNURL.fromFile(new File(urlToRepo));
>> repository = SVNRepositoryFactory.create(url);
>> ISVNAuthenticationManager authManager = SVNWCUtil
>>                     .createDefaultAuthenticationManager(name, password);
>> ((SVNRepository)repository).setAuthenticationManager(authManager);
>> repository.testConnection();
>>
>> and I get the error below.
>> Note that the same code with other factory.setup() works for svnserve
>> and http.
>>
>> A.
>>
>>
>>
>> Message: svn: Unable to open an ra_local session to URL
>> svn: Unable to open repository
>> 'file:///D:/workspace/ConnectionTest/CONNECTION/file:/D:/Repository/repo15'
>> svn: Unable to open repository
>> 'file:///D:/workspace/ConnectionTest/CONNECTION/file:/D:/Repository/repo15'
>> org.tmatesoft.svn.core.SVNException: svn: Unable to open an ra_local
>> session to URL
>> svn: Unable to open repository
>> 'file:///D:/workspace/ConnectionTest/CONNECTION/file:/D:/Repository/repo15'
>> svn: Unable to open repository
>> 'file:///D:/workspace/ConnectionTest/CONNECTION/file:/D:/Repository/repo15'
>>         at
>> org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:64)
>>         at
>> org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:51)
>>         at
>> org.tmatesoft.svn.core.internal.io.fs.FSRepository.openRepository(FSRepository.java:725)
>>         at
>> org.tmatesoft.svn.core.internal.io.fs.FSRepository.testConnection(FSRepository.java:90)
>>         at
>> com.arcetis.connection.ConnectionManager.getRepository(ConnectionManager.java:213)
>>         at
>> com.arcetis.connection.ConnectionManager.main(ConnectionManager.java:65)
>> authenticated OK.Message: svn: Unable to open an ra_local session to URL
>> svn: Unable to open repository
>> 'file:///D:/workspace/ConnectionTest/CONNECTION/file:/D:/Repository/repo15'
>> svn: Unable to open repository
>> 'file:///D:/workspace/ConnectionTest/CONNECTION/file:/D:/Repository/repo15'
>> org.tmatesoft.svn.core.SVNException: svn: Unable to open an ra_local
>> session to URL
>> svn: Unable to open repository
>> 'file:///D:/workspace/ConnectionTest/CONNECTION/file:/D:/Repository/repo15'
>> svn: Unable to open repository
>> 'file:///D:/workspace/ConnectionTest/CONNECTION/file:/D:/Repository/repo15'
>>         at
>> org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:64)
>>         at
>> org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:51)
>>         at
>> org.tmatesoft.svn.core.internal.io.fs.FSRepository.openRepository(FSRepository.java:725)
>>         at
>> org.tmatesoft.svn.core.internal.io.fs.FSRepository.testConnection(FSRepository.java:90)
>>         at
>> com.arcetis.connection.ConnectionManager.main(ConnectionManager.java:67)
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: svnkit-users-unsubscribe@svnkit.com
>> For additional commands, e-mail: svnkit-users-help@svnkit.com
>>
>>
>>
>>    
>
>  

---------------------------------------------------------------------
To unsubscribe, e-mail: svnkit-users-unsubscribe@svnkit.com
For additional commands, e-mail: svnkit-users-help@svnkit.com