[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[Subclipse-users] JUnit Plugin Test in Eclipse - NullPointerException and SVNClientException when performing file operations

From: Patrick Könemann <pk_at_imm.dtu.dk>
Date: Wed, 12 Mar 2008 15:10:32 +0100

Hi everyone,

I get a SVNClientException and a NullPointerException if I copy a versioned file in my workspace using the following code:

IPath path = new Path("/testProject/folder1/test.txt");
IPath path2 = new Path("/testProject/folder1/test2.txt");
IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
file.copy(path2, false, null);

The SVNClientException is the first exception, the NullPointerException is thrown afterwards:

org.tigris.subversion.svnclientadapter.SVNClientException: No subversion client interface found.
at org.tigris.subversion.svnclientadapter.SVNClientAdapterFactory.getPreferredSVNClientType(SVNClientAdapterFactory.java:86)
at org.tigris.subversion.subclipse.core.SVNClientManager.setSvnClientInterface(SVNClientManager.java:59)
at org.tigris.subversion.subclipse.core.SVNClientManager.getSvnClientInterface(SVNClientManager.java:97)
at org.tigris.subversion.subclipse.core.SVNClientManager.createSVNClient(SVNClientManager.java:114)
at org.tigris.subversion.subclipse.core.SVNProviderPlugin.createSVNClient(SVNProviderPlugin.java:415)
at org.tigris.subversion.subclipse.core.status.NonRecursiveStatusUpdateStrategy.statusesToUpdate(NonRecursiveStatusUpdateStrategy.java:53)
at org.tigris.subversion.subclipse.core.status.StatusCacheManager.refreshStatus(StatusCacheManager.java:264)
at org.tigris.subversion.subclipse.core.resourcesListeners.FileModificationManager.refreshStatus(FileModificationManager.java:172)
at org.tigris.subversion.subclipse.core.resourcesListeners.FileModificationManager.resourceChanged(FileModificationManager.java:121)
at org.eclipse.core.internal.events.NotificationManager$2.run(NotificationManager.java:282)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:276)
---cut---

java.lang.NullPointerException
at org.tigris.subversion.subclipse.core.status.NonRecursiveStatusUpdateStrategy.statusesToUpdate(NonRecursiveStatusUpdateStrategy.java:54)
at org.tigris.subversion.subclipse.core.status.StatusCacheManager.refreshStatus(StatusCacheManager.java:264)
at org.tigris.subversion.subclipse.core.resourcesListeners.FileModificationManager.refreshStatus(FileModificationManager.java:172)
at org.tigris.subversion.subclipse.core.resourcesListeners.FileModificationManager.resourceChanged(FileModificationManager.java:121)
at org.eclipse.core.internal.events.NotificationManager$2.run(NotificationManager.java:282)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:276)
---cut---

My code is executed in a JUnit4 test in Eclipse, where the runtime workspace contains the project "testProject" which is under version control.
If I execute the code in a normal runtime workbench, no exception is thrown!
So I assume that there is something different in the Junit workbench..?

Subclipse version is 1.2.4

Any help appreciated
Patrick

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subclipse.tigris.org
For additional commands, e-mail: users-help_at_subclipse.tigris.org
Received on 2008-03-12 15:19:14 CET

This is an archived mail posted to the Subclipse Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.