ant build-service throws'无法解析为类型'错误

时间:2013-02-16 02:39:29

标签: liferay liferay-6

我正在使用liferay 6.1.1 ce ga2,当我下载基于liferay 6.1.x创建的知识库portlet,并运行ant build-service时,一些“无法解析为某种类型”的错误显示出来。您可以从附件中找到完整的错误信息。即使我使用通过liferay门户在线安装并运行良好的portlet,然后我将已安装的文件从捆绑的tomcat目录复制到我的portlet目录中,该目录位于plugins sdk的portlet中,并再次运行ant build-service,错误仍然显示出来。

有趣的是,它一次又一次成功,但今天失败了。我今天唯一做的就是基于maven设置portlet开发环境,但我认为这与错误无关,maven不会改变插件sdk的任何内容。   错误信息如下:

Buildfile: M:\My-Documents\programming\java\lib\Liferay\plugins\portlets\knowledge-base-portlet\build.xml

build-service:
     [copy] Copying 1 file to M:\My-Documents\programming\java\lib\Liferay\plugins\portlets\knowledge-base-portlet\docroot\WEB-INF\classes
      [jar] Building MANIFEST-only jar: M:\My-Documents\programming\java\lib\Liferay\plugins\portlets\knowledge-base-portlet\build-service-classpath.jar
   [delete] Deleting: M:\My-Documents\programming\java\lib\Liferay\plugins\portlets\knowledge-base-portlet\build-service-classpath.jar.manifest
   [delete] Deleting: M:\My-Documents\programming\java\lib\Liferay\plugins\portlets\knowledge-base-portlet\build-service-classpath.jar
     [echo] Loading jar:file:/M:/My-Documents/programming/java/lib/Liferay/bundle/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
     [echo] 二月 16, 2013 3:26:55 上午 com.liferay.portal.kernel.log.Jdk14LogImpl info
     [echo] INFO: Global shared lib directory /M:/My-Documents/programming/java/lib/Liferay/plugins/lib/
     [echo] 二月 16, 2013 3:26:55 上午 com.liferay.portal.kernel.log.Jdk14LogImpl info
     [echo] INFO: Global lib directory /M:/My-Documents/programming/java/lib/Liferay/bundle/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/lib/ext/
     [echo] 二月 16, 2013 3:26:55 上午 com.liferay.portal.kernel.log.Jdk14LogImpl info
     [echo] INFO: Portal lib directory /M:/My-Documents/programming/java/lib/Liferay/bundle/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/webapps/ROOT/WEB-INF/lib/
     [echo] 二月 16, 2013 3:26:56 上午 com.liferay.portal.kernel.log.Jdk14LogImpl info
     [echo] INFO: Properties for portal loaded from [file:/M:/MyLoading jar:file:/M:/My-Documents/programming/java/lib/Liferay/bundle/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/webapps/ROOT/WEB-Documents/programming/java/lib/Liferay/bundle/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/webapps/ROOT/WEB-INF/classes/portal-ext-INF/lib/portal-impl.jar!/portal.properties
     [echo] Loading jar:file:/M:/My-Documents/programming/java/lib/Liferay/bundle/liferay-porta.properties, jar:file:/M:/My-Documents/programming/java/lib/Liferay/bundle/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/webapps/ROOl-6.1.1-ce-ga2/tomcat-7.0.27/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/com/liferay/portal/tools/dependencies/portal-tools.properT/WEB-INF/lib/portal-impl.jar!/com/liferay/portal/tools/dependencies/portal-tools.properties, jar:file:/M:/My-Documents/programmties
     [echo] Loading file:/M:/My-Documents/programming/java/lib/Liferay/bundle/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/webapps/ROOT/Wing/java/lib/Liferay/bundle/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.propertieEB-INF/classes/portal-ext.properties
     [echo] s]
     [echo] SLF4J: Class path contains multiple SLF4J bindings.
     [echo] SLF4J: Found binding in [jar:file:/M:/My-Documents/programming/java/lib/Liferay/bundle/liferay-portal-6.1.1-ce-ga2/tomcat-7.0.27/webapps/ROOT/WEB-INF/lib/util-java.jar!/org/slf4j/impl/StaticLoggerBinder.class]
     [echo] SLF4J: Found binding in [jar:file:/M:/My-Documents/programming/java/lib/Liferay/plugins/portlets/knowledge-base-portlet/docroot/WEB-INF/lib/util-java.jar!/org/slf4j/impl/StaticLoggerBinder.class]
     [echo] SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
     [echo] Building KBArticle
     [echo] Building KBComment
     [echo] Building KBTemplate

