Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Subversive » Sporatic build-errors after automated checkout
Sporatic build-errors after automated checkout [message #43911] Tue, 07 April 2009 19:15 Go to next message
Kevin Russ is currently offline Kevin RussFriend
Messages: 5
Registered: July 2009
Junior Member
Hello

within a continous integration plugin for the automated build of CDT
projects I perform SVN checkout via subversive-api.

I use the org.eclipse.team.svn.core.operation.remote.CheckoutOperation
executed within a org.eclipse.core.resources.WorkspaceJob like:

public class SvnCheckoutJob extends WorkspaceJob {
public IStatus runInWorkspace(IProgressMonitor monitor) throws
CoreException {
...
CheckoutOperation op = new CheckoutOperation(resourceMapping, false,
null, Depth.INFINITY, true);
op.run(new SubProgressMonitor(monitor, 1));
}
}

In the subsequent build of the projects I get sometimes errors of the types
ResourceException thrown by
org.eclipse.core.internal.resources.Project::internalBuild (522) or
NullPointerException thrown by
org.eclipse.cdt.managedbuilder.internal.core.ManagedBuildInf o::getConfigurationNames
(226)

The errors occure very sporatic, but only after checkout, never if just
update on existing projects of a workspace was performed.
Do I miss some refresh-operation as follow-up, or do I have to switch to
another thread-context here??

Any help would be great, as I'm already struggling for weeks with that
problem.


Thanks in advance,

Kevin Russ
Re: Sporatic build-errors after automated checkout [message #44101 is a reply to message #43911] Thu, 09 April 2009 09:10 Go to previous messageGo to next message
Igor Burilo is currently offline Igor BuriloFriend
Messages: 435
Registered: July 2009
Senior Member
Hello Kevin,

It's hard to say what the problem could be.
You said that you have two kinds of errors
(org.eclipse.core.internal.resources.Project::internalBuild and
NullPointerException), could you write what the problem they are talking
about(or what is reason of NPE) and so we'll be able to understand where the
problem is.
Probably, you have problems during check out, do you have any related
messages in Error Log view? Is the project checked out correctly?
Maybe it's not important but you wrote that you used WorkspaceJob ("A
WorkspaceJob is the asynchronous equivalent of IWorkspaceRunnable"), so try
to run check out operation synchronously.

> Hello
>
> within a continous integration plugin for the automated build of CDT
> projects I perform SVN checkout via subversive-api.
>
> I use the org.eclipse.team.svn.core.operation.remote.CheckoutOperation
> executed within a org.eclipse.core.resources.WorkspaceJob like:
>
> public class SvnCheckoutJob extends WorkspaceJob {
> public IStatus runInWorkspace(IProgressMonitor monitor) throws
> CoreException {
> ...
> CheckoutOperation op = new CheckoutOperation(resourceMapping, false, null,
> Depth.INFINITY, true);
> op.run(new SubProgressMonitor(monitor, 1));
> }
> }
>
> In the subsequent build of the projects I get sometimes errors of the
> types
> ResourceException thrown by
> org.eclipse.core.internal.resources.Project::internalBuild (522) or
> NullPointerException thrown by
> org.eclipse.cdt.managedbuilder.internal.core.ManagedBuildInf o::getConfigurationNames
> (226)
>
> The errors occure very sporatic, but only after checkout, never if just
> update on existing projects of a workspace was performed.
> Do I miss some refresh-operation as follow-up, or do I have to switch to
> another thread-context here??
>
> Any help would be great, as I'm already struggling for weeks with that
> problem.
>
>
> Thanks in advance,
>
> Kevin Russ
>
>
Re: Sporatic build-errors after automated checkout [message #44131 is a reply to message #44101] Thu, 09 April 2009 18:31 Go to previous message
Kevin Russ is currently offline Kevin RussFriend
Messages: 5
Registered: July 2009
Junior Member
Hi,

thanks for your answer!

The checkout seems to be successfully,- I get no messages in the error-log.

I remeber that I've once traced an NPE down till ManagedProject from
org.eclipse.cdt.managedbuilder.internal.core, were the configMap contained
a null element. But had no idea what the cause could be.

Strange to me is the following: If any of the errors after automted
checkout and build occure,- they woun't disapear for the specific project
even on manual refresh and build, until I restart the workbench... then
everything is ok again. This implies that the project was physically
checked out correct, right ?

My plugin does in short terms the following:

Within a scheduled job serveral operations are performed subsequently.
If anything critical to workspace is done (SVN Checkout, Setting
Configurations, Build a Project, etc.) I always start a WorkspaceJob with
a specific job-rule (project or workspace) and wait for termination via
join().

The error ocurence sound to me a bit like a race-condition. We have over
one hundered projects to build per run and maybe every 2. or 3. run will
fail by such an exception.

So I'll try your tip with the IWorkspaceRunnable as next...

Kevin.
Previous Topic:Changed files not recognized on Vista installation
Next Topic:SVN 1.6 support
Goto Forum:
  


Current Time: Sat Apr 20 03:19:46 GMT 2024

Powered by FUDForum. Page generated in 0.02648 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top