Fórum

LIferay Development - Portlets - Creating Service Layer

Vichantri Geiantilal, modificado 11 Anos atrás.

LIferay Development - Portlets - Creating Service Layer

Junior Member Postagens: 29 Data de Entrada: 11/06/12 Postagens Recentes
Hello,

I´m trying to create a simple test plugin and created a service Layer


When i try to develop a Service Layer for the portlet with eclipse, after the configuration i try to build the service and it say on console that Build Sucessfully but did not create the files i need.

The below error appers

Console output redirected to file:E:\Empresas\Cofimatica\Pentaho Liferay\Liferay Development\Project\.metadata\.plugins\com.liferay.ide.eclipse.sdk\sdk.log]
Buildfile: C:\Program Files\liferay-plugins-sdk-6.0.2\portlets\library-portlet\build.xml
build-service:
[java] C:\Program Files\liferay-plugins-sdk-6.0.2\build-common-plugin.xml:311: java.io.IOException: CreateProcess: "E:\Empresas\Cofimatica\Pentaho Liferay\Liferay Development\Liferay\liferay-portal-6.0.2\tomcat-6.0.26\jre1.5.0_22\win\bin\java.exe" -Dexternal-properties=com/liferay/portal/tools/dependencies/portal-tools.properties -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger "-Dservice.input.file=C:\Program Files\liferay-plugins-sdk-6.0.2\portlets\library-portlet\docroot\WEB-INF\service.xml" -Dservice.hbm.file=docroot/WEB-INF/src/META-INF/portlet-hbm.xml -Dservice.orm.file=docroot/WEB-INF/src/META-INF/portlet-orm.xml -Dservice.model.hints.file=docroot/WEB-INF/src/META-INF/portlet-model-hints.xml -Dservice.spring.file=docroot/WEB-INF/src/META-INF/portlet-spring.xml -Dservice.spring.base.file=docroot/WEB-INF/src/META-INF/base-spring.xml -Dservice.spring.dynamic.data.source.file=docroot/WEB-INF/src/META-INF/dynamic-data-source-spring.xml -Dservice.spring.hibernate.file=docroot/WEB-INF/src/META-INF/hibernate-spring.xml -Dservice.spring.infrastructure.file=docroot/WEB-INF/src/META-?
[java] at org.apache.tools.ant.taskdefs.Java.fork(Java.java:791)
[java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:211)
[java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:132)
[java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:105)
[java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:592)
[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:357)
[java] at org.apache.tools.ant.Target.performTasks(Target.java:385)
[java] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
[java] at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
[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:1189)
[java] at org.eclipse.ant.internal.launching.remote.InternalAntRunner.run(InternalAntRunner.java:423)
[java] at org.eclipse.ant.internal.launching.remote.InternalAntRunner.main(InternalAntRunner.java:137)
[java] Caused by: java.io.IOException: CreateProcess: "E:\Empresas\Cofimatica\Pentaho Liferay\Liferay Development\Liferay\liferay-portal-6.0.2\tomcat-6.0.26\jre1.5.0_22\win\bin\java.exe" -Dexternal-properties=com/liferay/portal/tools/dependencies/portal-tools.properties -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger "-Dservice.input.file=C:\Program Files\liferay-plugins-sdk-6.0.2\portlets\library-portlet\docroot\WEB-INF\service.xml" -Dservice.hbm.file=docroot/WEB-INF/src/META-INF/portlet-hbm.xml -Dservice.orm.file=docroot/WEB-INF/src/META-INF/portlet-orm.xml -Dservice.model.hints.file=docroot/WEB-INF/src/META-INF/portlet-model-hints.xml -Dservice.spring.file=docroot/WEB-INF/src/META-INF/portlet-spring.xml -Dservice.spring.base.file=docroot/WEB-INF/src/META-INF/base-spring.xml -Dservice.spring.dynamic.data.source.file=docroot/WEB-INF/src/META-INF/dynamic-data-source-spring.xml -Dservice.spring.hibernate.file=docroot/WEB-INF/src/META-INF/hibernate-spring.xml -Dservice.spring.infrastructure.file=docroot/WEB-INF/src/META-?
[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:451)
[java] at java.lang.Runtime.exec(Runtime.java:591)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:592)
[java] at org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Execute.java:832)
[java] at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:447)
[java] at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:461)
[java] at org.apache.tools.ant.taskdefs.Java.fork(Java.java:784)
[java] ... 19 more
[java] --- Nested Exception ---
[java] java.io.IOException: CreateProcess: "E:\Empresas\Cofimatica\Pentaho Liferay\Liferay Development\Liferay\liferay-portal-6.0.2\tomcat-6.0.26\jre1.5.0_22\win\bin\java.exe" -Dexternal-properties=com/liferay/portal/tools/dependencies/portal-tools.properties -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger "-Dservice.input.file=C:\Program Files\liferay-plugins-sdk-6.0.2\portlets\library-portlet\docroot\WEB-INF\service.xml" -Dservice.hbm.file=docroot/WEB-INF/src/META-INF/portlet-hbm.xml -Dservice.orm.file=docroot/WEB-INF/src/META-INF/portlet-orm.xml -Dservice.model.hints.file=docroot/WEB-INF/src/META-INF/portlet-model-hints.xml -Dservice.spring.file=docroot/WEB-INF/src/META-INF/portlet-spring.xml -Dservice.spring.base.file=docroot/WEB-INF/src/META-INF/base-spring.xml -Dservice.spring.dynamic.data.source.file=docroot/WEB-INF/src/META-INF/dynamic-data-source-spring.xml -Dservice.spring.hibernate.file=docroot/WEB-INF/src/META-INF/hibernate-spring.xml -Dservice.spring.infrastructure.file=docroot/WEB-INF/src/META-?
[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:451)
[java] at java.lang.Runtime.exec(Runtime.java:591)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:592)
[java] at org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Execute.java:832)
[java] at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:447)
[java] at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:461)
[java] at org.apache.tools.ant.taskdefs.Java.fork(Java.java:784)
[java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:211)
[java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:132)
[java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:105)
[java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[java] at java.lang.reflect.Method.invoke(Method.java:592)
[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:357)
[java] at org.apache.tools.ant.Target.performTasks(Target.java:385)
[java] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
[java] at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
[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:1189)
[java] at org.eclipse.ant.internal.launching.remote.InternalAntRunner.run(InternalAntRunner.java:423)
[java] at org.eclipse.ant.internal.launching.remote.InternalAntRunner.main(InternalAntRunner.java:137)
[java] Java Result: -1
[mkdir] Created dir: C:\Program Files\liferay-plugins-sdk-6.0.2\portlets\library-portlet\docroot\WEB-INF\service-classes
compile-java:
[zip] Warning: skipping zip archive C:\Program Files\liferay-plugins-sdk-6.0.2\portlets\library-portlet\docroot\WEB-INF\lib\library-portlet-service.jar because no files were included.
[delete] Deleting directory C:\Program Files\liferay-plugins-sdk-6.0.2\portlets\library-portlet\docroot\WEB-INF\service-classes
BUILD SUCCESSFUL
Total time: 1 second


Can anyone help to see whats the problem? I think its because of the database, the portal it´s working with SQL SErver but i dont know how it works with the service.

Thank u
Vichantri Geiantilal, modificado 11 Anos atrás.

RE: LIferay Development - Portlets - Creating Service Layer

Junior Member Postagens: 29 Data de Entrada: 11/06/12 Postagens Recentes
Can anyone help me with this problem pleasee
thumbnail
Amit Doshi, modificado 11 Anos atrás.

RE: LIferay Development - Portlets - Creating Service Layer

Liferay Master Postagens: 550 Data de Entrada: 29/12/10 Postagens Recentes
Plz attach your service.xml
Vichantri Geiantilal, modificado 11 Anos atrás.

RE: LIferay Development - Portlets - Creating Service Layer

Junior Member Postagens: 29 Data de Entrada: 11/06/12 Postagens Recentes
Amit Doshi:
Plz attach your service.xml



My service.xml


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE service-builder PUBLIC "-//Liferay//DTD Service Builder 6.0.0//EN" "http://www.liferay.com/dtd/liferay-service-builder_6_0_0.dtd">
<service-builder package-path="com.library.slayer">
<author>Vichantri</author>
<namespace>LMS</namespace>

<entity name="LMSBook" local-service="true" remote-service="false">
<!-- PK fields -->
<column name="bookId" type="long" primary="true" />
<!-- UI fields -->
<column name="bookTitle" type="String" />
<column name="author" type="String" />
<!-- Audit fields -->
<column name="dateAdded" type="Date" />
</entity>
</service-builder>
thumbnail
Gregory Amerson, modificado 11 Anos atrás.

RE: LIferay Development - Portlets - Creating Service Layer

Liferay Legend Postagens: 1123 Data de Entrada: 16/02/10 Postagens Recentes
I think the problem is the path length when trying to execute the external java process.
[java] java.io.IOException: CreateProcess: "E:\Empresas\Cofimatica\Pentaho Liferay\Liferay Development\Liferay\liferay-portal-6.0.2\tomcat-6.0.26\jre1.5.0_22\win\bin\java.exe" -Dexternal-properties=com/liferay/portal/tools/dependencies/portal-tools.properties -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger "-Dservice.input.file=C:\Program Files\liferay-plugins-sdk-6.0.2\portlets\library-portlet\docroot\WEB-INF\service.xml" -Dservice.hbm.file=docroot/WEB-INF/src/META-INF/portlet-hbm.xml -Dservice.orm.file=docroot/WEB-INF/src/META-INF/portlet-orm.xml -Dservice.model.hints.file=docroot/WEB-INF/src/META-INF/portlet-model-hints.xml -Dservice.spring.file=docroot/WEB-INF/src/META-INF/portlet-spring.xml -Dservice.spring.base.file=docroot/WEB-INF/src/META-INF/base-spring.xml -Dservice.spring.dynamic.data.source.file=docroot/WEB-INF/src/META-INF/dynamic-data-source-spring.xml -Dservice.spring.hibernate.file=docroot/WEB-INF/src/META-INF/hibernate-spring.xml -Dservice.spring.infrastructure.file=docroot/WEB-INF/src/META-?


Go to Window > Preferences > Java > Installed JREs and remove the JRE that is associated with that path. Then just use the system default JRE that is likely a much shorter path. Then try again.
Vichantri Geiantilal, modificado 11 Anos atrás.

RE: LIferay Development - Portlets - Creating Service Layer

Junior Member Postagens: 29 Data de Entrada: 11/06/12 Postagens Recentes
Gregory Amerson:
I think the problem is the path length when trying to execute the external java process.
[java] java.io.IOException: CreateProcess: "E:\Empresas\Cofimatica\Pentaho Liferay\Liferay Development\Liferay\liferay-portal-6.0.2\tomcat-6.0.26\jre1.5.0_22\win\bin\java.exe" -Dexternal-properties=com/liferay/portal/tools/dependencies/portal-tools.properties -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger "-Dservice.input.file=C:\Program Files\liferay-plugins-sdk-6.0.2\portlets\library-portlet\docroot\WEB-INF\service.xml" -Dservice.hbm.file=docroot/WEB-INF/src/META-INF/portlet-hbm.xml -Dservice.orm.file=docroot/WEB-INF/src/META-INF/portlet-orm.xml -Dservice.model.hints.file=docroot/WEB-INF/src/META-INF/portlet-model-hints.xml -Dservice.spring.file=docroot/WEB-INF/src/META-INF/portlet-spring.xml -Dservice.spring.base.file=docroot/WEB-INF/src/META-INF/base-spring.xml -Dservice.spring.dynamic.data.source.file=docroot/WEB-INF/src/META-INF/dynamic-data-source-spring.xml -Dservice.spring.hibernate.file=docroot/WEB-INF/src/META-INF/hibernate-spring.xml -Dservice.spring.infrastructure.file=docroot/WEB-INF/src/META-?


Go to Window > Preferences > Java > Installed JREs and remove the JRE that is associated with that path. Then just use the system default JRE that is likely a much shorter path. Then try again.



Thank u Gregory, i will try and let u know.
Vichantri Geiantilal, modificado 11 Anos atrás.

RE: LIferay Development - Portlets - Creating Service Layer

Junior Member Postagens: 29 Data de Entrada: 11/06/12 Postagens Recentes
[Console output redirected to file:E:\Empresas\Cofimatica\Pentaho Liferay\Liferay Development\Project\.metadata\.plugins\com.liferay.ide.eclipse.sdk\sdk.log]
Buildfile: C:\Program Files\liferay-plugins-sdk-6.0.2\portlets\library-portlet\build.xml
build-service:
[java] C:\Program Files\liferay-plugins-sdk-6.0.2\build-common-plugin.xml:311: java.io.IOException: Cannot run program "E:\Empresas\Cofimatica\Pentaho Liferay\Liferay Development\liferay-portal-tomcat-6.0.5\liferay-portal-6.0.5\tomcat-6.0.26\jre1.6.0_21\win\bin\java.exe": CreateProcess error=87, The parameter is incorrect
[java] at org.apache.tools.ant.taskdefs.Java.fork(Java.java:791)
[java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:211)
[java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:132)
[java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:105)
[java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
[java] at sun.reflect.GeneratedMethodAccessor1.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:357)
[java] at org.apache.tools.ant.Target.performTasks(Target.java:385)
[java] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
[java] at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
[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:1189)
[java] at org.eclipse.ant.internal.launching.remote.InternalAntRunner.run(InternalAntRunner.java:423)
[java] at org.eclipse.ant.internal.launching.remote.InternalAntRunner.main(InternalAntRunner.java:137)
[java] Caused by: java.io.IOException: Cannot run program "E:\Empresas\Cofimatica\Pentaho Liferay\Liferay Development\liferay-portal-tomcat-6.0.5\liferay-portal-6.0.5\tomcat-6.0.26\jre1.6.0_21\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 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[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.taskdefs.Execute$Java13CommandLauncher.exec(Execute.java:832)
[java] at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:447)
[java] at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:461)
[java] at org.apache.tools.ant.taskdefs.Java.fork(Java.java:784)
[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] ... 27 more
[java] --- Nested Exception ---
[java] java.io.IOException: Cannot run program "E:\Empresas\Cofimatica\Pentaho Liferay\Liferay Development\liferay-portal-tomcat-6.0.5\liferay-portal-6.0.5\tomcat-6.0.26\jre1.6.0_21\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 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[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.taskdefs.Execute$Java13CommandLauncher.exec(Execute.java:832)
[java] at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:447)
[java] at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:461)
[java] at org.apache.tools.ant.taskdefs.Java.fork(Java.java:784)
[java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:211)
[java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:132)
[java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:105)
[java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
[java] at sun.reflect.GeneratedMethodAccessor1.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:357)
[java] at org.apache.tools.ant.Target.performTasks(Target.java:385)
[java] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
[java] at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
[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:1189)
[java] at org.eclipse.ant.internal.launching.remote.InternalAntRunner.run(InternalAntRunner.java:423)
[java] at org.eclipse.ant.internal.launching.remote.InternalAntRunner.main(InternalAntRunner.java:137)
[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] ... 27 more
[java] Java Result: -1
[mkdir] Created dir: C:\Program Files\liferay-plugins-sdk-6.0.2\portlets\library-portlet\docroot\WEB-INF\service-classes
compile-java:
[zip] Warning: skipping zip archive C:\Program Files\liferay-plugins-sdk-6.0.2\portlets\library-portlet\docroot\WEB-INF\lib\library-portlet-service.jar because no files were included.
[delete] Deleting directory C:\Program Files\liferay-plugins-sdk-6.0.2\portlets\library-portlet\docroot\WEB-INF\service-classes
BUILD SUCCESSFUL
Total time: 910 milliseconds



