Problem using ant/javac/executable for JDK 1.4

Hello,

We're having problem using ant javac task's executable attribute.
We need to use this attribute in order to use JDK 1.4, but running the following code results in this undescriptive error:


<javac destdir="/home/gp185036/classes"

           srcdir="/home/gp185036/src"

           executable="/home/ta230211/TeamCity_Agent_Space/essue803/TeamCity-Agents/ta230211/work/8778ecf5a869c1a5/TeamCityTest/Checkout/lib/jdk/14/bin/javac"

           fork="yes"

           debug="on">

[14:11:12]: [javac] Error running /home/ta230208/TeamCity_Agent_Space/sdvsue100/TeamCity-Agents/ta230208/work/8778ecf5a869c1a5/TeamCityTest/Checkout/lib/jdk/14/bin/javac compiler

Could this be a bug? I've attached the full report as a word document.

Thanks,

Calvin



Attachment(s):
TeamCity problem.doc
7 comments
Comment actions Permalink

Calvin,

Please check javac has execute permission after it's checked out of Subversion. You can use Ant's <chmod> task for that.

Also, you can use relative paths in your build script and omit ${teamcity.build.checkoutDir}/ part, that may simplify troubleshooting in future.

Michael

0
Comment actions Permalink

chmod was the problem. What should I try next?

Thank you


[15:17:56]:      [test_1.4] svn
[15:17:56]:           [svn] <Checkout> started ...
[15:19:37]:           [svn] <Checkout> finished.
[15:19:37]:      [test_1.4] echo
[15:19:37]:           [echo] CHANGING javac.exe permission to ugo+rx
[15:21:09]:      [test_1.4] javac
[15:21:13]:           [javac] Compiling 1 source file to /home/ta230211/TeamCity_Agent_Space/essue803/TeamCity-Agents/ta230211/work/8778ecf5a869c1a5/TeamCityTest/Checkout/TeamCityTest
[15:21:17]:           [javac] Error running /home/ta230211/TeamCity_Agent_Space/essue803/TeamCity-Agents/ta230211/work/8778ecf5a869c1a5/TeamCityTest/Checkout/lib/jdk/14/bin/javac compiler
[15:21:17]: Ant output:
........

BUILD FAILED
/home/ta230211/TeamCity_Agent_Space/essue803/TeamCity-Agents/ta230211/work/8778ecf5a869c1a5/tdJMSAdapterBuild/CompileTest.xml:75: Error running /home/ta230211/TeamCity_Agent_Space/essue803/TeamCity-Agents/ta230211/work/8778ecf5a869c1a5/TeamCityTest/Checkout/lib/jdk/14/bin/javac compiler
     at org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter.executeExternalCompile(DefaultCompilerAdapter.java:509)
     at org.apache.tools.ant.taskdefs.compilers.JavacExternal.execute(JavacExternal.java:61)
     at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:1065)
     at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:882)
     at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     at java.lang.reflect.Method.invoke(Method.java:618)
    [chmod]     at org.apache.tool
[15:21:18]: Process exit code: 1



Attachment(s):
chmod.log.zip
0
Comment actions Permalink

I meant to say... chmod WASN'T the problem. We're still suffering from this bug.

Can you please advise? Thanks

0
Comment actions Permalink

Can the devs please help?
I think this is a bug in TeamCity.

Thanks

0
Comment actions Permalink

Hi Calvin

Unfortunately I still cannot reproduce this behavior.
Please let us some time to research it deeper.

Thanks
Michael

0
Comment actions Permalink

Hi Michael,

Have you had a chance to look at this problem?
The script for reproducing this error is provided on the previous posts.

Thanks

0
Comment actions Permalink

Hi Calvin

Sorry, it took so much time on my side. I performed a number of tests, but didn't confirm the issue.
I would suggest to

  1. remove ${teamcity.build.checkoutDir}/ prefix from your configuration files and settings in UI. Agent should change working directory to build's checkout directory, so effective commands will be the same, but make ant scripts portable without manual changes.
  2. start a build and reproduce the issue
  3. look into teamcity-agent.log for exact command how Ant was started
  4. log on into the same account, as used by agent
  5. go to checkout directory
  6. run Ant manually, using exactly the same command from step 3.


Thanks

0

Please sign in to leave a comment.