Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Classpath issue

Hello,

I have Bamboo 7.2.2 version and developed a plugin / app for it. However when I run task from Bamboo get this error.

Error occurred while running Task 'Deployu(1)' of type com.xebialabs.deployit.plugin.bamboo-deployit-plugin:deployAppTask.
error	11-Feb-2021 15:12:15	java.lang.NoSuchMethodError: org.apache.commons.io.IOUtils.toString(Ljava/io/InputStream;Ljava/nio/charset/Charset;)Ljava/lang/String;
error	11-Feb-2021 15:12:15		at com.xebialabs.deployit.booter.remote.resteasy.InternalServerErrorClientResponseInterceptor.tryToReadEntity(InternalServerErrorClientResponseInterceptor.java:60)
error	11-Feb-2021 15:12:15		at com.xebialabs.deployit.booter.remote.resteasy.InternalServerErrorClientResponseInterceptor.extractMessage(InternalServerErrorClientResponseInterceptor.java:55)
error	11-Feb-2021 15:12:15		at com.xebialabs.deployit.booter.remote.resteasy.InternalServerErrorClientResponseInterceptor.tryDeployitException(InternalServerErrorClientResponseInterceptor.java:47)
error	11-Feb-2021 15:12:15		at com.xebialabs.deployit.booter.remote.resteasy.InternalServerErrorClientResponseInterceptor.filter(InternalServerErrorClientResponseInterceptor.java:27)
error	11-Feb-2021 15:12:15		at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.filterResponse(ClientInvocation.java:611)
error	11-Feb-2021 15:12:15		at org.jboss.resteasy.client.jaxrs.internal.ClientInvocation.invoke(ClientInvocation.java:444)
error	11-Feb-2021 15:12:15		at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker.invokeSync(ClientInvoker.java:149)
error	11-Feb-2021 15:12:15		at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientInvoker.invoke(ClientInvoker.java:112)
error	11-Feb-2021 15:12:15		at org.jboss.resteasy.client.jaxrs.internal.proxy.ClientProxy.invoke(ClientProxy.java:76)
error	11-Feb-2021 15:12:15		at com.xebialabs.deployit.booter.remote.invoker.InvocationHandlerInvoker.invoke(InvocationHandlerInvoker.java:19)
error	11-Feb-2021 15:12:15		at com.xebialabs.deployit.booter.remote.Proxies$CliExceptionHandler.invoke(Proxies.java:228)
error	11-Feb-2021 15:12:15		at com.sun.proxy.$Proxy1912.prepareInitial(Unknown Source)
error	11-Feb-2021 15:12:15		at com.xebialabs.deployit.ci.bamboo.client.CiDeploy.doInitial(CiDeploy.java:80)
error	11-Feb-2021 15:12:15		at com.xebialabs.deployit.ci.bamboo.client.CiDeploy.deploy(CiDeploy.java:61)
error	11-Feb-2021 15:12:15		at com.xebialabs.deployit.ci.bamboo.tasks.DeployApplicationTaskAbstract.doExecute(DeployApplicationTaskAbstract.java:51)
error	11-Feb-2021 15:12:15		at com.xebialabs.deployit.ci.bamboo.tasks.AbstractDeployitTask.execute(AbstractDeployitTask.java:51)
error	11-Feb-2021 15:12:15		at com.atlassian.bamboo.task.TaskExecutorImpl.lambda$executeTasks$3(TaskExecutorImpl.java:323)
error	11-Feb-2021 15:12:15		at com.atlassian.bamboo.task.TaskExecutorImpl.executeTaskWithPrePostActions(TaskExecutorImpl.java:258)
error	11-Feb-2021 15:12:15		at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:323)
error	11-Feb-2021 15:12:15		at com.atlassian.bamboo.task.TaskExecutorImpl.execute(TaskExecutorImpl.java:118)
error	11-Feb-2021 15:12:15		at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:73)
error	11-Feb-2021 15:12:15		at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.executeBuildPhase(DefaultBuildAgent.java:190)
error	11-Feb-2021 15:12:15		at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:162)
error	11-Feb-2021 15:12:15		at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.lambda$waitAndPerformBuild$0(BuildAgentControllerImpl.java:137)
error	11-Feb-2021 15:12:15		at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:118)
error	11-Feb-2021 15:12:15		at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:130)
error	11-Feb-2021 15:12:15		at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.lambda$start$0(DefaultBuildAgent.java:110)
error	11-Feb-2021 15:12:15		at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:48)
error	11-Feb-2021 15:12:15		at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:26)
error	11-Feb-2021 15:12:15		at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:17)
error	11-Feb-2021 15:12:15		at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:41)
error	11-Feb-2021 15:12:15		at java.lang.Thread.run(Thread.java:748)
simple	11-Feb-2021 15:12:15	Running post build plugin 'NCover Results Collector'

 