I trie to do what u told me Gregory but didnt work :s got the above error.
thumbnail
Gregory Amerson, modificado 11 Anos atrás.

RE: LIferay Development - Portlets - Creating Service Layer

Liferay Legend Postagens: 1123 Data de Entrada: 16/02/10 Postagens Recentes
Looks like you will need to edit the Liferay Rutime associated with your project and switch the JVM to use one that is installed in a very short path. So I would recommend something like E:\jdk6, etc. Then go to Window > Preferences > Server > Runtime environments. Edit the Liferay Runtime and modify the JDK setting to use your new shortened path JDK. Then restart Eclipse and try again. This time the service builder invocation should use the new JDK location.
Vichantri Geiantilal, modificado 11 Anos atrás.

RE: LIferay Development - Portlets - Creating Service Layer

Junior Member Postagens: 29 Data de Entrada: 11/06/12 Postagens Recentes
Looks like you will need to edit the Liferay Rutime associated with your project and switch the JVM to use one that is installed in a very short path. So I would recommend something like E:\jdk6, etc. Then go to Window > Preferences > Server > Runtime environments. Edit the Liferay Runtime and modify the JDK setting to use your new shortened path JDK. Then restart Eclipse and try again. This time the service builder invocation should use the new JDK location.



Sorry i didnt get what to do. My jdk its C:\Program Files\liferay-plugins-sdk-6.0.2

