Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/365.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Liferay服务生成器错误_Java_Eclipse_Liferay_Liferay 6 - Fatal编程技术网

Java Liferay服务生成器错误

Java Liferay服务生成器错误,java,eclipse,liferay,liferay-6,Java,Eclipse,Liferay,Liferay 6,我在Liferay 6.2 CE中使用Service Builder,但当我关闭项目并再次打开它时,一切都一团糟。我可以毫无问题地运行我的项目,但我不能再对服务生成器进行更改 打开service.xml文件时,会收到以下消息: 我更新了Eclipse和Sapphire,但还是一样 软件版本: Eclipse:Kepler服务发布1 Liferay IDE:2.0.0.201312200205-ga1 蓝宝石:0.7.0 编辑 service.xml的内容: <?xml version

我在Liferay 6.2 CE中使用Service Builder,但当我关闭项目并再次打开它时,一切都一团糟。我可以毫无问题地运行我的项目,但我不能再对服务生成器进行更改

打开service.xml文件时,会收到以下消息:

我更新了Eclipse和Sapphire,但还是一样

软件版本:

  • Eclipse:Kepler服务发布1
  • Liferay IDE:2.0.0.201312200205-ga1
  • 蓝宝石:0.7.0
编辑

service.xml的内容:

<?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="com.nosester.portlet.eventlisting">
    <author>fvoordeckers</author>
    <namespace>Event</namespace>
    <entity local-service="true" name="Event">
        <column name="eventId" type="long" primary="true"></column>
        <column name="name" type="String"></column>
        <column name="description" type="String"></column>
        <column name="date" type="Date"></column>
        <column name="locationId" type="long"></column>
        <column name="companyId" type="long"></column>
        <column name="groupId" type="long"></column>
        <column name="userId" type="long"></column>
        <column name="createDate" type="Date"></column>
        <column name="modifiedDate" type="Date"></column>
        <order by="asc">
            <order-column name="date"></order-column>
        </order>
        <finder name="GroupId" return-type="Collection">
            <finder-column name="groupId"></finder-column>
        </finder>
    </entity>
    <entity name="Location" local-service="true">
        <column name="locationId" type="long" primary="true"></column>
        <column name="name" type="String"></column>
        <column name="description" type="String"></column>
        <column name="streetAddress" type="String"></column>
        <column name="city" type="String"></column>
        <column name="stateProvince" type="String"></column>
        <column name="country" type="String"></column>
        <column name="companyId" type="long"></column>
        <column name="groupId" type="long"></column>
        <column name="userId" type="long"></column>
        <column name="createDate" type="Date"></column>
        <column name="modifiedDate" type="Date"></column>
        <order by="asc">
            <order-column name="name"></order-column>
        </order>
        <finder name="GroupId" return-type="Collection">
            <finder-column name="groupId"></finder-column>
        </finder>
    </entity>
</service-builder>

fvoordeckers
事件

问题似乎是由实体“Location”的主键与实体“Event”的一列同名这一事实引起的。如果您想保持数据库列名不变,可以尝试解决此问题,将“id”作为“Location”pk的名称,并将db name设置为“idLocation”

是否有正确的数据库连接详细信息?或者这可能是特定的Liferay插件问题。您可以在常规的xml编辑器中打开service.xml,而不是在图表中,然后查看它是否是有效的xml,或者您是否发现其中有可疑的内容?我可以用任何其他编辑器打开它,并且xml是有效的(没有构建错误),似乎是Liferay IDE中的某些内容……听起来很有趣。你能发布
服务.xml
吗?你能用一个简单的文本编辑器打开文件吗(右键单击,用…,文本编辑器打开)。@rlegendi:我添加了service.xml的内容