Unable to assemble the project with multiple dependencies

Hi…
I am building a project with multiple dependencies. So, i’m unable to Assemble the project for the following reason…

Error:

Caused by: java.io.IOException: Cannot run program "C:\Program Files\Java\jdk1.8.0_191\bin\java.exe" (in directory "C:\Users\Narayanan\studio-projects\project-management\modules\web-toolkit"): CreateProcess error=206, The filename or extension is too long
 at net.rubygrapefruit.platform.internal.DefaultProcessLauncher.start(DefaultProcessLauncher.java:25)
 ... 7 more
Caused by: java.io.IOException: CreateProcess error=206, The filename or extension is too long

Hello @Narayanan

Could you share a project where the problem is reproduced?

Regards,
Daniil

Hi @tsarev,

Thanks for the reply…

Actually i have more than 5 App Components and more than 5 dependencies in my Project. The error only comes when i have more than 5 App components. It works correctly when i have less than or equal to 5 app components. I’m unable to reproduce my problem to you, because most of my App Components are only available inside my local repository…

If i remove any one of the App Component (Even i tried randomly i.e., less than or equal to 5 App Components). It works correctly…

Please provide me a solution ASAP…

Have you tried to reproduce the problem with our public addons (reports, bpm, charts, etc)?

What version of CUBA do you use?

Regards,
Daniil

Yes… I tried with the public addons… Im using Platform Version 6.10.9, I am getting the same error. I have reproduced the problem and attached here…
testError.zip (94.3 KB)

Thanks…

Thank you for demo project.

Could you clarify, are you trying to build the project with old Studio (browser / standalone) or with new Studio (Intellij IDEA plugin / bundled version)?

Have you tried to assemble the project with Gradle?

I’ve tried to assemble the project both with browser edition CUBA Studio 6.10.3 and with CUBA Studio plugin 9.0 for Intellij IDEA and everything is OK. The only thing is chaged - i’ve removed Vaadin spreadsheet from project, because it requires a license.

I’m using the Cuba Studio - Standalone Version - 6.10.3
Build on 2019-03-15

Yes… I also tried to assemble the project with Gradle

I have the Vaadin Spreadsheet license installed… Even though it is not working… I am getting the Error: Caused by: java.io.IOException: CreateProcess error=206, The filename or extension is too long

That’s why i can’t understand, why i’m getting this error…

If i removed the Vaadin Spreadsheet… Mine also working…

Thanks…

Unfortunately, I cannot help you in this case - we do not have a license for Vaadin Spreadsheet.

Regards,
Daniil

Its okay… But the funny part is… If i have only 2 Dependencies, then it works… Even works with the Vaadin spreadsheet… I think the Error is coming because of length of the classpath…

Yes, I also suggest that it is related to the classpath problem. Could you clarify what OS do you use?

I’m using Windows 10 Pro

Is the classpath problem resolvable…?

We have an issue related to the problem: GitHub.

As described in comments you can exclude some dependencies from toolkit module to decrease classpath size.

Regards,
Daniil

This workaround didn’t help, is there any other solution to this problem other than switching to linux ?

Try adding shortClassPath = true at buildWidgetSet task inside build.gradle to fix:

task buildWidgetSet(type: CubaWidgetSetBuilding) {
    widgetSetClass = 'com.company.kairosmd.web.toolkit.ui.AppWidgetSet'
    shortClassPath = true
}
1 Like