When i go to Window > Preferences > Server > Runtime environments. On edit mode of Liferay Runtime there is the option to Select the JRE runtime...and the JRE Installed is on E:\Empresas\Cofimatica\Pentaho Liferay\Liferay Development\liferay-portal-tomcat-6.0.5\liferay-portal-6.0.5\tomcat-6.0.26\jre1.6.0_21\win

I put this dir on Window--> PReferences--> Java --> Installed JREs

soorry i dont know if im explaining myself well or not
Vichantri Geiantilal, modificado 11 Anos atrás.

RE: LIferay Development - Portlets - Creating Service Layer

Junior Member Postagens: 29 Data de Entrada: 11/06/12 Postagens Recentes
Vichantri Geiantilal:
Looks like you will need to edit the Liferay Rutime associated with your project and switch the JVM to use one that is installed in a very short path. So I would recommend something like E:\jdk6, etc. Then go to Window > Preferences > Server > Runtime environments. Edit the Liferay Runtime and modify the JDK setting to use your new shortened path JDK. Then restart Eclipse and try again. This time the service builder invocation should use the new JDK location.



Sorry i didnt get what to do. My jdk its C:\Program Files\liferay-plugins-sdk-6.0.2

When i go to Window > Preferences > Server > Runtime environments. On edit mode of Liferay Runtime there is the option to Select the JRE runtime...and the JRE Installed is on E:\Empresas\Cofimatica\Pentaho Liferay\Liferay Development\liferay-portal-tomcat-6.0.5\liferay-portal-6.0.5\tomcat-6.0.26\jre1.6.0_21\win

