【发布时间】:2014-03-08 23:37:27
【问题描述】:
我在 Liferay 6.2 CE 中使用 Service Builder,但是当我关闭我的项目并再次打开它时,一切都搞砸了。我可以毫无问题地运行我的项目,但我无法再对 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>
【问题讨论】:
-
您有正确的数据库连接详细信息吗?或者它可能是特定的 Liferay 插件问题。
-
您能否在常规 XML 编辑器中打开 service.xml,而不是在图表中,看看它是否是有效的 xml,或者您是否在其中发现了一些可疑的东西?
-
我可以用任何其他编辑器打开它,并且 XML 是有效的(没有构建错误),它似乎是 Liferay IDE 的东西......
-
听起来很有趣。可以发
service.xml吗?你能用简单的文本编辑器打开文件吗(右键单击,用...打开,文本编辑器)。 -
@rlegendi:我添加了 service.xml 的内容
标签: java eclipse liferay liferay-6