Builder引发三个奇怪的错误

Builder引发三个奇怪的错误

本文介绍了Liferay Service Builder引发三个奇怪的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时删除!!

(旧问题凸点)

我正在Liferay上进行一些测试.为此,我遵循了MVC教程,并陷入了服务方面.

I'm doing some tests on Liferay. For this, I'm following the MVC tutorial, and got stuck in the services stuff.

我创建了一个用于测试目的的简单实体"Miclase":

I created a simple entity for testing purposes, "Miclase":

public class Miclase {
    int num1;
    String string1;
}

非常简单,呵呵.好吧,此后,我启动了服务构建器,并使用概述"窗格创建了一个像这样的文件:

Pretty simple, huh. Well, after this, I started the service builder and created a file like this, with the Overview pane:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE service-builder PUBLIC "-//Liferay//DTD Service Builder 6.2.0//EN" "http://www.liferay.com/dtd/liferay-service-builder_6_2_0.dtd">
<service-builder package-path="asd">
    <author>hp</author>
    <namespace>Miservicio</namespace>

    <entity name="Miclase" local-service="true">
        <column name="num1" type="int" primary="false"></column>
        <column name="string1" type="String"></column>


        <!-- PK fields -->

        <column name="miclaseId" type="long" primary="true"></column>

        <!-- Group instance -->

        <column name="groupId" type="long"></column>

        <!-- Audit fields -->

        <column name="companyId" type="long"></column>
        <column name="userId" type="long"></column>
        <column name="userName" type="String"></column>
        <column name="createDate" type="Date"></column>
        <column name="modifiedDate" type="Date"></column>
        <finder name="GroupId" return-type="Collection">
            <finder-column name="groupId"></finder-column>
        </finder>
    </entity>
</service-builder>

概述"窗格中的所有内容均显示无误,因此我单击了构建服务"按钮,它创建了许多源代码:

Everything showed up without errors in the "Overview" pane, so I clicked the "Build service" button, it created a lot of source code:

[Console output redirected to file:C:\Users\hp\workspace\.metadata\.plugins\com.liferay.ide.sdk.core\sdk.log]
Buildfile: C:\Zerok\DevZone\liferay-plugins-sdk-6.2\portlets\MiProyecto-portlet\build.xml
[ivy:resolve] :: Apache Ivy 2.4.0 - 20141213170938 :: http://ant.apache.org/ivy/ ::
[ivy:resolve] :: loading settings :: file = C:\Zerok\DevZone\liferay-plugins-sdk-6.2\ivy-settings.xml
    [touch] Creating C:\Zerok\DevZone\liferay-plugins-sdk-6.2\portlets\MiProyecto-portlet\build.gradle