I put this dir on Window--> PReferences--> Java --> Installed JREs

soorry i dont know if im explaining myself well or not



On Edit Server Runtime Environment do i need to specify Liferay Javadoc URL if i m using Liferay Tomcat Bundle???
thumbnail
Gregory Amerson, modificado 11 Anos atrás.

RE: LIferay Development - Portlets - Creating Service Layer

Liferay Legend Postagens: 1123 Data de Entrada: 16/02/10 Postagens Recentes
Vichantri Geiantilal:
Vichantri Geiantilal:
Looks like you will need to edit the Liferay Rutime associated with your project and switch the JVM to use one that is installed in a very short path. So I would recommend something like E:\jdk6, etc. Then go to Window > Preferences > Server > Runtime environments. Edit the Liferay Runtime and modify the JDK setting to use your new shortened path JDK. Then restart Eclipse and try again. This time the service builder invocation should use the new JDK location.



Sorry i didnt get what to do. My jdk its C:\Program Files\liferay-plugins-sdk-6.0.2

When i go to Window > Preferences > Server > Runtime environments. On edit mode of Liferay Runtime there is the option to Select the JRE runtime...and the JRE Installed is on E:\Empresas\Cofimatica\Pentaho Liferay\Liferay Development\liferay-portal-tomcat-6.0.5\liferay-portal-6.0.5\tomcat-6.0.26\jre1.6.0_21\win

