History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: SCM-193
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Critical Critical
Assignee: Emmanuel Venisse
Reporter: Carlos Sanchez
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Maven SCM

NullPointer in local provider update when a new file is added

Created: 02/May/06 05:31 PM   Updated: 17/Apr/07 04:21 AM
Component/s: maven-scm-provider-local
Affects Version/s: 1.0-beta-3
Fix Version/s: 1.0-beta-4

Time Tracking:
Not Specified

Complexity: Intermediate


 Description  « Hide

org.apache.maven.continuum.scm.ContinuumScmException: Error while update sources.
at org.apache.maven.continuum.scm.DefaultContinuumScm.updateProject(DefaultContinuumScm.java:272)
at org.apache.maven.continuum.core.action.UpdateWorkingDirectoryFromScmContinuumAction.execute(UpdateWorkingDirectoryFromScmContinuumAction.java:58)
at org.apache.maven.continuum.buildcontroller.DefaultBuildController.build(DefaultBuildController.java:166)
at org.apache.maven.continuum.buildcontroller.BuildProjectTaskExecutor.executeTask(BuildProjectTaskExecutor.java:47)
at org.codehaus.plexus.taskqueue.execution.ThreadedTaskQueueExecutor$ExecutorRunnable.run(ThreadedTaskQueueExecutor.java:103)
at java.lang.Thread.run(Thread.java:595)
Caused by: org.apache.maven.scm.ScmException: Exception while executing SCM command.
at org.apache.maven.scm.command.AbstractCommand.execute(AbstractCommand.java:59)
at org.apache.maven.scm.provider.local.LocalScmProvider.update(LocalScmProvider.java:191)
at org.apache.maven.scm.provider.AbstractScmProvider.update(AbstractScmProvider.java:386)
at org.apache.maven.scm.provider.AbstractScmProvider.update(AbstractScmProvider.java:363)
at org.apache.maven.continuum.scm.DefaultContinuumScm.updateProject(DefaultContinuumScm.java:242)
... 5 more
Caused by: java.lang.NullPointerException
at java.util.Date.getMillisOf(Date.java:938)
at java.util.Date.after(Date.java:911)
at org.apache.maven.scm.command.update.AbstractUpdateCommand.executeCommand(AbstractUpdateCommand.java:89)
at org.apache.maven.scm.command.AbstractCommand.execute(AbstractCommand.java:55)
... 9 more



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Carlos Sanchez - 02/May/06 05:32 PM
File is copied anyway although the exception is thrown

Emmanuel Venisse - 04/May/06 06:10 PM
Fixed in AbstractUpdateCommand

Marius Barbulescu - 13/Apr/07 05:20 AM
I get the same error in 1.0.3 when the project is scheduled to run.
If I trigger a manual build it works fine.
Probably is not enough information to understand the problem. Please tell me what info do you need and how to get it.

Here is the log:

