当我尝试为service.xml构建服务时,我收到以下错误。
[java] D:\liferay-mvc\liferay-plugins-sdk-6.1.1-ce-ga2-20120731132656558\liferay-plugins-sdk-6.1.1\build-common-plugin.xml:169: java.io.IOException: Cannot run program "D:\liferay-mvc\liferay-portal-tomcat-6.1.1-ce-ga2-20120731132656558\liferay-portal-6.1.1-ce-ga2\tomcat-7.0.27\jre1.6.0_20\win\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:392)
[java] at org.apache.tools.ant.Target.performTasks(Target.java:413)
[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 "D:\liferay-mvc\liferay-portal-tomcat-6.1.1-ce-ga2-20120731132656558\liferay-portal-6.1.1-ce-ga2\tomcat-7.0.27\jre1.6.0_20\win\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
[echo] ${service.test.output}
[mkdir] Created dir: D:\liferay-mvc\liferay-plugins-sdk-6.1.1-ce-ga2-20120731132656558\liferay-plugins-sdk-6.1.1\portlets\library-portlet\docroot\WEB-INF\service-classes
compile-java:
[zip] Warning: skipping zip archive D:\liferay-mvc\liferay-plugins-sdk-6.1.1-ce-ga2-20120731132656558\liferay-plugins-sdk-6.1.1\portlets\library-portlet\docroot\WEB-INF\lib\library-portlet-service.jar because no files were included.
[delete] Deleting directory D:\liferay-mvc\liferay-plugins-sdk-6.1.1-ce-ga2-20120731132656558\liferay-plugins-sdk-6.1.1\portlets\library-portlet\docroot\WEB-INF\service-classes
BUILD SUCCESSFUL
Total time: 638 milliseconds
答案 0 :(得分:1)
你遇到了IDE-678。故障单链接到描述变通方法的forum post。或者 - 因为它是一个路径长度问题 - 它可能只是将你的插件-sdk移动到一个名字较短的目录 - 例如D:/liferay/sdk