0

我有一个服务构建器,但实体很少。现在,当我尝试向服务构建器添加更多实体并尝试构建服务时,并没有为这个新实体创建服务。

可能是什么问题以及如何解决?

我面临的另一个问题是新创建的 portlet 没有显示在控制面板中。早些时候我从来没有遇到过这样的问题。

不知道发生了什么。我尝试重新启动服务器,刷新工作区但没有用。

编辑:

控制台输出

[Console output redirected to file:D:\test\MIS\.metadata\.plugins\com.liferay.ide.eclipse.sdk\sdk.log]
Buildfile: D:\MIS_Portal\liferay-plugins-sdk-6.1.1\portlets\MISPortal-portlet\build.xml
build-service:
     [echo] Loading jar:file:/D:/TEST_MIS_Portal/liferay-portal-6.1.1-ce-ga2/totestt-7.0.27/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
     [echo] Apr 25, 2013 10:34:16 AM com.liferay.portal.kernel.log.Jdk14LogImpl info
     [echo] INFO: Global shared lib directory /D:/TEST_MIS_Portal/liferay-plugins-sdk-6.1.1/lib/
     [echo] Apr 25, 2013 10:34:16 AM com.liferay.portal.kernel.log.Jdk14LogImpl info
     [echo] INFO: Global lib directory /D:/TEST_MIS_Portal/liferay-portal-6.1.1-ce-ga2/totestt-7.0.27/lib/ext/
     [echo] Apr 25, 2013 10:34:16 AM com.liferay.portal.kernel.log.Jdk14LogImpl info
     [echo] INFO: Portal lib directory /D:/TEST_MIS_Portal/liferay-portal-6.1.1-ce-ga2/totestt-7.0.27/webapps/ROOT/WEB-INF/lib/
     [echo] Apr 25, 2013 10:34:17 AM com.liferay.portal.kernel.log.Jdk14LogImpl info
     [echo] INFO: Properties for portal loaded from [file:/D:/TEST_MIS_Portal/liferay-portal-6.1.1-ce-ga2/totestt-7.0.27/webapps/ROOT/WEB-INF/classes/portal-ext.properties, jar:file:/D:/TEST_MIS_Portal/liferay-portal-6.1.1-ce-ga2/totestt-7.0.27/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/com/liferay/portal/tools/dependencies/portal-tools.properties, jar:file:/D:/TEST_MIS_Portal/liferay-portal-6.1.1-ce-ga2/totestt-7.0.27/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties]
     [echo] Loading jar:file:/D:/TEST_MIS_Portal/liferay-portal-6.1.1-ce-ga2/totestt-7.0.27/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties
     [echo] Loading jar:file:/D:/TEST_MIS_Portal/liferay-portal-6.1.1-ce-ga2/totestt-7.0.27/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/com/liferay/portal/tools/dependencies/portal-tools.properties
     [echo] Loading file:/D:/TEST_MIS_Portal/liferay-portal-6.1.1-ce-ga2/totestt-7.0.27/webapps/ROOT/WEB-INF/classes/portal-ext.properties
     [echo] java.lang.RuntimeException: Column employerCity not found
     [echo]     at com.liferay.portal.tools.servicebuilder.Entity.getColumn(Entity.java:62)
     [echo]     at com.liferay.portal.tools.servicebuilder.ServiceBuilder._parseEntity(ServiceBuilder.java:4783)
     [echo]     at com.liferay.portal.tools.servicebuilder.ServiceBuilder.<init>(ServiceBuilder.java:636)
     [echo]     at com.liferay.portal.tools.servicebuilder.ServiceBuilder.main(ServiceBuilder.java:151)
    [mkdir] Created dir: D:\TEST_MIS_Portal\liferay-plugins-sdk-6.1.1\portlets\MISMISPortal-portlet\docroot\WEB-INF\service-classes
compile-java:
     [copy] Copied 9 empty directories to 9 empty directories under D:\TEST_MIS_Portal\liferay-plugins-sdk-6.1.1\portlets\MISMISPortal-portlet\docroot\WEB-INF\service-classes
    [javac] Compiling 86 source files to D:\TEST_MIS_Portal\liferay-plugins-sdk-6.1.1\portlets\MISMISPortal-portlet\docroot\WEB-INF\service-classes
      [zip] Building zip: D:\TEST_MIS_Portal\liferay-plugins-sdk-6.1.1\portlets\MISMISPortal-portlet\docroot\WEB-INF\lib\MISMISPortal-portlet-service.jar
   [delete] Deleting directory D:\TEST_MIS_Portal\liferay-plugins-sdk-6.1.1\portlets\MISMISPortal-portlet\docroot\WEB-INF\service-classes
BUILD SUCCESSFUL
Total time: 7 seconds
4

2 回答 2

0

我会说检查你在哪里声明employerCityin service.xml,这可能是问题,因为你得到:

java.lang.RuntimeException: Column employerCity not found,

可能是您在某些实体中错误地引用了该列,或者我建议检查该列的拼写。

于 2013-04-26T09:42:28.563 回答
0

在lib里面你有--->/HelloPortlet-portlet/docroot/WEB-INF/lib/HelloPortlet-portlet-service.jar 在你的项目中删除上面的jar 在你
的service.xml中完成更改后再次构建服务并刷新Goto数据库根据修改后的 service.xml,检查您的表是否不存在刷新。

于 2013-05-06T11:53:46.447 回答