My app uses commons-io 2.5 version. Is Bamboo also using commons-io library? If yes, how do I find out which version is being used during runtime.

Any suggestions much appreciated.

1 answer

0 votes

Hi! 

Could you share the pom.xml of your app ? 

Did you set compile or provided  scope?

Hi. The scope is not specified for the remote-booter, so its "Compile" I think.

 

 

<dependencies>
<dependency>
<groupId>com.xebialabs.deployit.engine</groupId>
<artifactId>remote-booter</artifactId>
<version>${xlPlatformVersion}</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
</exclusion>
<exclusion>
<groupId>org.slf4j</groupId>
<artifactId>log4j-over-slf4j</artifactId>
</exclusion>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</exclusion>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.xebialabs.deployit.engine</groupId>
<artifactId>engine-xml</artifactId>
<version>${xlPlatformVersion}</version>
</dependency>

<dependency>
<groupId>com.atlassian.bamboo</groupId>
<artifactId>atlassian-bamboo-web</artifactId>
<version>${bamboo.version}</version>
<scope>provided</scope>
<exclusions>
<exclusion>
<artifactId>xml-apis</artifactId>
<groupId>xml-apis</groupId>
</exclusion>
<exclusion>
<artifactId>commons-logging</artifactId>
<groupId>commons-logging</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>xml-apis</groupId>
<artifactId>xml-apis</artifactId>
<version>1.4.01</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${slf4j.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>${slf4j.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jcl-over-slf4j</artifactId>
<version>${slf4j.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>jul-to-slf4j</artifactId>
<version>${slf4j.version}</version>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version> <!-- 4.10 -->
<scope>test</scope>
</dependency>

<dependency>
<groupId>com.xebialabs.restito</groupId>
<artifactId>restito</artifactId>
<version>0.4-alpha-2</version>
<scope>test</scope>
</dependency>


<!-- WIRED TEST RUNNER DEPENDENCIES -->
<dependency>
<groupId>com.atlassian.plugins</groupId>
<artifactId>atlassian-plugins-osgi-testrunner</artifactId>
<version>${plugin.testrunner.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
<version>1.1.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.2.2-atlassian-1</version>
</dependency>
<dependency>
<groupId>xpp3</groupId>
<artifactId>xpp3</artifactId>
<version>1.1.4c</version>
</dependency>
</dependencie 

df 

But when I specify the scope as "provided" for the remote-booter dependency I get the below error:

error 11-Feb-2021 21:07:48 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.xebialabs.deployit.ci.bamboo.tasks.DeployApplicationTaskAbstract': Lookup method resolution failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [com.xebialabs.deployit.ci.bamboo.tasks.DeployApplicationTaskAbstract] from ClassLoader [com.xebialabs.deployit.plugin.bamboo-deployit-plugin [118]]
error 11-Feb-2021 21:07:48  at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:267)
error 11-Feb-2021 21:07:48  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineConstructorsFromBeanPostProcessors(AbstractAutowireCapableBeanFactory.java:1268)
error 11-Feb-2021 21:07:48  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1183)
error 11-Feb-2021 21:07:48  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555)
error 11-Feb-2021 21:07:48  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515)
error 11-Feb-2021 21:07:48  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:351)
error 11-Feb-2021 21:07:48  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
error 11-Feb-2021 21:07:48  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
error 11-Feb-2021 21:07:48  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
error 11-Feb-2021 21:07:48  at java.lang.reflect.Method.invoke(Method.java:498)
error 11-Feb-2021 21:07:48  at com.atlassian.plugin.osgi.spring.DefaultSpringContainerAccessor.createBean(DefaultSpringContainerAccessor.java:116)
error 11-Feb-2021 21:07:48  at com.atlassian.plugin.module.ClassPrefixModuleFactory.createModule(ClassPrefixModuleFactory.java:35)
error 11-Feb-2021 21:07:48  at com.atlassian.plugin.module.PrefixDelegatingModuleFactory.createModule(PrefixDelegatingModuleFactory.java:88)
error 11-Feb-2021 21:07:48  at com.atlassian.bamboo.plugin.descriptor.AbstractBambooModuleDescriptor.createModule(AbstractBambooModuleDescriptor.java:26)
error 11-Feb-2021 21:07:48  at com.atlassian.bamboo.plugin.descriptor.AbstractBambooModuleDescriptor.access$000(AbstractBambooModuleDescriptor.java:17)
error 11-Feb-2021 21:07:48  at com.atlassian.bamboo.plugin.descriptor.AbstractBambooModuleDescriptor$2.call(AbstractBambooModuleDescriptor.java:91)
error 11-Feb-2021 21:07:48  at com.atlassian.bamboo.plugin.BambooPluginUtils.callUnsafeCode(BambooPluginUtils.java:55)
error 11-Feb-2021 21:07:48  at com.atlassian.bamboo.plugin.descriptor.AbstractBambooModuleDescriptor.getModule(AbstractBambooModuleDescriptor.java:99)
error 11-Feb-2021 21:07:48  at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:309)
error 11-Feb-2021 21:07:48  at com.atlassian.bamboo.task.TaskExecutorImpl.execute(TaskExecutorImpl.java:118)
error 11-Feb-2021 21:07:48  at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:73)
error 11-Feb-2021 21:07:48  at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.executeBuildPhase(DefaultBuildAgent.java:190)
error 11-Feb-2021 21:07:48  at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:162)
error 11-Feb-2021 21:07:48  at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.lambda$waitAndPerformBuild$0(BuildAgentControllerImpl.java:137)
error 11-Feb-2021 21:07:48  at com.atlassian.bamboo.variable.CustomVariableContextImpl.withVariableSubstitutor(CustomVariableContextImpl.java:118)
error 11-Feb-2021 21:07:48  at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:130)
error 11-Feb-2021 21:07:48  at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.lambda$start$0(DefaultBuildAgent.java:110)
error 11-Feb-2021 21:07:48  at com.atlassian.bamboo.utils.BambooRunnables$1.run(BambooRunnables.java:48)
error 11-Feb-2021 21:07:48  at com.atlassian.bamboo.security.ImpersonationHelper.runWith(ImpersonationHelper.java:26)
error 11-Feb-2021 21:07:48  at com.atlassian.bamboo.security.ImpersonationHelper.runWithSystemAuthority(ImpersonationHelper.java:17)
error 11-Feb-2021 21:07:48  at com.atlassian.bamboo.security.ImpersonationHelper$1.run(ImpersonationHelper.java:41)
error 11-Feb-2021 21:07:48  at java.lang.Thread.run(Thread.java:748)
error 11-Feb-2021 21:07:48 Caused by: java.lang.IllegalStateException: Failed to introspect Class [com.xebialabs.deployit.ci.bamboo.tasks.DeployApplicationTaskAbstract] from ClassLoader [com.xebialabs.deployit.plugin.bamboo-deployit-plugin [118]]
error 11-Feb-2021 21:07:48  at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:507)
error 11-Feb-2021 21:07:48  at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:404)
error 11-Feb-2021 21:07:48  at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:389)
error 11-Feb-2021 21:07:48  at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.determineCandidateConstructors(AutowiredAnnotationBeanPostProcessor.java:249)
error 11-Feb-2021 21:07:48  ... 31 more
error 11-Feb-2021 21:07:48 Caused by: java.lang.NoClassDefFoundError: com/xebialabs/deployit/booter/remote/DeployitCommunicator
error 11-Feb-2021 21:07:48  at java.lang.Class.getDeclaredMethods0(Native Method)
error 11-Feb-2021 21:07:48  at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
error 11-Feb-2021 21:07:48  at java.lang.Class.getDeclaredMethods(Class.java:1975)
error 11-Feb-2021 21:07:48  at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:489)
error 11-Feb-2021 21:07:48  ... 34 more
error 11-Feb-2021 21:07:48 Caused by: java.lang.ClassNotFoundException: com.xebialabs.deployit.booter.remote.DeployitCommunicator not found by com.xebialabs.deployit.plugin.bamboo-deployit-plugin [118]
error 11-Feb-2021 21:07:48  at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringImpl.java:1639)
error 11-Feb-2021 21:07:48  at org.apache.felix.framework.BundleWiringImpl.access$200(BundleWiringImpl.java:80)
error 11-Feb-2021 21:07:48  at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl.java:2053)
error 11-Feb-2021 21:07:48  at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
error 11-Feb-2021 21:07:48  ... 38 more

So it's the next error related to the bean :) 

it's the next step :) 

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bamboo

Bamboo 7.2 is here!

I'm happy to announce that Bamboo 7.2 has been released and it’s overflowing with awesome new features. This will be the last major Server release before the launch of Bamboo DC. Bamboo logs We...

489 views 5 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you