I put this dir on Window--> PReferences--> Java --> Installed JREs

soorry i dont know if im explaining myself well or not



On Edit Server Runtime Environment do i need to specify Liferay Javadoc URL if i m using Liferay Tomcat Bundle???


No that is optional.
Vichantri Geiantilal, modificado 11 Anos atrás.

RE: LIferay Development - Portlets - Creating Service Layer

Junior Member Postagens: 29 Data de Entrada: 11/06/12 Postagens Recentes
okay, im without ideas :S

what can i check ?
thumbnail
Gregory Amerson, modificado 11 Anos atrás.

RE: LIferay Development - Portlets - Creating Service Layer

Liferay Legend Postagens: 1123 Data de Entrada: 16/02/10 Postagens Recentes
Vichantri Geiantilal:
okay, im without ideas :S

what can i check ?



What JREs do you have listed in your Installed JREs?

Also, what java is configured on your system path? If you open a console and type java, which one does it execute?
Vichantri Geiantilal, modificado 11 Anos atrás.

RE: LIferay Development - Portlets - Creating Service Layer

Junior Member Postagens: 29 Data de Entrada: 11/06/12 Postagens Recentes
Gregory Amerson:
Vichantri Geiantilal:
okay, im without ideas :S

what can i check ?



What JREs do you have listed in your Installed JREs?

Also, what java is configured on your system path? If you open a console and type java, which one does it execute?



On eclipse the JREs i have listed is E:\Empresas\Cofimatica\Pentaho Liferay\Liferay Development\liferay-portal-tomcat-6.0.5\liferay-portal-6.0.5\tomcat-6.0.26\jre1.6.0_21\win from the JREs than comes with the Liferay 6.0.5 with tomcat 6.0.26 bundled

In my system path i hv the following java configured C:\Program Files\Java\jdk1.6.0_10
Vichantri Geiantilal, modificado 11 Anos atrás.

RE: LIferay Development - Portlets - Creating Service Layer

Junior Member Postagens: 29 Data de Entrada: 11/06/12 Postagens Recentes
Gregory can u help with this i tried everything but nthing its functional,

I´m using Eclipse Java EE IDE for Web Developers.Version: Helios Service Release 2
with
Liferay Portal CE6.0.5 bunbled with tomcat 6.0.26
Liferay Plugins SKD 6.0.2 and
Liferay IDE 1.5.3.v201205280937

is it okay??
Vichantri Geiantilal, modificado 11 Anos atrás.

RE: LIferay Development - Portlets - Creating Service Layer

Junior Member Postagens: 29 Data de Entrada: 11/06/12 Postagens Recentes
Vichantri Geiantilal:
Gregory can u help with this i tried everything but nthing its functional,