compile-java:
    [javac] Compiling 8 source files to M:\My-Documents\programming\java\lib\Liferay\plugins\portlets\knowledge-base-portlet\docroot\WEB-INF\service-classes
    [javac] ----------
    [javac] 1. ERROR in M:\My-Documents\programming\java\lib\Liferay\plugins\portlets\knowledge-base-portlet\docroot\WEB-INF\service\com\liferay\knowledgebase\service\KBArticleService.java (at line 142)
    [javac]     public com.liferay.knowledgebase.model.KBArticleSearchDisplay getKBArticleSearchDisplay(
    [javac]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    [javac] com.liferay.knowledgebase.model.KBArticleSearchDisplay cannot be resolved to a type
    [javac] ----------
    [javac] ----------
    [javac] 2. ERROR in M:\My-Documents\programming\java\lib\Liferay\plugins\portlets\knowledge-base-portlet\docroot\WEB-INF\service\com\liferay\knowledgebase\service\KBArticleServiceClp.java (at line 716)
    [javac]     public com.liferay.knowledgebase.model.KBArticleSearchDisplay getKBArticleSearchDisplay(
    [javac]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    [javac] com.liferay.knowledgebase.model.KBArticleSearchDisplay cannot be resolved to a type
    [javac] ----------
    [javac] 3. ERROR in M:\My-Documents\programming\java\lib\Liferay\plugins\portlets\knowledge-base-portlet\docroot\WEB-INF\service\com\liferay\knowledgebase\service\KBArticleServiceClp.java (at line 772)
    [javac]     return (com.liferay.knowledgebase.model.KBArticleSearchDisplay)ClpSerializer.translateOutput(returnObj);
    [javac]             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    [javac] com.liferay.knowledgebase.model.KBArticleSearchDisplay cannot be resolved to a type
    [javac] ----------
    [javac] ----------
    [javac] 4. ERROR in M:\My-Documents\programming\java\lib\Liferay\plugins\portlets\knowledge-base-portlet\docroot\WEB-INF\service\com\liferay\knowledgebase\service\KBArticleServiceUtil.java (at line 173)
    [javac]     public static com.liferay.knowledgebase.model.KBArticleSearchDisplay getKBArticleSearchDisplay(
    [javac]                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    [javac] com.liferay.knowledgebase.model.KBArticleSearchDisplay cannot be resolved to a type
    [javac] ----------
    [javac] 5. ERROR in M:\My-Documents\programming\java\lib\Liferay\plugins\portlets\knowledge-base-portlet\docroot\WEB-INF\service\com\liferay\knowledgebase\service\KBArticleServiceUtil.java (at line 181)
    [javac]     .getKBArticleSearchDisplay(groupId, title, content, status,
    [javac]      ^^^^^^^^^^^^^^^^^^^^^^^^^
    [javac] The method getKBArticleSearchDisplay(long, String, String, int, Date, Date, boolean, int[], int, int, OrderByComparator) from the type KBArticleService refers to the missing type KBArticleSearchDisplay
    [javac] ----------
    [javac] ----------
    [javac] 6. ERROR in M:\My-Documents\programming\java\lib\Liferay\plugins\portlets\knowledge-base-portlet\docroot\WEB-INF\service\com\liferay\knowledgebase\service\KBArticleServiceWrapper.java (at line 157)
    [javac]     public com.liferay.knowledgebase.model.KBArticleSearchDisplay getKBArticleSearchDisplay(
    [javac]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    [javac] com.liferay.knowledgebase.model.KBArticleSearchDisplay cannot be resolved to a type
    [javac] ----------
    [javac] 7. ERROR in M:\My-Documents\programming\java\lib\Liferay\plugins\portlets\knowledge-base-portlet\docroot\WEB-INF\service\com\liferay\knowledgebase\service\KBArticleServiceWrapper.java (at line 164)
    [javac]     return _kbArticleService.getKBArticleSearchDisplay(groupId, title,
    [javac]                              ^^^^^^^^^^^^^^^^^^^^^^^^^
    [javac] The method getKBArticleSearchDisplay(long, String, String, int, Date, Date, boolean, int[], int, int, OrderByComparator) from the type KBArticleService refers to the missing type KBArticleSearchDisplay
    [javac] ----------
    [javac] ----------
    [javac] 8. ERROR in M:\My-Documents\programming\java\lib\Liferay\plugins\portlets\knowledge-base-portlet\docroot\WEB-INF\service\com\liferay\knowledgebase\service\KBTemplateService.java (at line 100)
    [javac]     public com.liferay.knowledgebase.model.KBTemplateSearchDisplay getKBTemplateSearchDisplay(
    [javac]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    [javac] com.liferay.knowledgebase.model.KBTemplateSearchDisplay cannot be resolved to a type
    [javac] ----------
    [javac] ----------
    [javac] 9. ERROR in M:\My-Documents\programming\java\lib\Liferay\plugins\portlets\knowledge-base-portlet\docroot\WEB-INF\service\com\liferay\knowledgebase\service\KBTemplateServiceClp.java (at line 335)
    [javac]     public com.liferay.knowledgebase.model.KBTemplateSearchDisplay getKBTemplateSearchDisplay(
    [javac]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    [javac] com.liferay.knowledgebase.model.KBTemplateSearchDisplay cannot be resolved to a type
    [javac] ----------
    [javac] 10. ERROR in M:\My-Documents\programming\java\lib\Liferay\plugins\portlets\knowledge-base-portlet\docroot\WEB-INF\service\com\liferay\knowledgebase\service\KBTemplateServiceClp.java (at line 389)
    [javac]     return (com.liferay.knowledgebase.model.KBTemplateSearchDisplay)ClpSerializer.translateOutput(returnObj);
    [javac]             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    [javac] com.liferay.knowledgebase.model.KBTemplateSearchDisplay cannot be resolved to a type
    [javac] ----------
    [javac] ----------
    [javac] 11. ERROR in M:\My-Documents\programming\java\lib\Liferay\plugins\portlets\knowledge-base-portlet\docroot\WEB-INF\service\com\liferay\knowledgebase\service\KBTemplateServiceUtil.java (at line 108)
    [javac]     public static com.liferay.knowledgebase.model.KBTemplateSearchDisplay getKBTemplateSearchDisplay(
    [javac]                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    [javac] com.liferay.knowledgebase.model.KBTemplateSearchDisplay cannot be resolved to a type
    [javac] ----------
    [javac] 12. ERROR in M:\My-Documents\programming\java\lib\Liferay\plugins\portlets\knowledge-base-portlet\docroot\WEB-INF\service\com\liferay\knowledgebase\service\KBTemplateServiceUtil.java (at line 116)
    [javac]     .getKBTemplateSearchDisplay(groupId, title, content,
    [javac]      ^^^^^^^^^^^^^^^^^^^^^^^^^^
    [javac] The method getKBTemplateSearchDisplay(long, String, String, Date, Date, boolean, int[], int, int, OrderByComparator) from the type KBTemplateService refers to the missing type KBTemplateSearchDisplay
    [javac] ----------
    [javac] ----------
    [javac] 13. ERROR in M:\My-Documents\programming\java\lib\Liferay\plugins\portlets\knowledge-base-portlet\docroot\WEB-INF\service\com\liferay\knowledgebase\service\KBTemplateServiceWrapper.java (at line 101)
    [javac]     public com.liferay.knowledgebase.model.KBTemplateSearchDisplay getKBTemplateSearchDisplay(
    [javac]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    [javac] com.liferay.knowledgebase.model.KBTemplateSearchDisplay cannot be resolved to a type
    [javac] ----------
    [javac] 14. ERROR in M:\My-Documents\programming\java\lib\Liferay\plugins\portlets\knowledge-base-portlet\docroot\WEB-INF\service\com\liferay\knowledgebase\service\KBTemplateServiceWrapper.java (at line 108)
    [javac]     return _kbTemplateService.getKBTemplateSearchDisplay(groupId, title,
    [javac]                               ^^^^^^^^^^^^^^^^^^^^^^^^^^
    [javac] The method getKBTemplateSearchDisplay(long, String, String, Date, Date, boolean, int[], int, int, OrderByComparator) from the type KBTemplateService refers to the missing type KBTemplateSearchDisplay
    [javac] ----------
    [javac] 14 problems (14 errors)

build.fxbird.properties如下所示,fxbird是os登录用户。

app.server.dir = M:\\My-Documents\\programming\\java\\lib\\Liferay\\bundle\\liferay-portal-6.1.1-ce-ga2\\tomcat-7.0.27
java.compiler = modern
app.server.lib.global.dir = M:\\My-Documents\\programming\\java\\lib\\Liferay\\bundle\\liferay-portal-6.1.1-ce-ga2\\tomcat-7.0.27\\lib\\ext
app.server.type = tomcat
app.server.deploy.dir = M:\\My-Documents\\programming\\java\\lib\\Liferay\\bundle\\liferay-portal-6.1.1-ce-ga2\\tomcat-7.0.27\\webapps
app.server.portal.dir = M:\\My-Documents\\programming\\java\\lib\\Liferay\\bundle\\liferay-portal-6.1.1-ce-ga2\\tomcat-7.0.27\\webapps\\ROOT

1 个答案:

答案 0 :(得分:0)

我认为服务文件夹中存在问题。请删除服务文件夹路径(WEB-INF \ service)以及类文件夹路径(WEB-INF \ classes)并再次运行构建服务。