Problem running .jar file after successful build

Hello,

     I'd like to start out by saying I am completely new to Team City and continual integration in general. I am trying out Team City with one of my company's smaller projects/utilities to see if it would be a good fit for us before we purchase a license and integrate our much larger projects. I have been able to set up the project in Team City and get a successful build. Team City also picks up changes that I commit to SVN. However, when I try to run the .jar file that is an artifact of the build, I get a ClassDefNotFound error indicating that I am missing a class necessary for the file to run. There is a required system property/dependency that points to a library where this class is located. I have set this system property in Team City and am pretty sure that its pointing to the correct location as there are several other classes in the library that are being used without issue. I have also gone to where this code is stored on the machine and verified that the class in question is there. I have also checked the build logs to see if there was anything that indicated an issue and didn't see anything. Of note, this project compiles and builds the jar out of IntelliJ and the jar runs on the same machine that is running Team City.  I'm sure there is a setting or something I need to add to this project but I have scoured the documentation to no avail.

Any help that can point me in the right direction is very much appreciated! Please let me know if there is any other additional information I can provide that would help. Thank you!

0
3 comments

Hello Ryan,

It seems that you can start by using command-line runner in TeamCity and specify commands for the "custom script" just like those you would use if launching the jar in the same directory from command prompt.

If that does not work, consider sharing the screenshots of the step settings, build log you get in TeamCity and the details (command, output) of the successful run from the prompt (in the build's working directory, under the same user that TeamCity agent runs under).

0

Hi Yegor,

Thank you for your response. Before I was able to post the files you requested, I went to run the build again in Team City and to my dismay the build is failing now with an error telling me that an output file path is not specified for a certain class. I did some digging and it looks like recently several classes have had the compiler output paths setting changed in IntelliJ from "Use module compile output path" with a hardcoded path to "inherit project compile output path" It looks like Team City is not picking up this change. Do I need to reload the project somehow for that change in settings to be picked up?

0

Screen shot of settings window in IntelliJ

0

Please sign in to leave a comment.