I´m using Eclipse Java EE IDE for Web Developers.Version: Helios Service Release 2
with
Liferay Portal CE6.0.5 bunbled with tomcat 6.0.26
Liferay Plugins SKD 6.0.2 and
Liferay IDE 1.5.3.v201205280937

is it okay??



Hello Greogory i change a few thing, created a new Project that uses

Eclipse Java EE IDE for Web Developers.Version: Helios Service Release 2

Liferay Portal CE6.0.5 bunbled with tomcat 6.0.26
Liferay Plugins SKD 6.0.6 and
Liferay IDE 1.5.3.v201205280937

I tried to change the version of SDK but it didn´t work again, give me the same error.

Please anyone can help with this??
thumbnail
Gregory Amerson, modificado 11 Anos atrás.

RE: LIferay Development - Portlets - Creating Service Layer

Liferay Legend Postagens: 1123 Data de Entrada: 16/02/10 Postagens Recentes
Vichantri Geiantilal:
Vichantri Geiantilal:
Gregory can u help with this i tried everything but nthing its functional,

I´m using Eclipse Java EE IDE for Web Developers.Version: Helios Service Release 2
with
Liferay Portal CE6.0.5 bunbled with tomcat 6.0.26
Liferay Plugins SKD 6.0.2 and
Liferay IDE 1.5.3.v201205280937

is it okay??



Hello Greogory i change a few thing, created a new Project that uses

Eclipse Java EE IDE for Web Developers.Version: Helios Service Release 2

Liferay Portal CE6.0.5 bunbled with tomcat 6.0.26
Liferay Plugins SKD 6.0.6 and
Liferay IDE 1.5.3.v201205280937

I tried to change the version of SDK but it didn´t work again, give me the same error.

Please anyone can help with this??


Delete or remove that JRE that is embedded inside of Tomcat. This will force eclipse to recognize another JRE when launching the service builder launch. It might have a new error but at least you are on your way to getting this problem solved.
Vichantri Geiantilal, modificado 11 Anos atrás.

RE: LIferay Development - Portlets - Creating Service Layer

Junior Member Postagens: 29 Data de Entrada: 11/06/12 Postagens Recentes
Gregory Amerson:
Vichantri Geiantilal:
Vichantri Geiantilal:
Gregory can u help with this i tried everything but nthing its functional,

I´m using Eclipse Java EE IDE for Web Developers.Version: Helios Service Release 2
with
Liferay Portal CE6.0.5 bunbled with tomcat 6.0.26
Liferay Plugins SKD 6.0.2 and
Liferay IDE 1.5.3.v201205280937

is it okay??



Hello Greogory i change a few thing, created a new Project that uses

Eclipse Java EE IDE for Web Developers.Version: Helios Service Release 2

Liferay Portal CE6.0.5 bunbled with tomcat 6.0.26
Liferay Plugins SKD 6.0.6 and
Liferay IDE 1.5.3.v201205280937

I tried to change the version of SDK but it didn´t work again, give me the same error.

Please anyone can help with this??


Delete or remove that JRE that is embedded inside of Tomcat. This will force eclipse to recognize another JRE when launching the service builder launch. It might have a new error but at least you are on your way to getting this problem solved.



Hello Gregory im doing everything from begining creating a new project etc..wth the following Eclipse Java EE IDE for Web Developers.Version: Helios Service Release 2

Liferay Portal CE6.0.5 bunbled with tomcat 6.0.26
Liferay Plugins SKD 6.0.5 and
Liferay IDE 1.5.3.v201205280937

Just to be shure i downloaded the same version of the portal for the sdk,

i will try to do what u tell me and let u know

thank u
Vichantri Geiantilal, modificado 11 Anos atrás.

RE: LIferay Development - Portlets - Creating Service Layer

Junior Member Postagens: 29 Data de Entrada: 11/06/12 Postagens Recentes
Hello Gregory I try what u tell me and still got the error on building a service. This time the error is different


