我有一個現有的數據庫表。我已經修改service.xml中,如下所示: - service.xml中: -Liferay:Bean定位器尚未設置
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE service-builder PUBLIC "-//Liferay//DTD Service Builder 6.0.0//EN" "http://www.liferay.com/dtd/liferay-service-builder_6_0_0.dtd">
<service-builder package-path="net.test">
<author>pfeffeg</author>
<namespace>dataaccess</namespace>
<entity name="test" remote-service="true" local-service="true">
<column name="PID" type="long"></column>
<column name="PName" type="String"></column>
<column name="IID" type="long" primary="true"></column>
<column name="iName" type="String"></column>
</entity>
</service-builder>
創建表查詢: -
CREATE TABLE [dbo].[dataaccess_test](
[PID] [bigint] NULL,
[PName] [varchar](max) NULL,
[IID] [bigint] NOT NULL,
[iName] [varchar](max) NULL,
CONSTRAINT [pk_IdetailidTest] PRIMARY KEY CLUSTERED
(
[IID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
我已經建立了服務構建。所有類都顯然已經正確構建。但是當我嘗試運行portlet時,我得到一個Bean定位器異常。
BeanLocator has not been set
com.liferay.portal.kernel.bean.BeanLocatorException: BeanLocator has not been set
at com.liferay.portal.kernel.bean.PortletBeanLocatorUtil.locate(PortletBeanLocatorUtil.java:40)
我與 Liferay門戶社區版6.0.6 CE工作(本仁/建造6006/2011年2月17日)。 此外,我用service.xml –
和stacktrace中的任何其他相關信息更新了問題? – aritzg
看看這個話題https://www.liferay.com/es/community/forums//message_boards/view_message/11195275 – aritzg