Service Builder para desarrollar un portlet con gestión de base de datos Parte 1/3

7 comentarios en “Service Builder para desarrollar un portlet con gestión de base de datos Parte 1/3”

  1. Muy buen artículo Jesús!

    Tengo una duda, si por ejemplo yo tengo mi BBDD con xampp (MySQL) donde o cómo defino para que mire esa bbdd con sus respectivas tabla/s.

    Gracias!

    Me gusta

    1. Muchas gracias por comentar.
      Service builder es un servicio que proporciona Liferay para construir portlet, es muy fácil de utilizar sí tienes instalado y configurado el plugin de eclipse “Liferay IDE”.
      Por tanto utilizará la misma base de datos que utilizas para Liferay.

      Espero que te sea de ayuda, si necesitas algo más pregunta 🙂

      Me gusta

  2. Buen articulo Jesus
    Soy nuevo haciendo esto y he creado un portlet 6.1 en en eclipse y al momento de ejecutar el Build Services me sale el siguiente error:

    [Console output redirected to file:D:\LiferayCE-6.1\SISDGT\workspace\.metadata\.plugins\com.liferay.ide.eclipse.sdk\sdk.log]
    Buildfile: D:\LiferayCE-6.1\SISDGT\liferay-plugins-sdk-6.1.0\portlets\brown-tasks-portlet\build.xml
    build-service:
    [java] java.lang.NoSuchMethodError: com.liferay.util.log4j.Log4JUtil.configureLog4J(Ljava/lang/ClassLoader;)V
    [java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:194)
    [java] at org.apache.tools.ant.taskdefs.Java.run(Java.java:771)
    [java] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:221)
    [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(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: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.lang.NoSuchMethodError: com.liferay.util.log4j.Log4JUtil.configureLog4J(Ljava/lang/ClassLoader;)V
    [java] at com.liferay.portal.util.InitUtil.init(InitUtil.java:94)
    [java] at com.liferay.portal.util.InitUtil.initWithSpring(InitUtil.java:159)
    [java] at com.liferay.portal.tools.servicebuilder.ServiceBuilder.main(ServiceBuilder.java:117)
    [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.ExecuteJava.run(ExecuteJava.java:217)
    [java] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:152)
    [java] … 19 more
    [java] Java Result: -1
    [echo] ${service.test.output}
    [mkdir] Created dir: D:\LiferayCE-6.1\SISDGT\liferay-plugins-sdk-6.1.0\portlets\brown-tasks-portlet\docroot\WEB-INF\service-classes

    soy nuevo asi que no se que le falta te agradeceria si me pudieras dar una mano con esto

    Me gusta

  3. He bajado el proyecto del git hub pero en los paquetes me salen errores
    como este :
    dentro de AddItemController.java

    The import com.jesuslc.demos.browntasks.model.TaskItem cannot be resolved.
    The import com.jesuslc.demos.browntasks.service.TaskItemLocalService cannot be resolved.
    The import com.jesuslc.demos.browntasks.service.TaskItemLocalServiceUtil cannot be resolved.

    estoy usando LIFERAY 6.1

    creo que soy yo el que esta haciendo algo mal, no se que le falta.

    Buildfile: D:\LiferayCE-6.1\SISDGT\liferay-plugins-sdk-6.1.0\portlets\brown-tasks-portlet\build.xml
    compile:
    merge:
    [copy] Copying 5 files to D:\LiferayCE-6.1\SISDGT\liferay-plugins-sdk-6.1.0\portlets\brown-tasks-portlet\docroot\WEB-INF\lib
    compile-java:
    merge:
    war:
    build-css:
    [java] D:\LiferayCE-6.1\SISDGT\liferay-plugins-sdk-6.1.0\portlets\build-common-portlet.xml:15: java.io.IOException: Cannot run program “D:\LiferayCE-6.1\Bundles\liferay-portal-6.1.0-ce-ga1\tomcat-7.0.23\jre1.6.0_20\win\bin\java.exe”: CreateProcess error=87, El parámetro no es correcto
    [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.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
    [java] at org.eclipse.ant.internal.launching.remote.EclipseSingleCheckExecutor.executeTargets(EclipseSingleCheckExecutor.java:30)
    [java] at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
    [java] at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
    [java] at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
    [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 “D:\LiferayCE-6.1\Bundles\liferay-portal-6.1.0-ce-ga1\tomcat-7.0.23\jre1.6.0_20\win\bin\java.exe”: CreateProcess error=87, El parámetro no es correcto
    [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] … 32 more
    [java] Caused by: java.io.IOException: CreateProcess error=87, El parámetro no es correcto
    [java] at java.lang.ProcessImpl.create(Native Method)
    [java] at java.lang.ProcessImpl.(ProcessImpl.java:81)
    [java] at java.lang.ProcessImpl.start(ProcessImpl.java:30)
    [java] at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)
    [java] … 37 more
    [java] Java Result: -1
    compile:
    merge:
    compile-java:
    merge:
    build-common-plugin.war:
    [delete] Deleting: D:\LiferayCE-6.1\SISDGT\liferay-plugins-sdk-6.1.0\dist\brown-tasks-portlet-6.1.0.1.war
    clean-portal-dependencies:
    [zip] Building zip: D:\LiferayCE-6.1\SISDGT\liferay-plugins-sdk-6.1.0\dist\brown-tasks-portlet-6.1.0.1.war
    deploy:
    [copy] Copying 1 file to D:\LiferayCE-6.1\Bundles\liferay-portal-6.1.0-ce-ga1\deploy
    BUILD SUCCESSFUL
    Total time: 1 second

    esta es la estructura de donde esta ubicado el portlet
    -NET(D)
    -LiferayCE-6.1
    -SISDGT
    -liferay-plugins-sdk-6.1.0
    -portlets
    -brown-tasks-portlet
    el portlet no esta dentro del workspace sino lo he creado dentro del sdk/portlets
    gracias de antemano por el apoyo.

    Me gusta

Comenta la entrada

Introduce tus datos o haz clic en un icono para iniciar sesión:

Logo de WordPress.com

Estás comentando usando tu cuenta de WordPress.com. Cerrar sesión /  Cambiar )

Google photo

Estás comentando usando tu cuenta de Google. Cerrar sesión /  Cambiar )

Imagen de Twitter

Estás comentando usando tu cuenta de Twitter. Cerrar sesión /  Cambiar )

Foto de Facebook

Estás comentando usando tu cuenta de Facebook. Cerrar sesión /  Cambiar )

Conectando a %s

Este sitio usa Akismet para reducir el spam. Aprende cómo se procesan los datos de tus comentarios .