[Console output redirected to file:E:\Empresas\Cofimatica\Pentaho Liferay\Liferay Development\LiferayProject\.metadata\.plugins\com.liferay.ide.eclipse.sdk\sdk.log]
Buildfile: C:\Program Files\liferay-plugins-sdk-6.0.5\portlets\library-portlet\build.xml
build-service:
[java] C:\Program Files\liferay-plugins-sdk-6.0.5\build-common-plugin.xml:176: java.io.IOException: Cannot run program "C:\Java\jre6\bin\java.exe": CreateProcess error=206, The filename or extension is too long
[java] at org.apache.tools.ant.taskdefs.Java.fork(Java.java:791)
[java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:211)
[java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:132)
[java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:105)
[java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
[java] at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[java] at java.lang.reflect.Method.invoke(Unknown Source)
[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:357)
[java] at org.apache.tools.ant.Target.performTasks(Target.java:385)
[java] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
[java] at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
[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:1189)
[java] at org.eclipse.ant.internal.launching.remote.InternalAntRunner.run(InternalAntRunner.java:423)
[java] at org.eclipse.ant.internal.launching.remote.InternalAntRunner.main(InternalAntRunner.java:137)
[java] Caused by: java.io.IOException: Cannot run program "C:\Java\jre6\bin\java.exe": CreateProcess error=206, The filename or extension is too long
[java] at java.lang.ProcessBuilder.start(Unknown Source)
[java] at java.lang.Runtime.exec(Unknown Source)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[java] at java.lang.reflect.Method.invoke(Unknown Source)
[java] at org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Execute.java:832)
[java] at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:447)
[java] at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:461)
[java] at org.apache.tools.ant.taskdefs.Java.fork(Java.java:784)
[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>(Unknown Source)
[java] at java.lang.ProcessImpl.start(Unknown Source)
[java] ... 28 more
[java] --- Nested Exception ---
[java] java.io.IOException: Cannot run program "C:\Java\jre6\bin\java.exe": CreateProcess error=206, The filename or extension is too long
[java] at java.lang.ProcessBuilder.start(Unknown Source)
[java] at java.lang.Runtime.exec(Unknown Source)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[java] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[java] at java.lang.reflect.Method.invoke(Unknown Source)
[java] at org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Execute.java:832)
[java] at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:447)
[java] at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:461)
[java] at org.apache.tools.ant.taskdefs.Java.fork(Java.java:784)
[java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:211)
[java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:132)
[java] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:105)
[java] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
[java] at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
[java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[java] at java.lang.reflect.Method.invoke(Unknown Source)
[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:357)
[java] at org.apache.tools.ant.Target.performTasks(Target.java:385)
[java] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
[java] at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
[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:1189)
[java] at org.eclipse.ant.internal.launching.remote.InternalAntRunner.run(InternalAntRunner.java:423)
[java] at org.eclipse.ant.internal.launching.remote.InternalAntRunner.main(InternalAntRunner.java:137)
[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>(Unknown Source)
[java] at java.lang.ProcessImpl.start(Unknown Source)
[java] ... 28 more
[java] Java Result: -1
[mkdir] Created dir: C:\Program Files\liferay-plugins-sdk-6.0.5\portlets\library-portlet\docroot\WEB-INF\service-classes
compile-java:
[zip] Warning: skipping zip archive C:\Program Files\liferay-plugins-sdk-6.0.5\portlets\library-portlet\docroot\WEB-INF\lib\library-portlet-service.jar because no files were included.
[delete] Deleting directory C:\Program Files\liferay-plugins-sdk-6.0.5\portlets\library-portlet\docroot\WEB-INF\service-classes
BUILD SUCCESSFUL
Total time: 914 milliseconds
thumbnail
Gregory Amerson, modificado 11 Anos atrás.

RE: LIferay Development - Portlets - Creating Service Layer

Liferay Legend Postagens: 1123 Data de Entrada: 16/02/10 Postagens Recentes
Can you try moving your portal location into a low directory, something like C:\liferay-portal and try again?
Vichantri Geiantilal, modificado 11 Anos atrás.

RE: LIferay Development - Portlets - Creating Service Layer

Junior Member Postagens: 29 Data de Entrada: 11/06/12 Postagens Recentes
okay, no more configuration will need after moving the directory?
Vichantri Geiantilal, modificado 11 Anos atrás.

RE: LIferay Development - Portlets - Creating Service Layer

Junior Member Postagens: 29 Data de Entrada: 11/06/12 Postagens Recentes
Hello,

well i think we are close to the solution, it worked to create some of the generated files, but still Build failed with the following error:

[Console output redirected to file:E:\Empresas\Cofimatica\Pentaho Liferay\Liferay Development\LiferayProject\.metadata\.plugins\com.liferay.ide.eclipse.sdk\sdk.log]
Buildfile: C:\Program Files\liferay-plugins-sdk-6.0.5\portlets\library-portlet\build.xml
build-service:
[java] Loading jar:file:/C:/liferay-portal-6.0.5/tomcat-6.0.26/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
[java] Loading jar:file:/C:/liferay-portal-6.0.5/tomcat-6.0.26/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties
[java] Loading file:/C:/liferay-portal-6.0.5/tomcat-6.0.26/webapps/ROOT/WEB-INF/classes/portal-ext.properties
[java] Loading jar:file:/C:/liferay-portal-6.0.5/tomcat-6.0.26/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/com/liferay/portal/tools/dependencies/portal-tools.properties
[java] 08:27:32,631 INFO [PortalImpl:277] Global lib directory /C:/liferay-portal-6.0.5/tomcat-6.0.26/lib/ext/
[java] 08:27:32,635 INFO [PortalImpl:297] Portal lib directory /C:/liferay-portal-6.0.5/tomcat-6.0.26/webapps/ROOT/WEB-INF/lib/
[java] Building LMSBook
[java] Writing docroot\WEB-INF\src\com\library\slayer\service\persistence\LMSBookPersistenceImpl.java
[java] Writing docroot\WEB-INF\service\com\library\slayer\service\persistence\LMSBookPersistence.java
[java] Writing docroot\WEB-INF\service\com\library\slayer\service\persistence\LMSBookUtil.java
[java] Writing docroot\WEB-INF\src\com\library\slayer\model\impl\LMSBookModelImpl.java
[java] Writing docroot\WEB-INF\src\com\library\slayer\model\impl\LMSBookImpl.java
[java] Writing docroot\WEB-INF\service\com\library\slayer\model\LMSBookModel.java
[java] Writing docroot\WEB-INF\service\com\library\slayer\model\LMSBook.java
[java] Writing docroot\WEB-INF\service\com\library\slayer\model\LMSBookClp.java
[java] Writing docroot\WEB-INF\service\com\library\slayer\model\LMSBookWrapper.java
[java] Writing docroot\WEB-INF\src\com\library\slayer\service\impl\LMSBookLocalServiceImpl.java
[java] Writing docroot\WEB-INF\src\com\library\slayer\service\base\LMSBookLocalServiceBaseImpl.java
[java] Writing docroot\WEB-INF\service\com\library\slayer\service\LMSBookLocalService.java
[java] Writing docroot\WEB-INF\service\com\library\slayer\service\LMSBookLocalServiceUtil.java
[java] Writing docroot\WEB-INF\service\com\library\slayer\service\LMSBookLocalServiceClp.java
[java] Writing docroot\WEB-INF\service\com\library\slayer\service\LMSBookLocalServiceWrapper.java
[java] Writing docroot\WEB-INF\service\com\library\slayer\service\messaging\ClpMessageListener.java
[java] Writing docroot\WEB-INF\service\com\library\slayer\service\ClpSerializer.java
[mkdir] Created dir: C:\Program Files\liferay-plugins-sdk-6.0.5\portlets\library-portlet\docroot\WEB-INF\service-classes
compile-java:
[javac] Compiling 13 source files to C:\Program Files\liferay-plugins-sdk-6.0.5\portlets\library-portlet\docroot\WEB-INF\service-classes

BUILD FAILED
C:\Program Files\liferay-plugins-sdk-6.0.5\build-common-plugin.xml:216: The following error occurred while executing this line:
C:\Program Files\liferay-plugins-sdk-6.0.5\build-common.xml:90: Error running javac.exe compiler

Total time: 11 seconds
thumbnail
Gregory Amerson, modificado 11 Anos atrás.

RE: LIferay Development - Portlets - Creating Service Layer

Liferay Legend Postagens: 1123 Data de Entrada: 16/02/10 Postagens Recentes
I believe this problem has been solved in another community post here. http://www.liferay.com/community/forums/-/message_boards/message/5115695

See if that solution works for you.
Vichantri Geiantilal, modificado 11 Anos atrás.

RE: LIferay Development - Portlets - Creating Service Layer

Junior Member Postagens: 29 Data de Entrada: 11/06/12 Postagens Recentes
Thank u so much Gregory the post u give me to see resolved the problem

Thank u for ur help emoticon
thumbnail
Gregory Amerson, modificado 11 Anos atrás.

RE: LIferay Development - Portlets - Creating Service Layer

Liferay Legend Postagens: 1123 Data de Entrada: 16/02/10 Postagens Recentes
Glad to hear it! Good luck with your Liferay based solution emoticon !
Vichantri Geiantilal, modificado 11 Anos atrás.

RE: LIferay Development - Portlets - Creating Service Layer

Junior Member Postagens: 29 Data de Entrada: 11/06/12 Postagens Recentes
Thank u i will continue the exercise i was doing based on service layer.

emoticonemoticon

Regards
thumbnail
Amit Doshi, modificado 11 Anos atrás.

RE: LIferay Development - Portlets - Creating Service Layer

Liferay Master Postagens: 550 Data de Entrada: 29/12/10 Postagens Recentes
I agree with Gregory. I tried to build the service with your XML and it is working fine.
And one more thing , you are getting IOException so seems to be path problem as mentioned by Gregory.