Fórumok

Liferay Service Builder Not Running

Kevin Matthews, módosítva 10 év-val korábban

Liferay Service Builder Not Running

Junior Member Bejegyzések: 38 Csatlakozás dátuma: 2012.05.23. Legújabb bejegyzések
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, módosítva 10 év-val korábban

RE: Liferay Service Builder Not Running

Liferay Legend Bejegyzések: 14914 Csatlakozás dátuma: 2006.09.02. Legújabb bejegyzések
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, módosítva 10 év-val korábban

RE: Liferay Service Builder Not Running

Junior Member Bejegyzések: 38 Csatlakozás dátuma: 2012.05.23. Legújabb bejegyzések
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, módosítva 10 év-val korábban

RE: Liferay Service Builder Not Running

Liferay Legend Bejegyzések: 14914 Csatlakozás dátuma: 2006.09.02. Legújabb bejegyzések
Are you doing this within the IDE? If so, it's probably using what is defined within the IDE.
Kevin Matthews, módosítva 10 év-val korábban

RE: Liferay Service Builder Not Running

Junior Member Bejegyzések: 38 Csatlakozás dátuma: 2012.05.23. Legújabb bejegyzések
Yes I am using it with the Eclipse STS with liferay IDE plugin. By default its using the Liferay JRE.
thumbnail
David H Nebinger, módosítva 10 év-val korábban

RE: Liferay Service Builder Not Running

Liferay Legend Bejegyzések: 14914 Csatlakozás dátuma: 2006.09.02. Legújabb bejegyzések
So switch over to a regular JDK in the IDE and try it again...
thumbnail
Jack Bakker, módosítva 9 év-val korábban

RE: Liferay Service Builder Not Running

Liferay Master Bejegyzések: 978 Csatlakozás dátuma: 2010.01.03. Legújabb bejegyzések
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, módosítva 9 év-val korábban

RE: Liferay Service Builder Not Running

New Member Bejegyzések: 10 Csatlakozás dátuma: 2013.11.12. Legújabb bejegyzések
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, módosítva 9 év-val korábban

RE: Liferay Service Builder Not Running

Liferay Legend Bejegyzések: 6396 Csatlakozás dátuma: 2008.09.23. Legújabb bejegyzések
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 ., módosítva 8 év-val korábban

RE: Liferay Service Builder Not Running

New Member Bejegyzés: 1 Csatlakozás dátuma: 2015.10.28. Legújabb bejegyzések
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, módosítva 9 év-val korábban

RE: Liferay Service Builder Not Running

New Member Bejegyzések: 2 Csatlakozás dátuma: 2014.12.10. Legújabb bejegyzések
RE: Liferay Service Builder Not Running
freddy 96, módosítva 9 év-val korábban

RE: Liferay Service Builder Not Running

New Member Bejegyzések: 2 Csatlakozás dátuma: 2014.12.10. Legújabb bejegyzések
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, módosítva 9 év-val korábban

RE: Liferay Service Builder Not Running

Junior Member Bejegyzések: 78 Csatlakozás dátuma: 2015.01.08. Legújabb bejegyzések
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