Closed kun-yu-tsai closed 8 years ago
Thank you for the detailed report I am not sure that launchd.err.log has related messages. Could you please attach here a teamcity-agent.log file from a build agent where error occured? I hope to see the full stacktrace for "org.codehaus.cargo.container.ContainerException" in it
Hi, Nikita
Thanks for the prompt reply! I looked into the log, and found it was caused by the incorrect "war file path".
_java.io.FileNotFoundException: /Users/MyName/Applications/TeamCity/buildAgent/work/50713646095d0ffa/Users/MyName/sample.war (No such file or directory)_
I put "/Users/MyName/sample.war" in war path
It was resolved into /Users/MyName/Applications/TeamCity/buildAgent/work/50713646095d0ffa/Users/MyName/sample.war.
Does this mean if I want to access files in other place I will need to put something like "../../" to reach the part I need? Or is there any other way to reach the goal?
Thank you again! And below is the full log text.
ERROR - jetbrains.buildServer.AGENT - org.codehaus.cargo.container.ContainerException: Failed to create deployable with implementation class org.codehaus.cargo.container.tomcat.TomcatWAR for the parameters (container [id = [tomcat8x]], deployable type [war]).
jetbrains.buildServer.RunBuildException: org.codehaus.cargo.container.ContainerException: Failed to create deployable with implementation class org.codehaus.cargo.container.tomcat.TomcatWAR for the parameters (container [id = [tomcat8x]], deployable type [war]).
at jetbrains.buildServer.deployer.agent.cargo.CargoBuildProcessAdapter.runProcess(CargoBuildProcessAdapter.java:108)
at jetbrains.buildServer.deployer.agent.SyncBuildProcessAdapter.start(SyncBuildProcessAdapter.java:58)
at jetbrains.buildServer.agent.impl.buildStages.runnerStages.start.CallRunnerStage.doBuildStage(CallRunnerStage.java:58)
at jetbrains.buildServer.agent.impl.buildStages.RunnerStagesExecutor$1.callStage(RunnerStagesExecutor.java:25)
at jetbrains.buildServer.agent.impl.buildStages.RunnerStagesExecutor$1.callStage(RunnerStagesExecutor.java:18)
at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.callRunStage(StagesExecutor.java:78)
at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.doStages(StagesExecutor.java:37)
at jetbrains.buildServer.agent.impl.buildStages.RunnerStagesExecutor.doStages(RunnerStagesExecutor.java:18)
at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.RunnerContextExecutor.callRunnerStages(RunnerContextExecutor.java:43)
at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.StepExecutor.processNextStep(StepExecutor.java:25)
at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.ForEachBuildRunnerStage.executeRunnerStep(ForEachBuildRunnerStage.java:138)
at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.ForEachBuildRunnerStage.runStep(ForEachBuildRunnerStage.java:123)
at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.ForEachBuildRunnerStage.executeBuildRunners(ForEachBuildRunnerStage.java:83)
at jetbrains.buildServer.agent.impl.buildStages.startStages.steps.ForEachBuildRunnerStage.doBuildStage(ForEachBuildRunnerStage.java:44)
at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor$1.callStage(BuildStagesExecutor.java:31)
at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor$1.callStage(BuildStagesExecutor.java:24)
at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.callRunStage(StagesExecutor.java:78)
at jetbrains.buildServer.agent.impl.buildStages.StagesExecutor.doStages(StagesExecutor.java:37)
at jetbrains.buildServer.agent.impl.buildStages.BuildStagesExecutor.doStages(BuildStagesExecutor.java:24)
at jetbrains.buildServer.agent.impl.BuildRunActionImpl.doStages(BuildRunActionImpl.java:70)
at jetbrains.buildServer.agent.impl.BuildRunActionImpl.runBuild(BuildRunActionImpl.java:50)
at jetbrains.buildServer.agent.impl.BuildAgentImpl.doActualBuild(BuildAgentImpl.java:281)
at jetbrains.buildServer.agent.impl.BuildAgentImpl.access$100(BuildAgentImpl.java:55)
at jetbrains.buildServer.agent.impl.BuildAgentImpl$1.run(BuildAgentImpl.java:245)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.codehaus.cargo.container.ContainerException: Failed to create deployable with implementation class org.codehaus.cargo.container.tomcat.TomcatWAR for the parameters (container [id = [tomcat8x]], deployable type [war]).
at org.codehaus.cargo.generic.spi.AbstractGenericHintFactory.createImplementation(AbstractGenericHintFactory.java:154)
at org.codehaus.cargo.generic.spi.AbstractIntrospectionGenericHintFactory.createImplementation(AbstractIntrospectionGenericHintFactory.java:93)
at org.codehaus.cargo.generic.deployable.DefaultDeployableFactory.createDeployable(DefaultDeployableFactory.java:156)
at jetbrains.buildServer.deployer.agent.cargo.CargoBuildProcessAdapter.runProcess(CargoBuildProcessAdapter.java:94)
... 24 more
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
at org.codehaus.cargo.generic.deployable.DefaultDeployableFactory.createInstance(DefaultDeployableFactory.java:196)
at org.codehaus.cargo.generic.deployable.DefaultDeployableFactory.createInstance(DefaultDeployableFactory.java:47)
at org.codehaus.cargo.generic.spi.AbstractGenericHintFactory.createImplementation(AbstractGenericHintFactory.java:150)
... 27 more
Caused by: org.codehaus.cargo.container.ContainerException: Failed to parse Tomcat WAR file in [/Users/MyName/Applications/TeamCity/buildAgent/work/50713646095d0ffa/Users/MyName/sample.war]
at org.codehaus.cargo.container.tomcat.TomcatWAR.
@colza I apologize for the delay. The source path to artifact is relative to checkout directory. So in your case, some "../../" could help. But why would you build something outside the checkout directory?
Hi, Nikita
First, I want to thank you to write us this great plugin, and sorry I'm here to bother you for the error I've met. I read the closed thread "https://github.com/JetBrains/teamcity-deployer-plugin/issues/37" which have the same Build Error message as mine. However I also found it's different from mine, I examined and pretty sure I don't have empty content context.xml under META-INF and the detail error log is also different. I'll provide as much as information I have and if there's any other things needed for reference, just let me know. I'll provide it as soon as possible.
The error during build:
org.codehaus.cargo.container.ContainerException: Failed to create deployable with implementation class org.codehaus.cargo.container.tomcat.TomcatWAR for the parameters (container [id = [tomcat8x]], deployable type [war]).
The error log from "launchd.err.log"
ERROR - yPlug.GroovyPropertiesProvider - Critical error occurred during parameters calculation groovy.lang.MissingMethodException: No signature of method: jetbrains.buildServer.serverSide.impl.auth.SecuredBuildType.getRunParameters() is applicable for argument types: () values: [] at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:54) at org.codehaus.groovy.runtime.callsite.PojoMetaClassSite.call(PojoMetaClassSite.java:46) at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:121) at jetbrains.buildserver.groovyPlug.GroovyPropertiesProvider.addRunParameters(GroovyPropertiesProvider:65) at jetbrains.buildserver.groovyPlug.GroovyPropertiesProvider.this$3$addRunParameters(GroovyPropertiesProvider) at jetbrains.buildserver.groovyPlug.GroovyPropertiesProvider$this$3$addRunParameters$0.callCurrent(Unknown Source) at jetbrains.buildserver.groovyPlug.GroovyPropertiesProvider.getParameters(GroovyPropertiesProvider:51) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207) at com.sun.proxy.$Proxy62.getParameters(Unknown Source) at jetbrains.buildServer.serverSide.impl.TimedBuildParametersProvider.getParameters(TimedBuildParametersProvider.java:0) at jetbrains.buildServer.serverSide.impl.BaseBuild$1.run(BaseBuild.java:3) at jetbrains.buildServer.serverSide.impl.BaseBuild$ExtensionContext.execute(BaseBuild.java:28) at jetbrains.buildServer.serverSide.impl.BaseBuild.getParametersProvider(BaseBuild.java:304) at jetbrains.buildServer.serverSide.impl.RunningBuildImpl.createInitialBuildAndConfParameters(RunningBuildImpl.java:54) at jetbrains.buildServer.serverSide.impl.RunningBuildImpl.createAgentBuild(RunningBuildImpl.java:389) at jetbrains.buildServer.serverSide.impl.BuildStarter$1.run(BuildStarter.java:12) at jetbrains.buildServer.serverSide.impl.BuildStarter$2$1.run(BuildStarter.java:1) at jetbrains.buildServer.util.NamedThreadFactory.executeWithNewThreadName(NamedThreadFactory.java:89) at jetbrains.buildServer.serverSide.impl.BuildStarter$2.run(BuildStarter.java:1) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745)
My build setting:
I launched a new tomcat server and created a new user with manager-script role.
tomcat
password
/Users/MyName/sample.war
My Guess
From the log, it looks like something wrong with locating the container, does the path:port put wrong? I will really appreciate for any possible clues. Thank you!