Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JENKINS-51991] - JCasC config Exporter fails on the latest version with Java 10, "No bean specified" #292

Closed
oleg-nenashev opened this issue Jun 17, 2018 · 11 comments
Assignees

Comments

@oleg-nenashev
Copy link
Member

Reposting https://issues.jenkins-ci.org/browse/JENKINS-51991 , I'd guess @ndeloof may want to take a look at it during the Java 10+ hackathon this week.

I cannot export configuration from oleg-nenashev/demo-jenkins-config-as-code#5 when running Jenkins on Java 10. OTOH the same configuration export works well when I run on Java 8.

Exporting Caused by: java.lang.IllegalArgumentException: No bean specified

WARNING: Error while serving http://localhost:8080/configuration-as-code/export
java.lang.reflect.InvocationTargetException
	at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:347)
	at org.kohsuke.stapler.interceptor.RequirePOST$Processor.invoke(RequirePOST.java:77)
	at org.kohsuke.stapler.PreInvokeInterceptedFunction.invoke(PreInvokeInterceptedFunction.java:26)
	at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:184)
	at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:117)
	at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:129)
	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
	at org.kohsuke.stapler.MetaClass$10.dispatch(MetaClass.java:374)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)
	at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:860)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154)
	at org.jenkinsci.plugins.ssegateway.Endpoint$SSEListenChannelFilter.doFilter(Endpoint.java:225)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
	at io.jenkins.blueocean.ResourceCacheControl.doFilter(ResourceCacheControl.java:134)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
	at io.jenkins.blueocean.auth.jwt.impl.JwtAuthenticationFilter.doFilter(JwtAuthenticationFilter.java:61)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
	at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:237)
	at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:214)
	at net.bull.javamelody.PluginMonitoringFilter.doFilter(PluginMonitoringFilter.java:88)
	at org.jvnet.hudson.plugins.monitoring.HudsonMonitoringFilter.doFilter(HudsonMonitoringFilter.java:114)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)
	at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:157)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
	at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:99)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
	at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
	at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
	at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
	at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90)
	at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
	at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
	at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
	at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1637)
	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
	at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:190)
	at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:188)
	at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1253)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:168)
	at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
	at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
	at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:166)
	at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1155)
	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
	at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
	at org.eclipse.jetty.server.Server.handle(Server.java:530)
	at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:347)
	at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:256)
	at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:279)
	at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102)
	at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:124)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:247)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.produce(EatWhatYouKill.java:140)
	at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:131)
	at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:382)
	at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
	at java.base/java.lang.Thread.run(Thread.java:844)
Caused by: java.lang.IllegalArgumentException: No bean specified
	at org.apache.commons.beanutils.PropertyUtilsBean.getPropertyDescriptor(PropertyUtilsBean.java:883)
	at org.apache.commons.beanutils.PropertyUtils.getPropertyDescriptor(PropertyUtils.java:460)
	at org.jenkinsci.plugins.casc.Attribute._getValue(Attribute.java:169)
	at org.jenkinsci.plugins.casc.Attribute.getValue(Attribute.java:126)
	at org.jenkinsci.plugins.casc.DataBoundConfigurator.describe(DataBoundConfigurator.java:215)
	at org.jenkinsci.plugins.casc.plugins.PluginManagerConfigurator.describe(PluginManagerConfigurator.java:255)
	at org.jenkinsci.plugins.casc.plugins.PluginManagerConfigurator.describe(PluginManagerConfigurator.java:49)
	at org.jenkinsci.plugins.casc.ConfigurationAsCode.doExport(ConfigurationAsCode.java:232)
	at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:707)
	at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:343)
	... 86 more
@ndeloof ndeloof self-assigned this Jun 17, 2018
@Ouradze
Copy link

Ouradze commented Jun 20, 2018

I encounter the same error when building from the official docker image FROM jenkins/jenkins which I think is using openjdk8.

