JUnit Parser - Too many levels of symbolic links

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

JUnit task fails with the following error in Bamboo 4.4.5 and even version 5.1.0 with the following error message:

simple    10-Sep-2013 15:54:29    Starting task 'Parse test output' of type 'com.atlassian.bamboo.plugins.testresultparser:task.testresultparser.junit'
simple    10-Sep-2013 15:54:29    Parsing test results...
error    10-Sep-2013 15:55:55    Error occurred while running Task 'Parse test' of type com.atlassian.bamboo.plugins.testresultparser:task.testresultparser.junit.
error    10-Sep-2013 15:55:55    com.atlassian.bamboo.task.TaskException: Failed to execute task
error    10-Sep-2013 15:55:55        at com.atlassian.bamboo.plugins.testresultparser.task.JUnitResultParserTask.execute(JUnitResultParserTask.java:56)
error    10-Sep-2013 15:55:55        at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:216)
error    10-Sep-2013 15:55:55        at com.atlassian.bamboo.task.TaskExecutorImpl.execute(TaskExecutorImpl.java:98)
...
error    10-Sep-2013 15:55:55    Caused by: Caught error while checking for symbolic links
error    10-Sep-2013 15:55:55        at org.apache.tools.ant.DirectoryScanner.causesIllegalSymlinkLoop(DirectoryScanner.java:1887)
error    10-Sep-2013 15:55:55        at org.apache.tools.ant.DirectoryScanner.scandir(DirectoryScanner.java:1267)
...
error    10-Sep-2013 15:55:55    Caused by: java.io.IOException: Too many levels of symbolic links
error    10-Sep-2013 15:55:55        at java.io.UnixFileSystem.canonicalize0(Native Method)
error    10-Sep-2013 15:55:55        at java.io.UnixFileSystem.canonicalize(UnixFileSystem.java:172)
error    10-Sep-2013 15:55:55        at java.io.File.getCanonicalPath(File.java:576)
error    10-Sep-2013 15:55:55        at org.apache.tools.ant.util.SymbolicLinkUtils.isSymbolicLink(SymbolicLinkUtils.java:106)
error    10-Sep-2013 15:55:55        at org.apache.tools.ant.DirectoryScanner.causesIllegalSymlinkLoop(DirectoryScanner.java:1858)
...

 

Cause

When configuring the JUnit Parser task, wildcards(**) are used to specify the directory of test results, and this picks up some symlinks.

Instead of specifying something like **/test-reports/*.xml, try to use test-results/*.xml in the JUnit Parser task configuration page, and store all your test results in the test-results directory under the current working directory of the plan (which contains the JUnit task). 

Also, you might need to enable the "Pick up test results that were created outside of this build" option under the Advanced Options of the JUnit task configuration page (available since Bamboo version 5.0.1).

Last modified on Nov 2, 2018

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.