build-service:
    [mkdir] Created dir: C:\Zerok\DevZone\liferay-plugins-sdk-6.2\portlets\MiProyecto-portlet\docroot\WEB-INF\service
    [mkdir] Created dir: C:\Zerok\DevZone\liferay-plugins-sdk-6.2\portlets\MiProyecto-portlet\docroot\WEB-INF\sql
      [jar] Building MANIFEST-only jar: C:\Zerok\DevZone\liferay-plugins-sdk-6.2\portlets\MiProyecto-portlet\service-builder-classpath.jar
   [delete] Deleting: C:\Zerok\DevZone\liferay-plugins-sdk-6.2\portlets\MiProyecto-portlet\service-builder-classpath.jar.manifest
   [delete] Deleting: C:\Zerok\DevZone\liferay-plugins-sdk-6.2\portlets\MiProyecto-portlet\service-builder-classpath.jar
     [echo] Loading jar:file:/C:/Zerok/DevZone/liferay-portal-6.2-ce-ga5/tomcat-7.0.62/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/system.properties
     [echo] Loading jar:file:/C:/Zerok/DevZone/liferay-portal-6.2-ce-ga5/tomcat-7.0.62/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/portal.properties
     [echo] Loading jar:file:/C:/Zerok/DevZone/liferay-portal-6.2-ce-ga5/tomcat-7.0.62/webapps/ROOT/WEB-INF/lib/portal-impl.jar!/com/liferay/portal/tools/dependencies/portal-tools.properties
     [echo] Building Miclase
     [echo] Writing C:\Zerok\DevZone\liferay-plugins-sdk-6.2\portlets\MiProyecto-portlet\docroot\WEB-INF\service\asd\service\persistence\MiclaseActionableDynamicQuery.java
     [echo] Writing C:\Zerok\DevZone\liferay-plugins-sdk-6.2\portlets\MiProyecto-portlet\docroot\WEB-INF\src\asd\service\persistence\MiclasePersistenceImpl.java
     [echo] Writing C:\Zerok\DevZone\liferay-plugins-sdk-6.2\portlets\MiProyecto-portlet\docroot\WEB-INF\service\asd\service\persistence\MiclasePersistence.java
     [echo] Writing C:\Zerok\DevZone\liferay-plugins-sdk-6.2\portlets\MiProyecto-portlet\docroot\WEB-INF\service\asd\service\persistence\MiclaseUtil.java
     [echo] Writing C:\Zerok\DevZone\liferay-plugins-sdk-6.2\portlets\MiProyecto-portlet\docroot\WEB-INF\src\asd\model\impl\MiclaseModelImpl.java
     [echo] Writing C:\Zerok\DevZone\liferay-plugins-sdk-6.2\portlets\MiProyecto-portlet\docroot\WEB-INF\src\asd\model\impl\MiclaseBaseImpl.java
     [echo] Writing C:\Zerok\DevZone\liferay-plugins-sdk-6.2\portlets\MiProyecto-portlet\docroot\WEB-INF\src\asd\model\impl\MiclaseImpl.java
     [echo] Writing C:\Zerok\DevZone\liferay-plugins-sdk-6.2\portlets\MiProyecto-portlet\docroot\WEB-INF\service\asd\model\MiclaseModel.java
     [echo] Writing C:\Zerok\DevZone\liferay-plugins-sdk-6.2\portlets\MiProyecto-portlet\docroot\WEB-INF\service\asd\model\Miclase.java
     [echo] Writing C:\Zerok\DevZone\liferay-plugins-sdk-6.2\portlets\MiProyecto-portlet\docroot\WEB-INF\src\asd\model\impl\MiclaseCacheModel.java
     [echo] Writing C:\Zerok\DevZone\liferay-plugins-sdk-6.2\portlets\MiProyecto-portlet\docroot\WEB-INF\service\asd\model\MiclaseClp.java
     [echo] Writing C:\Zerok\DevZone\liferay-plugins-sdk-6.2\portlets\MiProyecto-portlet\docroot\WEB-INF\service\asd\model\MiclaseWrapper.java
     [echo] Writing C:\Zerok\DevZone\liferay-plugins-sdk-6.2\portlets\MiProyecto-portlet\docroot\WEB-INF\service\asd\model\MiclaseSoap.java
     [echo] Writing C:\Zerok\DevZone\liferay-plugins-sdk-6.2\portlets\MiProyecto-portlet\docroot\WEB-INF\src\asd\service\impl\MiclaseLocalServiceImpl.java
     [echo] Writing C:\Zerok\DevZone\liferay-plugins-sdk-6.2\portlets\MiProyecto-portlet\docroot\WEB-INF\src\asd\service\base\MiclaseLocalServiceBaseImpl.java
     [echo] Writing C:\Zerok\DevZone\liferay-plugins-sdk-6.2\portlets\MiProyecto-portlet\docroot\WEB-INF\service\asd\service\MiclaseLocalService.java
     [echo] Writing C:\Zerok\DevZone\liferay-plugins-sdk-6.2\portlets\MiProyecto-portlet\docroot\WEB-INF\service\asd\service\MiclaseLocalServiceUtil.java
     [echo] Writing C:\Zerok\DevZone\liferay-plugins-sdk-6.2\portlets\MiProyecto-portlet\docroot\WEB-INF\service\asd\service\MiclaseLocalServiceClp.java
     [echo] Writing C:\Zerok\DevZone\liferay-plugins-sdk-6.2\portlets\MiProyecto-portlet\docroot\WEB-INF\src\asd\service\base\MiclaseLocalServiceClpInvoker.java
     [echo] Writing C:\Zerok\DevZone\liferay-plugins-sdk-6.2\portlets\MiProyecto-portlet\docroot\WEB-INF\service\asd\service\MiclaseLocalServiceWrapper.java
     [echo] Writing C:\Zerok\DevZone\liferay-plugins-sdk-6.2\portlets\MiProyecto-portlet\docroot\WEB-INF\src\asd\service\impl\MiclaseServiceImpl.java
     [echo] Writing C:\Zerok\DevZone\liferay-plugins-sdk-6.2\portlets\MiProyecto-portlet\docroot\WEB-INF\src\asd\service\base\MiclaseServiceBaseImpl.java
     [echo] Writing C:\Zerok\DevZone\liferay-plugins-sdk-6.2\portlets\MiProyecto-portlet\docroot\WEB-INF\service\asd\service\MiclaseService.java
     [echo] Writing C:\Zerok\DevZone\liferay-plugins-sdk-6.2\portlets\MiProyecto-portlet\docroot\WEB-INF\service\asd\service\MiclaseServiceUtil.java
     [echo] Writing C:\Zerok\DevZone\liferay-plugins-sdk-6.2\portlets\MiProyecto-portlet\docroot\WEB-INF\service\asd\service\MiclaseServiceClp.java
     [echo] Writing C:\Zerok\DevZone\liferay-plugins-sdk-6.2\portlets\MiProyecto-portlet\docroot\WEB-INF\src\asd\service\base\MiclaseServiceClpInvoker.java
     [echo] Writing C:\Zerok\DevZone\liferay-plugins-sdk-6.2\portlets\MiProyecto-portlet\docroot\WEB-INF\service\asd\service\MiclaseServiceWrapper.java
     [echo] Writing C:\Zerok\DevZone\liferay-plugins-sdk-6.2\portlets\MiProyecto-portlet\docroot\WEB-INF\src\asd\service\http\MiclaseServiceSoap.java
     [echo] Writing C:\Zerok\DevZone\liferay-plugins-sdk-6.2\portlets\MiProyecto-portlet\docroot\WEB-INF\service\asd\service\messaging\ClpMessageListener.java
     [echo] Writing C:\Zerok\DevZone\liferay-plugins-sdk-6.2\portlets\MiProyecto-portlet\docroot\WEB-INF\service\asd\service\ClpSerializer.java
     [echo] Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512m; support was removed in 8.0
    [mkdir] Created dir: C:\Zerok\DevZone\liferay-plugins-sdk-6.2\portlets\MiProyecto-portlet\docroot\WEB-INF\service-classes
     [copy] Copied 5 empty directories to 5 empty directories under C:\Zerok\DevZone\liferay-plugins-sdk-6.2\portlets\MiProyecto-portlet\docroot\WEB-INF\service-classes
    [javac] Compiling 19 source files to C:\Zerok\DevZone\liferay-plugins-sdk-6.2\portlets\MiProyecto-portlet\docroot\WEB-INF\service-classes
    [javac] Annotation processing got disabled, since it requires a 1.6 compliant JVM