WARNING: Error while serving http://localhost:8000/configuration-as-code/export                                                                                                               
java.lang.reflect.InvocationTargetException                                                                                                                                                   
        at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:347)                                                                                                              
        at org.kohsuke.stapler.interceptor.RequirePOST$Processor.invoke(RequirePOST.java:77)                                                                                                  
        at org.kohsuke.stapler.PreInvokeInterceptedFunction.invoke(PreInvokeInterceptedFunction.java:26)                                                                                      
        at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:184)                                                                                                                      
        at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:117)                                                                                                      
        at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:129)                                                                                                                     
        at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)                                                                                                      
        at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)                                                                                                                            
        at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)                                                                                                                               
        at org.kohsuke.stapler.MetaClass$10.dispatch(MetaClass.java:374)                                                                                                                      
        at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:715)                                                                                                                            
        at org.kohsuke.stapler.Stapler.invoke(Stapler.java:845)                                                                                                                               
        at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)                                                                                                                               
        at org.kohsuke.stapler.Stapler.service(Stapler.java:238)                                                                                                                              
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)                                                                                                                       
        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:865)                                                                                                             
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1655)                                                                                            
        at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:154)                                                                                                           
        at org.jenkinsci.plugins.ssegateway.Endpoint$SSEListenChannelFilter.doFilter(Endpoint.java:225)                                                                                       
        at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)                                                                                                           
        at io.jenkins.blueocean.ResourceCacheControl.doFilter(ResourceCacheControl.java:134)                                                                                                  
        at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)                                                                                                           
        at io.jenkins.blueocean.auth.jwt.impl.JwtAuthenticationFilter.doFilter(JwtAuthenticationFilter.java:61)                                                                               
        at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:151)                                                                                                           
        at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:157)                                                                                                             
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)                                                                                            
        at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:64)                                                                                                                     
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)                                                                                            
        at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)                                                                                                      
        at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:90)                                                                                                        
        at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)                                                                                                                       
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)                                                                                            
        at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)                                                                                              
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)                                                                                            
        at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:82)                                                                                                      
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)                                                                                            
        at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)                                                                                        
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1642)                                                                                            
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:533)                                                                                                         
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146)                                                                                                      
        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:524)                                                                                                        
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)                                                                                                    
        at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)                                                                                                  
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1595)                                                                                                 
        at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1317)
        at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:473)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1564)
        at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1219)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
        at org.eclipse.jetty.server.Server.handle(Server.java:531)
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:352)
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260)
        at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:281)
        at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:102)
        at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118)
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)
        at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126)
        at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366)
        at winstone.BoundedExecutorService.lambda$scheduleNext$0(BoundedExecutorService.java:80)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalArgumentException: No bean specified
        at org.apache.commons.beanutils.PropertyUtilsBean.getPropertyDescriptor(PropertyUtilsBean.java:883)
        at org.apache.commons.beanutils.PropertyUtils.getPropertyDescriptor(PropertyUtils.java:460)
        at org.jenkinsci.plugins.casc.Attribute._getValue(Attribute.java:169)
        at org.jenkinsci.plugins.casc.Attribute.getValue(Attribute.java:126)
        at org.jenkinsci.plugins.casc.DataBoundConfigurator.describe(DataBoundConfigurator.java:215)
        at org.jenkinsci.plugins.casc.plugins.PluginManagerConfigurator.describe(PluginManagerConfigurator.java:255)
        at org.jenkinsci.plugins.casc.plugins.PluginManagerConfigurator.describe(PluginManagerConfigurator.java:49)
        at org.jenkinsci.plugins.casc.ConfigurationAsCode.doExport(ConfigurationAsCode.java:232)
        at java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:627)
        at org.kohsuke.stapler.Function$MethodFunction.invoke(Function.java:343)
        ... 67 more

If I try to use the lts jenkins image, it fails to download the ConfigurationAsCode plugin. If you need anymore information, please tell me.

Thanks :)

@ndeloof
Copy link
Contributor

ndeloof commented Jun 20, 2018

@Eclar which version of CasC plugin are you running ?

@Ouradze
Copy link

Ouradze commented Jun 20, 2018

I am using 0.8-alpha.

@ndeloof
Copy link
Contributor

ndeloof commented Jun 20, 2018

@Eclar this has been fixed already by #258
issue reported by @oleg-nenashev seems to be specific to java 10

@oleg-nenashev
Copy link
Member Author

To reproduce this issue use...

@ndeloof
Copy link
Contributor

ndeloof commented Jul 2, 2018

this docker image uses 0.8-alpha
0.9-alpha fixed some issue here
still fails with
Can't read attribute 'slaveOwnership' from com.synopsys.arc.jenkins.plugins.ownership.nodes.OwnerNodeProperty

constructor parameter name indeed doesn't match getter https://github.com/jenkinsci/ownership-plugin/blob/master/src/main/java/com/synopsys/arc/jenkins/plugins/ownership/nodes/OwnerNodeProperty.java

@oleg-nenashev
Copy link
Member Author

@ndeloof ack. Will create ta ticket to Ownership plugin.
Apparently it also needs symbols & Co to be used from the JCasC plugin

@oleg-nenashev
Copy link
Member Author

@oleg-nenashev
Copy link
Member Author

oleg-nenashev commented Jul 2, 2018

I will test it, but I believe this issue can be resolved on the JCasC side.
Thank @ndeloof! Which change does fix it BTW (just for reference purposes)?

@ndeloof
Copy link
Contributor

ndeloof commented Jul 2, 2018

see #313

Not sure how we could handle this on JCasC side. I even can't find the config.jelly file to associate constructor parameter slaveOwnership with current value read from getOwnership

@oleg-nenashev
Copy link
Member Author

@ndeloof

Not sure how we could handle this on JCasC side. I even can't find the config.jelly file to associate constructor parameter slaveOwnership with current value read from getOwnership

I agree. In this case it would be preferable to just fix the plugin. Will do that.

@ndeloof ndeloof closed this as completed Jul 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants