-
Bug
-
Resolution: Unresolved
-
Minor
-
Jenkins 2.6
ClearCase UCM Plugin 1.6.9
To reproduce, simply create an activity with a newline in the headline and trigger a build. When the plugin is comparing the new baseline to the previous one, an exception is thrown and the build fails:
java.io.IOException: remote file operation failed: C:\jenkins\workspace\... at hudson.remoting.Channel@1aa6333a:<NODE_NAME>: java.io.IOException:
at hudson.FilePath.act(FilePath.java:1014)
at hudson.FilePath.act(FilePath.java:996)
at net.praqma.hudson.scm.CCUCMScm.initializeWorkspace(CCUCMScm.java:549)
at net.praqma.hudson.scm.CCUCMScm.checkout(CCUCMScm.java:339)
at hudson.model.AbstractProject.checkout(AbstractProject.java:1269)
at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:604)
at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
at hudson.model.Run.execute(Run.java:1741)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
Caused by: java.io.IOException:
at net.praqma.hudson.remoting.CheckoutTask.invoke(CheckoutTask.java:125)
at net.praqma.hudson.remoting.CheckoutTask.invoke(CheckoutTask.java:33)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2772)
at hudson.FilePath$AbstractInterceptorCallableWrapper.call(FilePath.java:1059)
at hudson.remoting.UserRequest.perform(UserRequest.java:152)
at hudson.remoting.UserRequest.perform(UserRequest.java:50)
at hudson.remoting.Request$2.run(Request.java:332)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at hudson.remoting.Engine$1$1.run(Engine.java:85)
at java.lang.Thread.run(Unknown Source)
at ......remote call to <NODE_NAME>(Native Method)
at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1416)
at hudson.remoting.UserResponse.retrieve(UserRequest.java:252)
at hudson.remoting.Channel.call(Channel.java:781)
at hudson.FilePath.act(FilePath.java:1007)
... 11 more
Caused by: net.praqma.hudson.exception.UnableToInitializeWorkspaceException: Unable to initialize workspace
at net.praqma.hudson.remoting.CheckoutTask.invoke(CheckoutTask.java:125)
at net.praqma.hudson.remoting.CheckoutTask.invoke(CheckoutTask.java:33)
at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2772)
at hudson.FilePath$AbstractInterceptorCallableWrapper.call(FilePath.java:1059)
at hudson.remoting.UserRequest.perform(UserRequest.java:152)
at hudson.remoting.UserRequest.perform(UserRequest.java:50)
at hudson.remoting.Request$2.run(Request.java:332)
at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at hudson.remoting.Engine$1$1.run(Engine.java:85)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -39
at java.lang.String.substring(Unknown Source)
at net.praqma.clearcase.ucm.entities.Activity.parseActivityStrings(Activity.java:155)
at net.praqma.clearcase.ucm.entities.Version.getBaselineDiff(Version.java:857)
at net.praqma.clearcase.ucm.entities.Version.getBaselineDiff(Version.java:829)
at net.praqma.hudson.remoting.CheckoutTask.invoke(CheckoutTask.java:116)
... 12 more
Detailed logging shows that the last valid command was a "cleartool describe" command which produces text on two lines, where I'm sure that the parsing logic is expecting only one.
While it is certainly uncommon for someone to put a newline in a headline, it is perfectly valid from a ClearCase point of view so this should be fixed.