但是...在之前的输出之后,我得到以下构建失败:

but... after the previous output, I get the following build fails:

        [javac] 1. ERROR in C:\Zerok\DevZone\liferay-plugins-sdk-6.2\portlets\MiProyecto-portlet\docroot\WEB-INF\service\asd\model\Miclase.java (at line 1)
[javac]     /**
[javac]     ^
[javac] The type java.util.Map$Entry cannot be resolved. It is indirectly referenced from required .class files
[javac] ----------
[javac] ----------
[javac] 2. ERROR in C:\Zerok\DevZone\liferay-plugins-sdk-6.2\portlets\MiProyecto-portlet\docroot\WEB-INF\service\asd\service\MiclaseLocalServiceClp.java (at line 336)
[javac]     ClpSerializer.translateInput(orderByComparator)
[javac]     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[javac] The type java.util.Comparator cannot be resolved. It is indirectly referenced from required .class files
[javac] ----------
[javac] 2 problems (2 errors)

我在这里做错了吗?

推荐答案

我有同样的错误,并且已经解决了6个小时!

I had the same mistake and I've been solving it for 6 hours!

该解决方案非常简单:

您需要进入Window - Preferences - Server - Runtime Environments,选择您的环境,按edit,然后选择JDK 1.7.0_79,但 1.8.x..不同版本存在问题.

You need to go Window - Preferences - Server - Runtime Environments, choose your environment, press edit, and then choose JDK 1.7.0_79, but NOT 1.8.x.. There is a problem in different versions.

我希望它将为某人节省大量时间. :D

I hope it will save someone a plenty of time. :D

这篇关于Liferay Service Builder引发三个奇怪的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

1403页,肝出来的..

09-06 13:44