掲示板

Liferay Service Builder Not Running

10年前 に Kevin Matthews によって更新されました。

Liferay Service Builder Not Running

Junior Member 投稿: 38 参加年月日: 12/05/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
10年前 に David H Nebinger によって更新されました。

RE: Liferay Service Builder Not Running

Liferay Legend 投稿: 14914 参加年月日: 06/09/02 最新の投稿
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.
10年前 に Kevin Matthews によって更新されました。

RE: Liferay Service Builder Not Running

Junior Member 投稿: 38 参加年月日: 12/05/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
10年前 に David H Nebinger によって更新されました。

RE: Liferay Service Builder Not Running

Liferay Legend 投稿: 14914 参加年月日: 06/09/02 最新の投稿
Are you doing this within the IDE? If so, it's probably using what is defined within the IDE.
10年前 に Kevin Matthews によって更新されました。

RE: Liferay Service Builder Not Running

Junior Member 投稿: 38 参加年月日: 12/05/23 最新の投稿
Yes I am using it with the Eclipse STS with liferay IDE plugin. By default its using the Liferay JRE.
thumbnail
10年前 に David H Nebinger によって更新されました。

RE: Liferay Service Builder Not Running

Liferay Legend 投稿: 14914 参加年月日: 06/09/02 最新の投稿
So switch over to a regular JDK in the IDE and try it again...
thumbnail
9年前 に Jack Bakker によって更新されました。

RE: Liferay Service Builder Not Running

Liferay Master 投稿: 978 参加年月日: 10/01/03 最新の投稿
on windows, you can try turning "fork=false" in build-common-portlet.xml (I also do this on Windows in build-common-theme.xml)
9年前 に Chad LaVigne によって更新されました。

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
9年前 に Olaf Kock によって更新されました。

RE: Liferay Service Builder Not Running

Liferay Legend 投稿: 6396 参加年月日: 08/09/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
8年前 に davehu . によって更新されました。

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
9年前 に freddy 96 によって更新されました。

RE: Liferay Service Builder Not Running

New Member 投稿: 2 参加年月日: 14/12/10 最新の投稿
RE: Liferay Service Builder Not Running
9年前 に freddy 96 によって更新されました。

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
9年前 に Aditya Bhardwaj によって更新されました。

RE: Liferay Service Builder Not Running

Junior Member 投稿: 78 参加年月日: 15/01/08 最新の投稿
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