Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-6881

Starteam pluging breaks configuration for 1.364

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Blocker
    • Resolution: Fixed
    • starteam-plugin
    • None
    • Red Hat Enterprise Linux

    Description

      Saving configuration of a job is broken by exception from starteam plugin[1].
      It does not save the configuration properly[2].
      For already configured jobs the StarTeam seems to be working okay, but new projcts can't be properly created and old job can't change configuration.

      [1]
      org.kohsuke.stapler.NoStaplerConstructorException: There's no @DataBoundConstructor on any constructor of class hudson.plugins.starteam.StarTeamSCM
      at org.kohsuke.stapler.RequestImpl.loadConstructorParamNames(RequestImpl.java:461)
      at org.kohsuke.stapler.RequestImpl.bindParameters(RequestImpl.java:285)
      at org.kohsuke.stapler.RequestImpl.bindParameters(RequestImpl.java:281)
      at hudson.plugins.starteam.StarTeamSCM$StarTeamSCMDescriptorImpl.newInstance(StarTeamSCM.java:157)
      at hudson.plugins.starteam.StarTeamSCM$StarTeamSCMDescriptorImpl.newInstance(StarTeamSCM.java:135)
      at hudson.scm.SCMS.parseSCM(SCMS.java:66)
      at hudson.model.AbstractProject.submit(AbstractProject.java:1505)
      at hudson.model.Project.submit(Project.java:191)
      at hudson.model.FreeStyleProject.submit(FreeStyleProject.java:97)
      at hudson.model.Job.doConfigSubmit(Job.java:1050)
      at hudson.model.AbstractProject.doConfigSubmit(AbstractProject.java:555)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:235)
      at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:116)
      at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:57)
      at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:75)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:525)
      at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:181)
      at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:30)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:525)
      at org.kohsuke.stapler.Stapler.invoke(Stapler.java:441)
      at org.kohsuke.stapler.Stapler.service(Stapler.java:123)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      ...


      [2]
      <?xml version='1.0' encoding='UTF-8'?>
      <project>
      <actions/>
      <description></description>
      <logRotator>
      <daysToKeep>2</daysToKeep>
      <numToKeep>-1</numToKeep>
      <artifactDaysToKeep>-1</artifactDaysToKeep>
      <artifactNumToKeep>-1</artifactNumToKeep>
      </logRotator>
      <keepDependencies>false</keepDependencies>
      <properties>
      <hudson.plugins.disk__usage.DiskUsageProperty/>
      </properties>
      <canRoam>true</canRoam>
      <disabled>false</disabled>
      <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
      <triggers class="vector"/>
      <concurrentBuild>false</concurrentBuild>
      <builders>
      <hudson.tasks.Maven>
      <targets>install site</targets>
      <mavenName>Apache Maven 2.2.1</mavenName>
      <usePrivateRepository>false</usePrivateRepository>
      </hudson.tasks.Maven>
      </builders>
      <publishers/>
      <buildWrappers/>
      </project>

      Attachments

        Activity

          jan_ruzicka jan_ruzicka added a comment -

          First attempt to fix the StarTeam plugin. Please review and comment.

          jan_ruzicka jan_ruzicka added a comment - First attempt to fix the StarTeam plugin. Please review and comment.
          mindless Alan Harder added a comment -

          I don't know anything about starteam, but a quick look at your patch looks mostly fine.. the existing code uses "if (...) {" style, so maybe don't mix in "if (...)
          {" style.. keep { on same line. Also, don't add empty implementations for the new API methods (compareRemoteRevisionWith and calcRevisionsFromBuild).. their presence will make Hudson use the new style, and the plugin will likely break. Either remove these and compile against 1.345, or compile against newer Hudson and implement the new APIs.
          Use of System.out also looks a little fishy.. why would listener be null?

          mindless Alan Harder added a comment - I don't know anything about starteam, but a quick look at your patch looks mostly fine.. the existing code uses "if (...) {" style, so maybe don't mix in "if (...) {" style.. keep { on same line. Also, don't add empty implementations for the new API methods (compareRemoteRevisionWith and calcRevisionsFromBuild).. their presence will make Hudson use the new style, and the plugin will likely break. Either remove these and compile against 1.345, or compile against newer Hudson and implement the new APIs. Use of System.out also looks a little fishy.. why would listener be null?
          jan_ruzicka jan_ruzicka added a comment -

          second patch attempt with updated style.

          jan_ruzicka jan_ruzicka added a comment - second patch attempt with updated style.
          jan_ruzicka jan_ruzicka added a comment -

          Thanks for the 1.345 suggestion.

          New patch should be cleaner.

          I added the test for null listener because I added a unit test with minimal construction.
          Test were breaking and test for null and redirecting logging standard output seemed a reasonable choice.

          jan_ruzicka jan_ruzicka added a comment - Thanks for the 1.345 suggestion. New patch should be cleaner. I added the test for null listener because I added a unit test with minimal construction. Test were breaking and test for null and redirecting logging standard output seemed a reasonable choice.

          Code changed in hudson
          User: : jan_ruzicka
          Path:
          trunk/hudson/plugins/starteam/pom.xml
          trunk/hudson/plugins/starteam/src/main/java/hudson/plugins/starteam/StarTeamPollingActor.java
          trunk/hudson/plugins/starteam/src/main/java/hudson/plugins/starteam/StarTeamSCM.java
          trunk/hudson/plugins/starteam/src/main/resources/hudson/plugins/starteam/StarTeamSCM/config.jelly
          http://jenkins-ci.org/commit/32615
          Log:
          JENKINS-6881 fixing SCM constructor, updating to Hudson version 1.345; adding crypto provider dependency; jetty clenup

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : jan_ruzicka Path: trunk/hudson/plugins/starteam/pom.xml trunk/hudson/plugins/starteam/src/main/java/hudson/plugins/starteam/StarTeamPollingActor.java trunk/hudson/plugins/starteam/src/main/java/hudson/plugins/starteam/StarTeamSCM.java trunk/hudson/plugins/starteam/src/main/resources/hudson/plugins/starteam/StarTeamSCM/config.jelly http://jenkins-ci.org/commit/32615 Log: JENKINS-6881 fixing SCM constructor, updating to Hudson version 1.345; adding crypto provider dependency; jetty clenup

          Code changed in hudson
          User: : jan_ruzicka
          Path:
          trunk/hudson/plugins/starteam/src/test/java/hudson/plugins/starteam/StarTeamSCMTest.java
          http://jenkins-ci.org/commit/32703
          Log:
          JENKINS-6881 adding test for this bug

          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in hudson User: : jan_ruzicka Path: trunk/hudson/plugins/starteam/src/test/java/hudson/plugins/starteam/StarTeamSCMTest.java http://jenkins-ci.org/commit/32703 Log: JENKINS-6881 adding test for this bug
          jan_ruzicka jan_ruzicka added a comment -

          was fixed in plugin version 0.4.

          jan_ruzicka jan_ruzicka added a comment - was fixed in plugin version 0.4.

          People

            jan_ruzicka jan_ruzicka
            jan_ruzicka jan_ruzicka
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: