Forum Discussion

lenenberg's avatar
lenenberg
Occasional Contributor
11 years ago

java.io.FileNotFoundException (File name too long)

The file name of linux OS has a limit 256.
We use maven-soapui-plugin in jenkins.
For reporting it assembles file name from the several test cases names.
Sometime it exceeds the limit.

2013-08-09 16:11:29,057 ERROR [SoapUITestCaseRunner] Error saving failed result: java.io.FileNotFoundException: /tmp/workspace/M2M-DDCOM-test/target/surefire-reports/TestSuite_ECSTEST541-TestCase_Verify_that_DDcom_client_is_not_able_to_connect_with_Ejabberd_through_proxy_when_comalcatelmagentserverproxyenabledfalse-Run_TestCase_Check_For_Connected-Library_DoNotRun-WaitForXmppState-Get_Connection_Status_On_Device-0-OK.txt (File name too long)
java.io.FileNotFoundException: /tmp/workspace/M2M-DDCOM-test/target/surefire-reports/TestSuite_ECSTEST541-TestCase_Verify_that_DDcom_client_is_not_able_to_connect_with_Ejabberd_through_proxy_when_comalcatelmagentserverproxyenabledfalse-Run_TestCase_Check_For_Connected-Library_DoNotRun-WaitForXmppState-Get_Connection_Status_On_Device-0-OK.txt (File name too long)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:194)
at java.io.FileOutputStream.<init>(FileOutputStream.java:84)
at java.io.PrintWriter.<init>(PrintWriter.java:146)
at com.eviware.soapui.tools.SoapUITestCaseRunner.afterStep(SoapUITestCaseRunner.java:722)
at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.runTestStep(AbstractTestCaseRunner.java:250)
at com.eviware.soapui.impl.wsdl.testcase.WsdlTestCaseRunner.runCurrentTestStep(WsdlTestCaseRunner.java:48)
at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:147)
at com.eviware.soapui.impl.wsdl.support.AbstractTestCaseRunner.internalRun(AbstractTestCaseRunner.java:42)
at com.eviware.soapui.impl.wsdl.support.AbstractTestRunner.run(AbstractTestRunner.java:135)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)

6 Replies

  • nmrao's avatar
    nmrao
    Champion Level 3
    You mean to say that the long file name created by soapUI?
    TestSuite_ECSTEST541-TestCase_Verify_that_DDcom_client_is_not_able_to_connect_with_Ejabberd_through_proxy_when_comalcatelmagentserverproxyenabledfalse-Run_TestCase_Check_For_Connected-Library_DoNotRun-WaitForXmppState-Get_Connection_Status_On_Device-0-OK.txt
  • lenenberg's avatar
    lenenberg
    Occasional Contributor
    nmrao wrote:
    You mean to say that the long file name created by soapUI?
    TestSuite_ECSTEST541-TestCase_Verify_that_DDcom_client_is_not_able_to_connect_with_Ejabberd_through_proxy_when_comalcatelmagentserverproxyenabledfalse-Run_TestCase_Check_For_Connected-Library_DoNotRun-WaitForXmppState-Get_Connection_Status_On_Device-0-OK.txt

    Yes. Each one separately testcase or teststep have a name less than 256. But when it is combined bu SOAPIU for reporting it has long name.
  • PeterCook1's avatar
    PeterCook1
    New Contributor

    I recommend you to use LongPath Tool program to eliminate such errors.