Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-29085

Service builder fails when classpath argument get too long on Windows (>32k)

    Details

      Description

      The build-service ant task will create a java classpath that points to all libraries in portal library. Then when it forks the java executable it will try to create a process with all of those libraries for the classpath as a argument to the process. On Windows there is a 32k character limit for processes that are created. In many cases the default, out of the box configuration for Liferay Developer Studio users, the service builder task will fail because it will hit this 32k character limit on Windows.

      Here are some datapoints:

      http://issues.liferay.com/browse/IDE-678

      Buildfile: D:\dev java\QA\Liferay Developer Studio\examples-plugins-sdk-6.1.20\portlets\sample-service-builder-portlet\build.xml
      build-service:
      [java] D:\dev java\QA\Liferay Developer Studio\examples-plugins-sdk-6.1.20\build-common-plugin.xml:169: java.io.IOException: Cannot run program "C:\jdk6\jre\bin\java.exe": CreateProcess error=87, The parameter is incorrect
      [java] at org.apache.tools.ant.taskdefs.Java.fork(Java.java:798)
      [java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:214)
      [java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:135)
      [java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)
      [java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
      [java] at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
      [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      [java] at java.lang.reflect.Method.invoke(Method.java:597)
      [java] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
      [java] at org.apache.tools.ant.Task.perform(Task.java:348)
      [java] at org.apache.tools.ant.Target.execute(Target.java:390)
      [java] at org.apache.tools.ant.Target.performTasks(Target.java:411)
      [java] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
      [java] at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
      [java] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
      [java] at org.eclipse.ant.internal.launching.remote.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
      [java] at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
      [java] at org.eclipse.ant.internal.launching.remote.InternalAntRunner.run(InternalAntRunner.java:424)
      [java] at org.eclipse.ant.internal.launching.remote.InternalAntRunner.main(InternalAntRunner.java:138)
      [java] Caused by: java.io.IOException: Cannot run program "C:\jdk6\jre\bin\java.exe": CreateProcess error=87, The parameter is incorrect
      [java] at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
      [java] at java.lang.Runtime.exec(Runtime.java:593)
      [java] at org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Execute.java:862)
      [java] at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:481)
      [java] at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:495)
      [java] at org.apache.tools.ant.taskdefs.Java.fork(Java.java:791)
      [java] ... 18 more
      [java] Caused by: java.io.IOException: CreateProcess error=87, The parameter is incorrect
      [java] at java.lang.ProcessImpl.create(Native Method)
      [java] at java.lang.ProcessImpl.<init>(ProcessImpl.java:81)
      [java] at java.lang.ProcessImpl.start(ProcessImpl.java:30)
      [java] at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)
      [java] ... 23 more
      [java] Java Result: -1

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                7 years, 10 weeks ago

                Packages

                Version Package
                6.1.1 CE GA2
                6.1.2 CE GA3
                6.1.30 EE GA3
                --Sprint 11/12
                6.2.0 CE M2