Foros de discusión
Service Builder (problem: PORTLET DISAPPEARS)
portal-rb.ru i, modificado hace 12 años.
Service Builder (problem: PORTLET DISAPPEARS)
Regular Member Mensajes: 158 Fecha de incorporación: 12/12/11 Mensajes recientes
Liferay: 6.1 b4
1. Run Tomcat.
2. Create MVC portlet with superclass javax.portlet.GenericPortlet .
3. Add the portlet to the server, which appears in the dropdownlist.
4. Create a service over the portlet.
5. Edit the file service.xml (change <!DOCTYPE service-builder PUBLIC "-//Liferay//DTD Service Builder 6.0.0//EN" "http://www.liferay.com/dtd/liferay-service-builder_6_0_0.dtd">
to <!DOCTYPE service-builder PUBLIC "-//Liferay//DTD Service Builder 6.1.0//EN" "http://www.liferay.com/dtd/liferay-service-builder_6_1_0.dtd">).
6. Press "Build" button (either from Eclipse or from command line (cmd) "ant service-build").
7. A table should be created in a database.
8. The portlet disappers from the LifeRay list. Redeploy does not help, there are a lot of errors.
Could you help me to solve this problem, please?
1. Run Tomcat.
2. Create MVC portlet with superclass javax.portlet.GenericPortlet .
3. Add the portlet to the server, which appears in the dropdownlist.
4. Create a service over the portlet.
5. Edit the file service.xml (change <!DOCTYPE service-builder PUBLIC "-//Liferay//DTD Service Builder 6.0.0//EN" "http://www.liferay.com/dtd/liferay-service-builder_6_0_0.dtd">
to <!DOCTYPE service-builder PUBLIC "-//Liferay//DTD Service Builder 6.1.0//EN" "http://www.liferay.com/dtd/liferay-service-builder_6_1_0.dtd">).
6. Press "Build" button (either from Eclipse or from command line (cmd) "ant service-build").
7. A table should be created in a database.
8. The portlet disappers from the LifeRay list. Redeploy does not help, there are a lot of errors.
Could you help me to solve this problem, please?
09:47:08,457 INFO [PortletExplodedTomcatListener:60] Modifying portlets for E:\b4\work\bundles\deploy\Editbase-portlet.xml
09:47:08,533 ERROR [AutoDeployDir:197] com.liferay.portal.kernel.deploy.auto.AutoDeployException: java.lang.NullPointerException
com.liferay.portal.kernel.deploy.auto.AutoDeployException: java.lang.NullPointerException
at com.liferay.portal.deploy.auto.exploded.tomcat.PortletExplodedTomcatDeployer.explodedTomcatDeploy(PortletExplodedTomcatDeployer.java:39)
at com.liferay.portal.deploy.auto.exploded.tomcat.PortletExplodedTomcatListener.deploy(PortletExplodedTomcatListener.java:63)
at com.liferay.portal.deploy.auto.exploded.tomcat.BaseExplodedTomcatListener.deploy(BaseExplodedTomcatListener.java:61)
at com.liferay.portal.kernel.deploy.auto.AutoDeployDir.processFile(AutoDeployDir.java:180)
at com.liferay.portal.kernel.deploy.auto.AutoDeployDir.scanDirectory(AutoDeployDir.java:222)
at com.liferay.portal.kernel.deploy.auto.AutoDeployScanner.run(AutoDeployScanner.java:50)
Caused by: java.lang.NullPointerException
at com.liferay.portal.tools.deploy.BaseDeployer.copyProperties(BaseDeployer.java:383)
at com.liferay.portal.tools.deploy.BaseDeployer.deployDirectory(BaseDeployer.java:512)
at com.liferay.portal.tools.deploy.BaseDeployer.deployDirectory(BaseDeployer.java:696)
at com.liferay.portal.deploy.auto.exploded.tomcat.PortletExplodedTomcatDeployer.explodedTomcatDeploy(PortletExplodedTomcatDeployer.java:35)
... 5 more
09:47:09,035 INFO [AutoDeployDir:172] Processing Editbase-portlet.xml. This is attempt 2.
09:47:09,039 INFO [PortletExplodedTomcatListener:60] Modifying portlets for E:\b4\work\bundles\deploy\Editbase-portlet.xml
09:47:09,116 ERROR [AutoDeployDir:197] com.liferay.portal.kernel.deploy.auto.AutoDeployException: java.lang.NullPointerException
com.liferay.portal.kernel.deploy.auto.AutoDeployException: java.lang.NullPointerException
at com.liferay.portal.deploy.auto.exploded.tomcat.PortletExplodedTomcatDeployer.explodedTomcatDeploy(PortletExplodedTomcatDeployer.java:39)
at com.liferay.portal.deploy.auto.exploded.tomcat.PortletExplodedTomcatListener.deploy(PortletExplodedTomcatListener.java:63)
at com.liferay.portal.deploy.auto.exploded.tomcat.BaseExplodedTomcatListener.deploy(BaseExplodedTomcatListener.java:61)
at com.liferay.portal.kernel.deploy.auto.AutoDeployDir.processFile(AutoDeployDir.java:180)
at com.liferay.portal.kernel.deploy.auto.AutoDeployDir.scanDirectory(AutoDeployDir.java:222)
at com.liferay.portal.kernel.deploy.auto.AutoDeployScanner.run(AutoDeployScanner.java:50)
Caused by: java.lang.NullPointerException
at com.liferay.portal.tools.deploy.BaseDeployer.copyProperties(BaseDeployer.java:383)
at com.liferay.portal.tools.deploy.BaseDeployer.deployDirectory(BaseDeployer.java:512)
at com.liferay.portal.tools.deploy.BaseDeployer.deployDirectory(BaseDeployer.java:696)
at com.liferay.portal.deploy.auto.exploded.tomcat.PortletExplodedTomcatDeployer.explodedTomcatDeploy(PortletExplodedTomcatDeployer.java:35)
... 5 more
09:47:09,617 INFO [AutoDeployDir:172] Processing Editbase-portlet.xml. This is attempt 3.
09:47:09,621 INFO [PortletExplodedTomcatListener:60] Modifying portlets for E:\b4\work\bundles\deploy\Editbase-portlet.xml
09:47:09,687 ERROR [AutoDeployDir:197] com.liferay.portal.kernel.deploy.auto.AutoDeployException: java.lang.NullPointerException
com.liferay.portal.kernel.deploy.auto.AutoDeployException: java.lang.NullPointerException
at com.liferay.portal.deploy.auto.exploded.tomcat.PortletExplodedTomcatDeployer.explodedTomcatDeploy(PortletExplodedTomcatDeployer.java:39)
at com.liferay.portal.deploy.auto.exploded.tomcat.PortletExplodedTomcatListener.deploy(PortletExplodedTomcatListener.java:63)
at com.liferay.portal.deploy.auto.exploded.tomcat.BaseExplodedTomcatListener.deploy(BaseExplodedTomcatListener.java:61)
at com.liferay.portal.kernel.deploy.auto.AutoDeployDir.processFile(AutoDeployDir.java:180)
at com.liferay.portal.kernel.deploy.auto.AutoDeployDir.scanDirectory(AutoDeployDir.java:222)
at com.liferay.portal.kernel.deploy.auto.AutoDeployScanner.run(AutoDeployScanner.java:50)
Caused by: java.lang.NullPointerException
at com.liferay.portal.tools.deploy.BaseDeployer.copyProperties(BaseDeployer.java:383)
at com.liferay.portal.tools.deploy.BaseDeployer.deployDirectory(BaseDeployer.java:512)
at com.liferay.portal.tools.deploy.BaseDeployer.deployDirectory(BaseDeployer.java:696)
at com.liferay.portal.deploy.auto.exploded.tomcat.PortletExplodedTomcatDeployer.explodedTomcatDeploy(PortletExplodedTomcatDeployer.java:35)
... 5 more
09:47:10,188 INFO [AutoDeployDir:172] Processing Editbase-portlet.xml. This is attempt 4.
09:47:10,198 INFO [PortletExplodedTomcatListener:60] Modifying portlets for E:\b4\work\bundles\deploy\Editbase-portlet.xml
09:47:10,290 ERROR [AutoDeployDir:197] com.liferay.portal.kernel.deploy.auto.AutoDeployException: java.lang.NullPointerException
com.liferay.portal.kernel.deploy.auto.AutoDeployException: java.lang.NullPointerException
at com.liferay.portal.deploy.auto.exploded.tomcat.PortletExplodedTomcatDeployer.explodedTomcatDeploy(PortletExplodedTomcatDeployer.java:39)
at com.liferay.portal.deploy.auto.exploded.tomcat.PortletExplodedTomcatListener.deploy(PortletExplodedTomcatListener.java:63)
at com.liferay.portal.deploy.auto.exploded.tomcat.BaseExplodedTomcatListener.deploy(BaseExplodedTomcatListener.java:61)
at com.liferay.portal.kernel.deploy.auto.AutoDeployDir.processFile(AutoDeployDir.java:180)
at com.liferay.portal.kernel.deploy.auto.AutoDeployDir.scanDirectory(AutoDeployDir.java:222)
at com.liferay.portal.kernel.deploy.auto.AutoDeployScanner.run(AutoDeployScanner.java:50)
Caused by: java.lang.NullPointerException
at com.liferay.portal.tools.deploy.BaseDeployer.copyProperties(BaseDeployer.java:383)
at com.liferay.portal.tools.deploy.BaseDeployer.deployDirectory(BaseDeployer.java:512)
at com.liferay.portal.tools.deploy.BaseDeployer.deployDirectory(BaseDeployer.java:696)
at com.liferay.portal.deploy.auto.exploded.tomcat.PortletExplodedTomcatDeployer.explodedTomcatDeploy(PortletExplodedTomcatDeployer.java:35)
... 5 more
09:47:10,791 INFO [AutoDeployDir:172] Processing Editbase-portlet.xml. This is attempt 5.
09:47:10,801 INFO [PortletExplodedTomcatListener:60] Modifying portlets for E:\b4\work\bundles\deploy\Editbase-portlet.xml
09:47:10,890 ERROR [AutoDeployDir:197] com.liferay.portal.kernel.deploy.auto.AutoDeployException: java.lang.NullPointerException
com.liferay.portal.kernel.deploy.auto.AutoDeployException: java.lang.NullPointerException
at com.liferay.portal.deploy.auto.exploded.tomcat.PortletExplodedTomcatDeployer.explodedTomcatDeploy(PortletExplodedTomcatDeployer.java:39)
at com.liferay.portal.deploy.auto.exploded.tomcat.PortletExplodedTomcatListener.deploy(PortletExplodedTomcatListener.java:63)
at com.liferay.portal.deploy.auto.exploded.tomcat.BaseExplodedTomcatListener.deploy(BaseExplodedTomcatListener.java:61)
at com.liferay.portal.kernel.deploy.auto.AutoDeployDir.processFile(AutoDeployDir.java:180)
at com.liferay.portal.kernel.deploy.auto.AutoDeployDir.scanDirectory(AutoDeployDir.java:222)
at com.liferay.portal.kernel.deploy.auto.AutoDeployScanner.run(AutoDeployScanner.java:50)
Caused by: java.lang.NullPointerException
at com.liferay.portal.tools.deploy.BaseDeployer.copyProperties(BaseDeployer.java:383)
at com.liferay.portal.tools.deploy.BaseDeployer.deployDirectory(BaseDeployer.java:512)
at com.liferay.portal.tools.deploy.BaseDeployer.deployDirectory(BaseDeployer.java:696)
at com.liferay.portal.deploy.auto.exploded.tomcat.PortletExplodedTomcatDeployer.explodedTomcatDeploy(PortletExplodedTomcatDeployer.java:35)
... 5 more
09:47:11,391 INFO [AutoDeployDir:172] Processing Editbase-portlet.xml. This is attempt 6.
09:47:11,401 INFO [PortletExplodedTomcatListener:60] Modifying portlets for E:\b4\work\bundles\deploy\Editbase-portlet.xml
09:47:11,491 ERROR [AutoDeployDir:197] com.liferay.portal.kernel.deploy.auto.AutoDeployException: java.lang.NullPointerException
com.liferay.portal.kernel.deploy.auto.AutoDeployException: java.lang.NullPointerException
at com.liferay.portal.deploy.auto.exploded.tomcat.PortletExplodedTomcatDeployer.explodedTomcatDeploy(PortletExplodedTomcatDeployer.java:39)
at com.liferay.portal.deploy.auto.exploded.tomcat.PortletExplodedTomcatListener.deploy(PortletExplodedTomcatListener.java:63)
at com.liferay.portal.deploy.auto.exploded.tomcat.BaseExplodedTomcatListener.deploy(BaseExplodedTomcatListener.java:61)
at com.liferay.portal.kernel.deploy.auto.AutoDeployDir.processFile(AutoDeployDir.java:180)
at com.liferay.portal.kernel.deploy.auto.AutoDeployDir.scanDirectory(AutoDeployDir.java:222)
at com.liferay.portal.kernel.deploy.auto.AutoDeployScanner.run(AutoDeployScanner.java:50)
Caused by: java.lang.NullPointerException
at com.liferay.portal.tools.deploy.BaseDeployer.copyProperties(BaseDeployer.java:383)
at com.liferay.portal.tools.deploy.BaseDeployer.deployDirectory(BaseDeployer.java:512)
at com.liferay.portal.tools.deploy.BaseDeployer.deployDirectory(BaseDeployer.java:696)
at com.liferay.portal.deploy.auto.exploded.tomcat.PortletExplodedTomcatDeployer.explodedTomcatDeploy(PortletExplodedTomcatDeployer.java:35)
... 5 more
09:47:11,991 INFO [AutoDeployDir:172] Processing Editbase-portlet.xml. This is attempt 7.
09:47:12,001 INFO [PortletExplodedTomcatListener:60] Modifying portlets for E:\b4\work\bundles\deploy\Editbase-portlet.xml
09:47:12,150 ERROR [AutoDeployDir:197] com.liferay.portal.kernel.deploy.auto.AutoDeployException: java.lang.NullPointerException
com.liferay.portal.kernel.deploy.auto.AutoDeployException: java.lang.NullPointerException
at com.liferay.portal.deploy.auto.exploded.tomcat.PortletExplodedTomcatDeployer.explodedTomcatDeploy(PortletExplodedTomcatDeployer.java:39)
at com.liferay.portal.deploy.auto.exploded.tomcat.PortletExplodedTomcatListener.deploy(PortletExplodedTomcatListener.java:63)
at com.liferay.portal.deploy.auto.exploded.tomcat.BaseExplodedTomcatListener.deploy(BaseExplodedTomcatListener.java:61)
at com.liferay.portal.kernel.deploy.auto.AutoDeployDir.processFile(AutoDeployDir.java:180)
at com.liferay.portal.kernel.deploy.auto.AutoDeployDir.scanDirectory(AutoDeployDir.java:222)
at com.liferay.portal.kernel.deploy.auto.AutoDeployScanner.run(AutoDeployScanner.java:50)
Caused by: java.lang.NullPointerException
at com.liferay.portal.tools.deploy.BaseDeployer.copyProperties(BaseDeployer.java:383)
at com.liferay.portal.tools.deploy.BaseDeployer.deployDirectory(BaseDeployer.java:512)
at com.liferay.portal.tools.deploy.BaseDeployer.deployDirectory(BaseDeployer.java:696)
at com.liferay.portal.deploy.auto.exploded.tomcat.PortletExplodedTomcatDeployer.explodedTomcatDeploy(PortletExplodedTomcatDeployer.java:35)
... 5 more
09:47:12,650 INFO [AutoDeployDir:172] Processing Editbase-portlet.xml. This is attempt 8.
09:47:12,660 INFO [PortletExplodedTomcatListener:60] Modifying portlets for E:\b4\work\bundles\deploy\Editbase-portlet.xml
09:47:12,728 ERROR [AutoDeployDir:197] com.liferay.portal.kernel.deploy.auto.AutoDeployException: java.lang.NullPointerException
com.liferay.portal.kernel.deploy.auto.AutoDeployException: java.lang.NullPointerException
at com.liferay.portal.deploy.auto.exploded.tomcat.PortletExplodedTomcatDeployer.explodedTomcatDeploy(PortletExplodedTomcatDeployer.java:39)
at com.liferay.portal.deploy.auto.exploded.tomcat.PortletExplodedTomcatListener.deploy(PortletExplodedTomcatListener.java:63)
at com.liferay.portal.deploy.auto.exploded.tomcat.BaseExplodedTomcatListener.deploy(BaseExplodedTomcatListener.java:61)
at com.liferay.portal.kernel.deploy.auto.AutoDeployDir.processFile(AutoDeployDir.java:180)
at com.liferay.portal.kernel.deploy.auto.AutoDeployDir.scanDirectory(AutoDeployDir.java:222)
at com.liferay.portal.kernel.deploy.auto.AutoDeployScanner.run(AutoDeployScanner.java:50)
Caused by: java.lang.NullPointerException
at com.liferay.portal.tools.deploy.BaseDeployer.copyProperties(BaseDeployer.java:383)
at com.liferay.portal.tools.deploy.BaseDeployer.deployDirectory(BaseDeployer.java:512)
at com.liferay.portal.tools.deploy.BaseDeployer.deployDirectory(BaseDeployer.java:696)
at com.liferay.portal.deploy.auto.exploded.tomcat.PortletExplodedTomcatDeployer.explodedTomcatDeploy(PortletExplodedTomcatDeployer.java:35)
... 5 more
09:47:13,228 INFO [AutoDeployDir:172] Processing Editbase-portlet.xml. This is attempt 9.
09:47:13,238 INFO [PortletExplodedTomcatListener:60] Modifying portlets for E:\b4\work\bundles\deploy\Editbase-portlet.xml
09:47:13,322 ERROR [AutoDeployDir:197] com.liferay.portal.kernel.deploy.auto.AutoDeployException: java.lang.NullPointerException
com.liferay.portal.kernel.deploy.auto.AutoDeployException: java.lang.NullPointerException
at com.liferay.portal.deploy.auto.exploded.tomcat.PortletExplodedTomcatDeployer.explodedTomcatDeploy(PortletExplodedTomcatDeployer.java:39)
at com.liferay.portal.deploy.auto.exploded.tomcat.PortletExplodedTomcatListener.deploy(PortletExplodedTomcatListener.java:63)
at com.liferay.portal.deploy.auto.exploded.tomcat.BaseExplodedTomcatListener.deploy(BaseExplodedTomcatListener.java:61)
at com.liferay.portal.kernel.deploy.auto.AutoDeployDir.processFile(AutoDeployDir.java:180)
at com.liferay.portal.kernel.deploy.auto.AutoDeployDir.scanDirectory(AutoDeployDir.java:222)
at com.liferay.portal.kernel.deploy.auto.AutoDeployScanner.run(AutoDeployScanner.java:50)
Caused by: java.lang.NullPointerException
at com.liferay.portal.tools.deploy.BaseDeployer.copyProperties(BaseDeployer.java:383)
at com.liferay.portal.tools.deploy.BaseDeployer.deployDirectory(BaseDeployer.java:512)
at com.liferay.portal.tools.deploy.BaseDeployer.deployDirectory(BaseDeployer.java:696)
at com.liferay.portal.deploy.auto.exploded.tomcat.PortletExplodedTomcatDeployer.explodedTomcatDeploy(PortletExplodedTomcatDeployer.java:35)
... 5 more
09:47:13,322 INFO [AutoDeployDir:203] Add Editbase-portlet.xml to the blacklist
Raja Nagendra Kumar, modificado hace 12 años.
RE: Service Builder (problem: PORTLET DISAPPEARS)
Expert Mensajes: 484 Fecha de incorporación: 2/03/06 Mensajes recientes
Check your portlets init() method.. keep it empty and try... (no exception should be thrown during deploy or while adding this portlet to a new page)
Some thing is wrong in your init() method.
Regards,
Raja Nagendra Kumar,
C.T.O
www.tejasoft.com
Some thing is wrong in your init() method.
Regards,
Raja Nagendra Kumar,
C.T.O
www.tejasoft.com
Nagendra Kumar Busam, modificado hace 12 años.
RE: Service Builder (problem: PORTLET DISAPPEARS)
Liferay Master Mensajes: 678 Fecha de incorporación: 7/07/09 Mensajes recientes
Can you try to build the services from command prompt & deploy. If you can please add your source code
ildar i, modificado hace 12 años.
RE: Service Builder (problem: PORTLET DISAPPEARS)
Regular Member Mensajes: 158 Fecha de incorporación: 12/12/11 Mensajes recientes
E:\b4\work\sdk\portlets>create newportlet "My New Portlet"
Buildfile: E:\b4\work\sdk\portlets\build.xml
create:
[copy] Copying 9 files to E:\b4\work\sdk\portlets\newportlet-portlet
[mkdir] Created dir: E:\b4\work\sdk\portlets\newportlet-portlet\docroot\WEB-INF\tld
[copy] Copying 9 files to E:\b4\work\sdk\portlets\newportlet-portlet\docroot\WEB-INF\tld
BUILD SUCCESSFUL
Total time: 0 seconds
E:\b4\work\sdk\portlets>cd newportlet-portlet
E:\b4\work\sdk\portlets\newportlet-portlet>create (build-service ??)
As a service?
Nagendra Kumar Busam, modificado hace 12 años.
RE: Service Builder (problem: PORTLET DISAPPEARS)
Liferay Master Mensajes: 678 Fecha de incorporación: 7/07/09 Mensajes recientes
Initial Service generation part you can do it from Liferay IDE. Once you generate sample service.xml using Liferay IDE. Try to build that service from command prompt
Try below commands from command prompt
> ant build-service
> ant clean deploy
Try below commands from command prompt
> ant build-service
> ant clean deploy
ildar i, modificado hace 12 años.
RE: Service Builder (problem: PORTLET DISAPPEARS)
Regular Member Mensajes: 158 Fecha de incorporación: 12/12/11 Mensajes recientes
E:\b41\sdk\portlets>create Newsp "qwertt"
Buildfile: E:\b41\sdk\portlets\build.xml
create:
[copy] Copying 9 files to E:\b41\sdk\portlets\Newsp-portlet
[mkdir] Created dir: E:\b41\sdk\portlets\Newsp-portlet\docroot\WEB-INF\tld
[copy] Copying 9 files to E:\b41\sdk\portlets\Newsp-portlet\docroot\WEB-INF\tld
BUILD SUCCESSFUL
Total time: 0 seconds
E:\b41\sdk\portlets>cd Newsp-portlet
E:\b41\sdk\portlets\Newsp-portlet>ant build-service
Buildfile: E:\b41\sdk\portlets\Newsp-portlet\build.xml
build-service:
[mkdir] Created dir: E:\b41\sdk\portlets\Newsp-portlet\docroot\WEB-INF\classes
[mkdir] Created dir: E:\b41\sdk\portlets\Newsp-portlet\docroot\WEB-INF\lib
[mkdir] Created dir: E:\b41\sdk\portlets\Newsp-portlet\docroot\WEB-INF\service
[mkdir] Created dir: E:\b41\sdk\portlets\Newsp-portlet\docroot\WEB-INF\sql
[mkdir] Created dir: E:\b41\sdk\portlets\Newsp-portlet\docroot\WEB-INF\src
[echo] Loading jar:file:/E:/b41/liferay-portal-6.1.0-ce-b4/tomcat-7.0.22/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
[echo] 13.12.2011 13:06:00 com.liferay.portal.kernel.log.Jdk14LogImpl info
[echo] INFO: Global lib directory /E:/b41/liferay-portal-6.1.0-ce-b4/tomcat-7.0.22/lib/ext/
[echo] 13.12.2011 13:06:00 com.liferay.portal.kernel.log.Jdk14LogImpl info
[echo] INFO: Portal lib directory /E:/b41/liferay-portal-6.1.0-ce-b4/tomcat-7.0.22/webapps/ROOT/WEB-INF/lib/
[echo] 13:06:00,123 INFO [EasyConf:122] Refreshed the configuration of all components
[echo] 13:06:00,516 INFO [ConfigurationLoader:56] Properties for jar:file:/E:/b41/liferay-portal-6.1.0-ce-b4/tomcat-7.0.22/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal loaded from [jar:file:/E:/b41/liferay-portal-6.1.0-ce-b4/tomcat-7.0.22/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/com/lifer
ay/portal/tools/dependencies/portal-tools.properties, file:/E:/b41/liferay-portal-6.1.0-ce-b4/tomcat-7.0.22/webapps/ROOT/WEB-INF/classes/portal-ext.properties, jar:file:/E:/b41/liferay-portal-6.1.0-ce-b4/tomcat-7.0.22/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties]
[echo] Loading jar:file:/E:/b41/liferay-portal-6.1.0-ce-b4/tomcat-7.0.22/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties
[echo] Loading file:/E:/b41/liferay-portal-6.1.0-ce-b4/tomcat-7.0.22/webapps/ROOT/WEB-INF/classes/portal-ext.properties
[echo] Loading jar:file:/E:/b41/liferay-portal-6.1.0-ce-b4/tomcat-7.0.22/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/com/liferay/portal/tools/dependencies/portal-tools.properties
[echo] java.lang.NullPointerException
[echo] at com.liferay.portal.kernel.io.unsync.UnsyncStringReader.<init>(UnsyncStringReader.java:33)
[echo] at com.liferay.util.xml.XMLSafeReader.<init>(XMLSafeReader.java:25)
[echo] at com.liferay.portal.xml.SAXReaderImpl.read(SAXReaderImpl.java:423)
[echo] at com.liferay.portal.kernel.xml.SAXReaderUtil.read(SAXReaderUtil.java:139)
[echo] at com.liferay.portal.tools.servicebuilder.ServiceBuilder._getContentDocument(ServiceBuilder.java:3833)
[echo] at com.liferay.portal.tools.servicebuilder.ServiceBuilder._getContent(ServiceBuilder.java:3756)
[echo] at com.liferay.portal.tools.servicebuilder.ServiceBuilder.<init>(ServiceBuilder.java:544)
[echo] at com.liferay.portal.tools.servicebuilder.ServiceBuilder.<init>(ServiceBuilder.java:430)
[echo] at com.liferay.portal.tools.servicebuilder.ServiceBuilder.main(ServiceBuilder.java:146)
[echo] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[echo] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[echo] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[echo] at java.lang.reflect.Method.invoke(Method.java:597)
[echo] at org.apache.tools.ant.taskdefs.ExecuteJava.run(ExecuteJava.java:217)
[echo] at org.apache.tools.ant.taskdefs.ExecuteJava.execute(ExecuteJava.java:152)
[echo] at org.apache.tools.ant.taskdefs.Java.run(Java.java:771)
[echo] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:221)
[echo] at org.apache.tools.ant.taskdefs.Java.executeJava(Java.java:135)
[echo] at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)
[echo] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
[echo] at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)
[echo] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[echo] at java.lang.reflect.Method.invoke(Method.java:597)
[echo] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
[echo] at org.apache.tools.ant.Task.perform(Task.java:348)
[echo] at org.apache.tools.ant.Target.execute(Target.java:390)
[echo] at org.apache.tools.ant.Target.performTasks(Target.java:411)
[echo] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
[echo] at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
[echo] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
[echo] at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
[echo] at org.apache.tools.ant.Main.runBuild(Main.java:809)
[echo] at org.apache.tools.ant.Main.startAnt(Main.java:217)
[echo] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
[echo] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
[mkdir] Created dir: E:\b41\sdk\portlets\Newsp-portlet\docroot\WEB-INF\service-classes
compile-java:
[zip] Warning: skipping zip archive E:\b41\sdk\portlets\Newsp-portlet\docroot\WEB-INF\lib\Newsp-portlet-service.jar because no files were included.
[delete] Deleting directory E:\b41\sdk\portlets\Newsp-portlet\docroot\WEB-INF\service-classes
BUILD SUCCESSFUL
Total time: 5 seconds
E:\b41\sdk\portlets\Newsp-portlet>ant clean deploy
Buildfile: E:\b41\sdk\portlets\Newsp-portlet\build.xml
clean:
[delete] Deleting directory E:\b41\sdk\portlets\Newsp-portlet\docroot\WEB-INF\classes
clean-portal-dependencies:
compile:
merge:
[mkdir] Created dir: E:\b41\sdk\portlets\Newsp-portlet\docroot\WEB-INF\classes
[copy] Copying 5 files to E:\b41\sdk\portlets\Newsp-portlet\docroot\WEB-INF\lib
compile-java:
merge:
war:
[mkdir] Created dir: E:\b41\sdk\dist
clean-portal-dependencies:
[zip] Building zip: E:\b41\sdk\dist\Newsp-portlet-6.1.0.1.war
deploy:
[copy] Copying 1 file to E:\b41\liferay-portal-6.1.0-ce-b4\deploy
BUILD SUCCESSFUL
Total time: 1 second
E:\b41\sdk\portlets\Newsp-portlet>
</init></init></init></init>
Nagendra Kumar Busam, modificado hace 12 años.
RE: Service Builder (problem: PORTLET DISAPPEARS)
Liferay Master Mensajes: 678 Fecha de incorporación: 7/07/09 Mensajes recientes
Did you try to deploy it properly, as it seems you are getting error while creating the portlet itself.
Juan Gonzalez P, modificado hace 12 años.
RE: Service Builder (problem: PORTLET DISAPPEARS)
Liferay Legend Mensajes: 3089 Fecha de incorporación: 28/10/08 Mensajes recientesNagendra Kumar Busam:
Did you try to deploy it properly, as it seems you are getting error while creating the portlet itself.
I have the same error as the first post of the thread.
I only used Liferay IDE to create service and deploy.
Does that works for you in latest 6.1 sources?
ildar i, modificado hace 12 años.
RE: Service Builder (problem: PORTLET DISAPPEARS)
Regular Member Mensajes: 158 Fecha de incorporación: 12/12/11 Mensajes recientes
It appears that an error is initially in the software.
I do not know how to create the "Service Build" via the command line.
E:\b41\sdk\portlets>create Newsp "qwertt"
E:\b41\sdk\portlets>cd Newsp-portlet
E:\b41\sdk\portlets\Newsp-portlet>ant build-service
(errors)
E:\b41\sdk\portlets\Newsp-portlet>ant clean deploy
E:\b41\sdk\portlets\Newsp-portlet>
When shell I create "service.xml" file ?
Regarding my first post, is it possible to find out the problem by analysing logs?
09:47:08,457 INFO [PortletExplodedTomcatListener:60] Modifying portlets for E:\b4\work\bundles\deploy\Editbase-portlet.xml
09:47:08,533 ERROR [AutoDeployDir:197] com.liferay.portal.kernel.deploy.auto.AutoDeployException: java.lang.NullPointerException
com.liferay.portal.kernel.deploy.auto.AutoDeployException: java.lang.NullPointerException
I do not know how to create the "Service Build" via the command line.
E:\b41\sdk\portlets>create Newsp "qwertt"
E:\b41\sdk\portlets>cd Newsp-portlet
E:\b41\sdk\portlets\Newsp-portlet>ant build-service
(errors)
E:\b41\sdk\portlets\Newsp-portlet>ant clean deploy
E:\b41\sdk\portlets\Newsp-portlet>
When shell I create "service.xml" file ?
Regarding my first post, is it possible to find out the problem by analysing logs?
09:47:08,457 INFO [PortletExplodedTomcatListener:60] Modifying portlets for E:\b4\work\bundles\deploy\Editbase-portlet.xml
09:47:08,533 ERROR [AutoDeployDir:197] com.liferay.portal.kernel.deploy.auto.AutoDeployException: java.lang.NullPointerException
com.liferay.portal.kernel.deploy.auto.AutoDeployException: java.lang.NullPointerException
Akris K, modificado hace 12 años.
RE: Service Builder (problem: PORTLET DISAPPEARS)
New Member Mensajes: 9 Fecha de incorporación: 14/04/11 Mensajes recientes
Hi ildar,
When I am trying to execute ant build-service using command prompt, in my Liferay 6.1 b4 , me to getting exactly the same error.
Have you managed to find any resolution to this issue ?
Error excerpt
[java] Loading jar:file:/D:/liferay/liferay-portal-tomcat-6.1/tomcat-7.0.22/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties
[java] Loading file:/D:/liferay/liferay-portal-tomcat-6.1/tomcat-7.0.22/webapps/ROOT/WEB-INF/classes/portal-ext.properties
[java] Loading jar:file:/D:/liferay/liferay-portal-tomcat-6.1/tomcat-7.0.22/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/com/liferay/portal/tools/dependencies
/portal-tools.properties
[java] java.lang.NullPointerException
[java] at com.liferay.portal.kernel.io.unsync.UnsyncStringReader.<init>(UnsyncStringReader.java:33)
[java] at com.liferay.util.xml.XMLSafeReader.<init>(XMLSafeReader.java:25)
[java] at com.liferay.portal.xml.SAXReaderImpl.read(SAXReaderImpl.java:423)
[java] at com.liferay.portal.kernel.xml.SAXReaderUtil.read(SAXReaderUtil.java:139)
Regards
Anup
When I am trying to execute ant build-service using command prompt, in my Liferay 6.1 b4 , me to getting exactly the same error.
Have you managed to find any resolution to this issue ?
Error excerpt
[java] Loading jar:file:/D:/liferay/liferay-portal-tomcat-6.1/tomcat-7.0.22/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties
[java] Loading file:/D:/liferay/liferay-portal-tomcat-6.1/tomcat-7.0.22/webapps/ROOT/WEB-INF/classes/portal-ext.properties
[java] Loading jar:file:/D:/liferay/liferay-portal-tomcat-6.1/tomcat-7.0.22/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/com/liferay/portal/tools/dependencies
/portal-tools.properties
[java] java.lang.NullPointerException
[java] at com.liferay.portal.kernel.io.unsync.UnsyncStringReader.<init>(UnsyncStringReader.java:33)
[java] at com.liferay.util.xml.XMLSafeReader.<init>(XMLSafeReader.java:25)
[java] at com.liferay.portal.xml.SAXReaderImpl.read(SAXReaderImpl.java:423)
[java] at com.liferay.portal.kernel.xml.SAXReaderUtil.read(SAXReaderUtil.java:139)
Regards
Anup
Juan Gonzalez P, modificado hace 12 años.
RE: Service Builder (problem: PORTLET DISAPPEARS)
Liferay Legend Mensajes: 3089 Fecha de incorporación: 28/10/08 Mensajes recientesAkris K:
Hi ildar,
When I am trying to execute ant build-service using command prompt, in my Liferay 6.1 b4 , me to getting exactly the same error.
Have you managed to find any resolution to this issue ?
Error excerpt
[java] Loading jar:file:/D:/liferay/liferay-portal-tomcat-6.1/tomcat-7.0.22/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties
[java] Loading file:/D:/liferay/liferay-portal-tomcat-6.1/tomcat-7.0.22/webapps/ROOT/WEB-INF/classes/portal-ext.properties
[java] Loading jar:file:/D:/liferay/liferay-portal-tomcat-6.1/tomcat-7.0.22/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/com/liferay/portal/tools/dependencies
/portal-tools.properties
[java] java.lang.NullPointerException
[java] at com.liferay.portal.kernel.io.unsync.UnsyncStringReader.<init>(UnsyncStringReader.java:33)
[java] at com.liferay.util.xml.XMLSafeReader.<init>(XMLSafeReader.java:25)
[java] at com.liferay.portal.xml.SAXReaderImpl.read(SAXReaderImpl.java:423)
[java] at com.liferay.portal.kernel.xml.SAXReaderUtil.read(SAXReaderUtil.java:139)
Regards
Anup
Forget b4. Download GA and final SDK and re-test. If not, should be a config/XML problem.
Krzysztof Gołębiowski, modificado hace 12 años.
RE: Service Builder (problem: PORTLET DISAPPEARS)
Liferay Master Mensajes: 549 Fecha de incorporación: 25/06/11 Mensajes recientes
Hello,
Did somebody find the solution for problem with NPE:
...
[java] java.lang.NullPointerException
[java] at com.liferay.portal.kernel.io.unsync.UnsyncStringReader.<init>(UnsyncStringReader.java:33)
...
I am experiencing the same error while building sample (generated by Liferay IDE) service within ext plugin. Both from Eclipse and command line on Liferay 6.1 CE GA1.
Regards,
KG
Did somebody find the solution for problem with NPE:
...
[java] java.lang.NullPointerException
[java] at com.liferay.portal.kernel.io.unsync.UnsyncStringReader.<init>(UnsyncStringReader.java:33)
...
I am experiencing the same error while building sample (generated by Liferay IDE) service within ext plugin. Both from Eclipse and command line on Liferay 6.1 CE GA1.
Regards,
KG
Ravi Kumar Gupta, modificado hace 12 años.
RE: Service Builder (problem: PORTLET DISAPPEARS)
Liferay Legend Mensajes: 1302 Fecha de incorporación: 24/06/09 Mensajes recientesKrzysztof Gołębiowski:
Hello,
Did somebody find the solution for problem with NPE:
...
[java] java.lang.NullPointerException
[java] at com.liferay.portal.kernel.io.unsync.UnsyncStringReader.<init>(UnsyncStringReader.java:33)
...
I am experiencing the same error while building sample (generated by Liferay IDE) service within ext plugin. Both from Eclipse and command line on Liferay 6.1 CE GA1.
Regards,
KG
Ext plugins are not to add a service to liferay. They are to modify what is already present in liferay.
Krzysztof Gołębiowski, modificado hace 12 años.
RE: Service Builder (problem: PORTLET DISAPPEARS)
Liferay Master Mensajes: 549 Fecha de incorporación: 25/06/11 Mensajes recientes
Yeah, but I need to have this service available through all my plugins. As far as I remember, it is hard to achieve that with hooks or portlets (I have to copy service jar's to tomcat/lib/ext manually).
Ravi Kumar Gupta:
Krzysztof Gołębiowski:Hello,
Did somebody find the solution for problem with NPE:
...
[java] java.lang.NullPointerException
[java] at com.liferay.portal.kernel.io.unsync.UnsyncStringReader.<init>(UnsyncStringReader.java:33)
...
I am experiencing the same error while building sample (generated by Liferay IDE) service within ext plugin. Both from Eclipse and command line on Liferay 6.1 CE GA1.
Regards,
KG
Ext plugins are not to add a service to liferay. They are to modify what is already present in liferay.
David H Nebinger, modificado hace 12 años.
RE: Service Builder (problem: PORTLET DISAPPEARS)
Liferay Legend Mensajes: 14916 Fecha de incorporación: 2/09/06 Mensajes recientesKrzysztof Gołębiowski:
Yeah, but I need to have this service available through all my plugins. As far as I remember, it is hard to achieve that with hooks or portlets (I have to copy service jar's to tomcat/lib/ext manually).
Totally untrue.
All you need to do is go to the dependent portlet (the one that will be calling the service) and add the project containing the service as a required deployment context (in the liferay-plugin-package.properties file).
No more do you need to copy jars to tomcat/lib/ext (was always a bad practice, required reboots, etc.) and also allows them to deprecate adding services to EXT (it's planned, but I don't know when they will be rolling that out).
So stick with the service in another plugin (i.e. a portlet plugin) and add the required dependency context to the service users.
Krzysztof Gołębiowski, modificado hace 12 años.
RE: Service Builder (problem: PORTLET DISAPPEARS)
Liferay Master Mensajes: 549 Fecha de incorporación: 25/06/11 Mensajes recientes
Dawid, thanks for your answer, I didn't know that I tried to create the service within hook plugin, but there is one problem. I am referencing few Liferay entities:
...
<column name="memberEntry" type="Collection" entity="com.liferay.portal.User"
mapping-key="userId" />
...
<reference entity="User" package-path="com.liferay.portal" />
...
Everything looks fine service builder builds the service, war file is generated, but during deployment i get the following exception:
...
Caused by: java.lang.Error: Unresolved compilation problems:
com.liferay.portal.model.impl.UserModelImpl cannot be resolved to a variable
...
Eclipse says the same thing, it cannot find UserModeImpl class. As far as I know, this class is sealed within portal-impl.jar, but I don't think referencing this jar within portlet/hook plugin is a good idea (liferay ant deploy task won't allow that anyway). What can I do with that situation?
Regards,
KG
...
<column name="memberEntry" type="Collection" entity="com.liferay.portal.User"
mapping-key="userId" />
...
<reference entity="User" package-path="com.liferay.portal" />
...
Everything looks fine service builder builds the service, war file is generated, but during deployment i get the following exception:
...
Caused by: java.lang.Error: Unresolved compilation problems:
com.liferay.portal.model.impl.UserModelImpl cannot be resolved to a variable
...
Eclipse says the same thing, it cannot find UserModeImpl class. As far as I know, this class is sealed within portal-impl.jar, but I don't think referencing this jar within portlet/hook plugin is a good idea (liferay ant deploy task won't allow that anyway). What can I do with that situation?
Regards,
KG
David H Nebinger, modificado hace 12 años.
RE: Service Builder (problem: PORTLET DISAPPEARS)
Liferay Legend Mensajes: 14916 Fecha de incorporación: 2/09/06 Mensajes recientes
Somehow you're accessing the implementation class (a no-no) when you should just stick w/ the interface class.
A full stack trace may help pinpoint where the failure is occurring...
A full stack trace may help pinpoint where the failure is occurring...
Krzysztof Gołębiowski, modificado hace 12 años.
RE: Service Builder (problem: PORTLET DISAPPEARS)
Liferay Master Mensajes: 549 Fecha de incorporación: 25/06/11 Mensajes recientes
Seems that Service Builder generates wrong code. SB generated class - RecipientsListPersistenceImpl - contains references to UserModelImpl. Examples and full stacktrace included below:
Examples from RecipientsListPersistenceImpl
public static final FinderPath FINDER_PATH_GET_USERS = new FinderPath(com.liferay.portal.model.impl.UserModelImpl.ENTITY_CACHE_ENABLED,
com.liferay.portal.model.impl.UserModelImpl.FINDER_CACHE_ENABLED,
com.liferay.portal.model.impl.UserImpl.class,
com.liferay.portal.service.persistence.UserPersistenceImpl.FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION,
"getUsers",
new String[] {
Long.class.getName(), "java.lang.Integer", "java.lang.Integer",
"com.liferay.portal.kernel.util.OrderByComparator"
});
public List<com.liferay.portal.model.User> getUsers(long pk, int start,
int end, OrderByComparator orderByComparator) throws SystemException {
...
SQLQuery q = session.createSQLQuery(sql);
q.addEntity("Portal_User",
com.liferay.portal.model.impl.UserImpl.class);
QueryPos qPos = QueryPos.getInstance(q);
qPos.add(pk);
...
}
Stacktrace
18:59:17,540 ERROR [ContextLoader:227] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pl.kgolebiowski.recipientsList.service.RecipientsListLocalService' defined in ServletContext resource [/WEB-INF/c
lasses/META-INF/portlet-spring.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pl.kgolebiowski.recipient
sList.service.persistence.RecipientsListPersistence' defined in ServletContext resource [/WEB-INF/classes/META-INF/portlet-spring.xml]: Instantiation of bean failed; nested exception is org.springfram
ework.beans.BeanInstantiationException: Could not instantiate bean class [pl.kgolebiowski.recipientsList.service.persistence.RecipientsListPersistenceImpl]: Constructor threw exception; nested exceptio
n is java.lang.Error: Unresolved compilation problems:
com.liferay.portal.model.impl.UserModelImpl cannot be resolved to a variable
com.liferay.portal.model.impl.UserModelImpl cannot be resolved to a variable
com.liferay.portal.model.impl.UserImpl cannot be resolved to a type
com.liferay.portal.service.persistence.UserPersistenceImpl cannot be resolved to a variable
com.liferay.portal.model.impl.UserImpl cannot be resolved to a type
com.liferay.portal.model.impl.UserModelImpl cannot be resolved to a variable
com.liferay.portal.model.impl.UserModelImpl cannot be resolved to a variable
com.liferay.portal.model.impl.UserImpl cannot be resolved to a type
com.liferay.portal.service.persistence.UserPersistenceImpl cannot be resolved to a variable
com.liferay.portal.model.impl.UserModelImpl cannot be resolved to a variable
com.liferay.portal.model.impl.UserModelImpl cannot be resolved to a variable
com.liferay.portal.model.impl.UserImpl cannot be resolved to a type
com.liferay.portal.service.persistence.UserPersistenceImpl cannot be resolved to a variable
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:282)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:204)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at com.liferay.portal.spring.context.PortletContextLoaderListener.contextInitialized(PortletContextLoaderListener.java:99)
at com.liferay.portal.kernel.servlet.PortalClassLoaderServletContextListener.doPortalInit(PortalClassLoaderServletContextListener.java:91)
at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycle.java:42)
at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:61)
at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:53)
at com.liferay.portal.kernel.util.BasePortalLifecycle.registerPortalLifecycle(BasePortalLifecycle.java:52)
at com.liferay.portal.kernel.servlet.PortalClassLoaderServletContextListener.contextInitialized(PortalClassLoaderServletContextListener.java:50)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4765)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5260)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:866)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:842)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1095)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1617)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Examples from RecipientsListPersistenceImpl
public static final FinderPath FINDER_PATH_GET_USERS = new FinderPath(com.liferay.portal.model.impl.UserModelImpl.ENTITY_CACHE_ENABLED,
com.liferay.portal.model.impl.UserModelImpl.FINDER_CACHE_ENABLED,
com.liferay.portal.model.impl.UserImpl.class,
com.liferay.portal.service.persistence.UserPersistenceImpl.FINDER_CLASS_NAME_LIST_WITHOUT_PAGINATION,
"getUsers",
new String[] {
Long.class.getName(), "java.lang.Integer", "java.lang.Integer",
"com.liferay.portal.kernel.util.OrderByComparator"
});
public List<com.liferay.portal.model.User> getUsers(long pk, int start,
int end, OrderByComparator orderByComparator) throws SystemException {
...
SQLQuery q = session.createSQLQuery(sql);
q.addEntity("Portal_User",
com.liferay.portal.model.impl.UserImpl.class);
QueryPos qPos = QueryPos.getInstance(q);
qPos.add(pk);
...
}
Stacktrace
18:59:17,540 ERROR [ContextLoader:227] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pl.kgolebiowski.recipientsList.service.RecipientsListLocalService' defined in ServletContext resource [/WEB-INF/c
lasses/META-INF/portlet-spring.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pl.kgolebiowski.recipient
sList.service.persistence.RecipientsListPersistence' defined in ServletContext resource [/WEB-INF/classes/META-INF/portlet-spring.xml]: Instantiation of bean failed; nested exception is org.springfram
ework.beans.BeanInstantiationException: Could not instantiate bean class [pl.kgolebiowski.recipientsList.service.persistence.RecipientsListPersistenceImpl]: Constructor threw exception; nested exceptio
n is java.lang.Error: Unresolved compilation problems:
com.liferay.portal.model.impl.UserModelImpl cannot be resolved to a variable
com.liferay.portal.model.impl.UserModelImpl cannot be resolved to a variable
com.liferay.portal.model.impl.UserImpl cannot be resolved to a type
com.liferay.portal.service.persistence.UserPersistenceImpl cannot be resolved to a variable
com.liferay.portal.model.impl.UserImpl cannot be resolved to a type
com.liferay.portal.model.impl.UserModelImpl cannot be resolved to a variable
com.liferay.portal.model.impl.UserModelImpl cannot be resolved to a variable
com.liferay.portal.model.impl.UserImpl cannot be resolved to a type
com.liferay.portal.service.persistence.UserPersistenceImpl cannot be resolved to a variable
com.liferay.portal.model.impl.UserModelImpl cannot be resolved to a variable
com.liferay.portal.model.impl.UserModelImpl cannot be resolved to a variable
com.liferay.portal.model.impl.UserImpl cannot be resolved to a type
com.liferay.portal.service.persistence.UserPersistenceImpl cannot be resolved to a variable
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:527)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:293)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:290)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:192)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:585)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:282)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:204)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
at com.liferay.portal.spring.context.PortletContextLoaderListener.contextInitialized(PortletContextLoaderListener.java:99)
at com.liferay.portal.kernel.servlet.PortalClassLoaderServletContextListener.doPortalInit(PortalClassLoaderServletContextListener.java:91)
at com.liferay.portal.kernel.util.BasePortalLifecycle.portalInit(BasePortalLifecycle.java:42)
at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:61)
at com.liferay.portal.kernel.util.PortalLifecycleUtil.register(PortalLifecycleUtil.java:53)
at com.liferay.portal.kernel.util.BasePortalLifecycle.registerPortalLifecycle(BasePortalLifecycle.java:52)
at com.liferay.portal.kernel.servlet.PortalClassLoaderServletContextListener.contextInitialized(PortalClassLoaderServletContextListener.java:50)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4765)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5260)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:866)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:842)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1095)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1617)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
David H Nebinger, modificado hace 12 años.
RE: Service Builder (problem: PORTLET DISAPPEARS)
Liferay Legend Mensajes: 14916 Fecha de incorporación: 2/09/06 Mensajes recientesKrzysztof Gołębiowski:
Seems that Service Builder generates wrong code. SB generated class - RecipientsListPersistenceImpl - contains references to UserModelImpl.
Yep, that's the problem alright. SB is trying to use the internal classes for which it has no access.
Krzysztof Gołębiowski, modificado hace 12 años.
RE: Service Builder (problem: PORTLET DISAPPEARS)
Liferay Master Mensajes: 549 Fecha de incorporación: 25/06/11 Mensajes recientes
Thanks for your help David, I submitted this bug to Liferay JIRA (http://issues.liferay.com/browse/LPS-26849).