留言板

Liferay Service Builder Not Running

Kevin Matthews,修改在10 年前。

Liferay Service Builder Not Running

Junior Member 帖子: 38 加入日期: 12-5-23 最近的帖子
Hi,
I am having a problem with service builder. It has always been running for a while but now I am seeing some errors all of a sudden. Please see error stack trace below. Has anyone encountered with this issue? I also tried to point to anther sdk with a shorter directory path and still does not work. Please advise. Thanks

[Console output redirected to fileemoticon:\dev\prod-projects\.metadata\.plugins\com.liferay.ide.eclipse.sdk\sdk.log]
Buildfile: D:\dev\liferay-plugins-sdk-6.0.6-20110225\portlets\prod-portlet\build.xml
build-service:
[copy] Copying 1 file to D:\dev\liferay-plugins-sdk-6.0.6-20110225\portlets\prod-portlet\docroot\WEB-INF\classes
[java] D:\dev\liferay-plugins-sdk-6.0.6-20110225\build-common-plugin.xml:176: java.io.IOException: Cannot run program "C:\Program Files (x86)\Java\jdk1.6.0_31\jre\bin\java.exe": CreateProcess error=206, The filename or extension is too long
[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:\Program Files (x86)\Java\jdk1.6.0_31\jre\bin\java.exe": CreateProcess error=206, The filename or extension is too long
[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=206, The filename or extension is too long
[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
thumbnail
David H Nebinger,修改在10 年前。

RE: Liferay Service Builder Not Running

Liferay Legend 帖子: 14915 加入日期: 06-9-2 最近的帖子
a) you shouldn't be using a jre, you should be using a jdk (you're a developer, right?).
b) you shouldn't be allowing java to install where windows wants to put it. "Program Files" directory is crappy, has a space, and messes a lot of things up.

Install the JDK to the root of C:\ (or something), set up your JAVA_HOME environment variable, and use it to prefix %JAVA_HOME%\bin to the front of your PATH variable.
Kevin Matthews,修改在10 年前。

RE: Liferay Service Builder Not Running

Junior Member 帖子: 38 加入日期: 12-5-23 最近的帖子
Still doesn't work. when set JAVA_HOME. When I run service builder it still pointing to C:\Program Files (x86)\Java\jdk1.6.0_31\jre\bin\java.exe
[java] D:\dev\liferay-plugins-sdk-6.0.6-20110225\build-common-plugin.xml:176: java.io.IOException: Cannot run program "C:\Program Files (x86)\Java\jdk1.6.0_31\jre\bin\java.exe. Is there a way to configure service builder to point to the jdk in my JAVA_HOME directory?
thumbnail
David H Nebinger,修改在10 年前。

RE: Liferay Service Builder Not Running

Liferay Legend 帖子: 14915 加入日期: 06-9-2 最近的帖子
Are you doing this within the IDE? If so, it's probably using what is defined within the IDE.
Kevin Matthews,修改在10 年前。

RE: Liferay Service Builder Not Running

Junior Member 帖子: 38 加入日期: 12-5-23 最近的帖子
Yes I am using it with the Eclipse STS with liferay IDE plugin. By default its using the Liferay JRE.
thumbnail
David H Nebinger,修改在10 年前。

RE: Liferay Service Builder Not Running

Liferay Legend 帖子: 14915 加入日期: 06-9-2 最近的帖子
So switch over to a regular JDK in the IDE and try it again...
thumbnail
Jack Bakker,修改在9 年前。

RE: Liferay Service Builder Not Running

Liferay Master 帖子: 978 加入日期: 10-1-3 最近的帖子
on windows, you can try turning "fork=false" in build-common-portlet.xml (I also do this on Windows in build-common-theme.xml)
Chad LaVigne,修改在9 年前。

RE: Liferay Service Builder Not Running

New Member 帖子: 10 加入日期: 13-11-12 最近的帖子
For anyone else running into this, the java call under the build-service target in <sdk_home>/build-common-plugin is the one that needs fork="false".
thumbnail
Olaf Kock,修改在9 年前。

RE: Liferay Service Builder Not Running

Liferay Legend 帖子: 6400 加入日期: 08-9-23 最近的帖子
As OP mentions 6.0.6: This used to be a problem in older versions when the Path length of the compilation classpath exceeds (I believe) 32K length (on windows). Thus, a quickfix is to install close to the top directory, with short directory names. It's fixed in later versions (of the SDK) by not concatenating all of the Jars with full directory etc. to the path. I believe it's LPS-29085
davehu .,修改在8 年前。

RE: Liferay Service Builder Not Running

New Member 发布: 1 加入日期: 15-10-28 最近的帖子
I changed the path of the download directory even though I configured Chrome to ask me every time for the download location. Fortunately this helped to solve the problem and extensions are installed again normally
freddy 96,修改在9 年前。

RE: Liferay Service Builder Not Running

New Member 帖子: 2 加入日期: 14-12-10 最近的帖子
RE: Liferay Service Builder Not Running
freddy 96,修改在9 年前。

RE: Liferay Service Builder Not Running

New Member 帖子: 2 加入日期: 14-12-10 最近的帖子
Try " Long Path Tool " is also useful in situations where you see these error messages:
Cannot read from source file or disk, there has been a sharing violation,
cannot delete file or folder, the file name you specified is not valid or too long,
the source or destination file may be in use and many other file managing errors that you encounter in your computing use.
thumbnail
Aditya Bhardwaj,修改在9 年前。

RE: Liferay Service Builder Not Running

Junior Member 帖子: 78 加入日期: 15-1-8 最近的帖子
Hi,

Just try this
1)In which folder your sdk is just rename to a short name and just short your path ie put directly in D (D:\Liferay\liferay-plugins-sdk) drive
not in like D:\Liferay\work\liferay\workspace\liferay-plugins-sdk-6.2-ee-sp6.

2)Also keep your path short for tomcat also.

3)Never put any space between your folder name like instead of liferay workspace use liferayworkspace