Updating Config File Provider Plugin to v2.15.1 fails if the congiuration files are created with a old version (post with a workaround)

128 views
Skip to first unread message

Sigbjørn Tvedt

unread,
Jan 5, 2017, 9:20:53 AM1/5/17
to Jenkins Users
Hi.
We tried to upgrade our jenkins instance with the newest versions of Config File Provider Plugin (2.15.1) and Managed Scripts (1.3) last week. The installation completed without errors, but unfortunately the files where inaccessible for the jobs after restarting.  The 'Managed files' entry in the configuration menu where also missing. 
According to the logs, this is due to a providerId field that is missing.

Jan 05, 2017 2:49:25 PM hudson.ExtensionFinder$GuiceFinder$FaultTolerantScope$1 error
WARNING: Failed to instantiate Key[type=org.jenkinsci.plugins.configfiles.ConfigFilesManagement, annotation=[none]]; skipping this component
com.google.inject.ProvisionException: Guice provision errors:

1) Error injecting constructor, java.lang.IllegalStateException
  at org.jenkinsci.plugins.configfiles.ConfigFilesManagement.<init>(ConfigFilesManagement.java:60)

1 error
        at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:52)
        at com.google.inject.Scopes$1$1.get(Scopes.java:65)
        at hudson.ExtensionFinder$GuiceFinder$FaultTolerantScope$1.get(ExtensionFinder.java:424)
......
Caused by: java.lang.IllegalStateException
        at org.jenkinsci.plugins.configfiles.GlobalConfigFiles.get(GlobalConfigFiles.java:32)
        at org.jenkinsci.plugins.configfiles.ConfigFilesManagement.<init>(ConfigFilesManagement.java:61)
        at org.jenkinsci.plugins.configfiles.ConfigFilesManagement$$FastClassByGuice$$9a9224f5.newInstance(<generated>)




It seems like the upgrade did not handle the fact that several of the scripts are quite old, and therefore are missing the providerId tag.

A workaround for this is to revert to the old version of the plugin and then open and save each file from the gui before uppgrading the plugin once more.  (or edit the xml by hand)



(Tested using jenkins 2.19.3)


Regards 
Sigbjørn Tvedt

Mark Waite

unread,
Jan 5, 2017, 4:26:38 PM1/5/17
to Jenkins Users
I'm seeing a different behavior that I think is also related to the most recent config files provider plugin.  I don't see the stack traces or illegal state exception that you're seeing, but instead, I see a message in the build log which says:

ERROR: your Apache Maven build is setup to use a config with id Mike-King-maven-settings-xml but can not find the config

The referenced config file exists, has that id, and its definition has been edited with the most recent config file provider plugin in place.  The job definition has been edited since the new config file provider plugin was installed, and still includes a reference to that config file.

Any suggestions of steps I should take to resolve that message?

Mark Waite

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/f2332f48-3196-4694-beb7-b62c4ecec946%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

do...@fortysix.ch

unread,
Jan 9, 2017, 2:54:21 AM1/9/17
to Jenkins Users
a new version of the config-file-provider (2.15.3) fixing this issue is released, but unfortunate the update center seems not yet to have picked up the new version :(
/Domi
Reply all
Reply to author
Forward
0 new messages