INFO | jvm 1 | 2007/04/13 10:30:00 | 2007-04-13 10:30:00,020 [defaultScheduler_Worker-11] INFO SchedulesActivator - >>>>>>>>>>>>>>>>>>>>> Executing build job (test)...
INFO | jvm 1 | 2007/04/13 10:30:00 | 2007-04-13 10:30:00,036 [defaultScheduler_Worker-11] INFO Continuum - Enqueuing 'NSD' (Build definition id=1).
INFO | jvm 1 | 2007/04/13 10:30:00 | 2007-04-13 10:30:00,036 [defaultScheduler_Worker-11] INFO Continuum - Enqueuing 'OSS_FWK' (Build definition id=11).
INFO | jvm 1 | 2007/04/13 10:30:00 | 2007-04-13 10:30:00,223 [Thread-2] INFO ContinuumScm - Updating project: id: '1', name 'NSD'.
INFO | jvm 1 | 2007/04/13 10:30:00 | 2007-04-13 10:30:00,411 [Thread-2] INFO ScmManager - Updating 'c:\installed\continuum-1.0.3\bin\win32\..\..\apps\continuum\working-directory\1' from 'Y:\wran_cm_nsd'.
INFO | jvm 1 | 2007/04/13 10:31:00 | 2007-04-13 10:31:00,411 [Thread-2] INFO BuildController - The project was not built because there are no changes.
INFO | jvm 1 | 2007/04/13 10:31:00 | 2007-04-13 10:31:00,489 [Thread-2] INFO ContinuumScm - Updating project: id: '11', name 'OSS_FWK'.
INFO | jvm 1 | 2007/04/13 10:31:00 | 2007-04-13 10:31:00,521 [Thread-2] INFO ScmManager - Updating 'c:\installed\continuum-1.0.3\bin\win32\..\..\apps\continuum\working-directory\11' from 'Y:\ossrc_fwk'.
INFO | jvm 1 | 2007/04/13 10:31:09 | 2007-04-13 10:31:09,786 [Thread-2] ERROR BuildController - Error while building project.
INFO | jvm 1 | 2007/04/13 10:31:09 | org.apache.maven.continuum.scm.ContinuumScmException: Error while update sources.
INFO | jvm 1 | 2007/04/13 10:31:09 | at org.apache.maven.continuum.scm.DefaultContinuumScm.updateProject(DefaultContinuumScm.java:272)
INFO | jvm 1 | 2007/04/13 10:31:09 | at org.apache.maven.continuum.core.action.UpdateWorkingDirectoryFromScmContinuumAction.execute(UpdateWorkingDirectoryFromScmContinuumAction.java:58)
INFO | jvm 1 | 2007/04/13 10:31:09 | at org.apache.maven.continuum.buildcontroller.DefaultBuildController.build(DefaultBuildController.java:166)
INFO | jvm 1 | 2007/04/13 10:31:09 | at org.apache.maven.continuum.buildcontroller.BuildProjectTaskExecutor.executeTask(BuildProjectTaskExecutor.java:47)
INFO | jvm 1 | 2007/04/13 10:31:09 | at org.codehaus.plexus.taskqueue.execution.ThreadedTaskQueueExecutor$ExecutorRunnable.run(ThreadedTaskQueueExecutor.java:103)
INFO | jvm 1 | 2007/04/13 10:31:09 | at java.lang.Thread.run(Thread.java:595)
INFO | jvm 1 | 2007/04/13 10:31:09 | Caused by: org.apache.maven.scm.ScmException: Exception while executing SCM command.
INFO | jvm 1 | 2007/04/13 10:31:09 | at org.apache.maven.scm.command.AbstractCommand.execute(AbstractCommand.java:59)
INFO | jvm 1 | 2007/04/13 10:31:09 | at org.apache.maven.scm.provider.local.LocalScmProvider.update(LocalScmProvider.java:191)
INFO | jvm 1 | 2007/04/13 10:31:09 | at org.apache.maven.scm.provider.AbstractScmProvider.update(AbstractScmProvider.java:386)
INFO | jvm 1 | 2007/04/13 10:31:09 | at org.apache.maven.scm.provider.AbstractScmProvider.update(AbstractScmProvider.java:363)
INFO | jvm 1 | 2007/04/13 10:31:09 | at org.apache.maven.continuum.scm.DefaultContinuumScm.updateProject(DefaultContinuumScm.java:242)
INFO | jvm 1 | 2007/04/13 10:31:09 | ... 5 more
INFO | jvm 1 | 2007/04/13 10:31:09 | Caused by: java.lang.NullPointerException
INFO | jvm 1 | 2007/04/13 10:31:09 | at java.util.Date.getMillisOf(Date.java:938)
INFO | jvm 1 | 2007/04/13 10:31:09 | at java.util.Date.after(Date.java:911)
INFO | jvm 1 | 2007/04/13 10:31:09 | at org.apache.maven.scm.command.update.AbstractUpdateCommand.executeCommand(AbstractUpdateCommand.java:89)
INFO | jvm 1 | 2007/04/13 10:31:09 | at org.apache.maven.scm.command.AbstractCommand.execute(AbstractCommand.java:55)
INFO | jvm 1 | 2007/04/13 10:31:09 | ... 9 more


Marius Barbulescu - 16/Apr/07 01:22 AM
I saw in AbstractUpdateCommand this code:

ChangeSet change = (ChangeSet) i.next();

if ( startDate != null && change.getDate() != null )
{
if ( startDate.after( change.getDate() ) )

the NPE comes from here:

static final long getMillisOf(Date date) {
if (date.cdate == null) {

means that change.getDate() returns null.

I would update the code like this:

ChangeSet change = (ChangeSet) i.next();
Date changeDate = change.getDate();
if ( startDate != null && changeDate != null )
{
if ( startDate.after( changeDate ) )


Marius Barbulescu - 17/Apr/07 04:21 AM
Seems that 1.0.3 Continuum contain 1.0 beta 3 SCM, so it is normal to not work.
I downloaded and build 1.1 version and it works there.