掲示板
getServiceNull() is Null -Service Builder
6年前 に Ola Torres によって更新されました。
getServiceNull() is Null -Service Builder
New Member 投稿: 17 参加年月日: 17/02/06 最新の投稿
Hi,
We have this module created through Service Builder.
Then after months it was refactored into another name of package: "com.history.samples.mqs"
1. I ran the service builder task.
2. Added a custom function in -service module, ran the service builder task again
3. Deployed in tomcat locally (working fine)
I deployed the same jar files in different tomcat, null pointer appears in "getService() in the return of the method below
public static com.history.samples.mqs.SampleHistory getSampleHistory(long search_id) throws com.liferay.portal.kernel.exception.PortalException {
return getService().getSampleHistory(search_id);
}
Hope some one can give me some light. I do not have any idea why it doesn't work in different environment (with the same set up as mine)
but doesn't work in my local.
We have this module created through Service Builder.
<service-builder package-path="com.sample.mqs">
<namespace>SAMPLEHISTORY</namespace>
<!--<entity data-source="sampleDataSource" local-service="true" name="Foo" remote-service="false" session-factory="sampleSessionFactory" table="foo" tx-manager="sampleTransactionManager uuid="true"">-->
<entity local-service="true" name="SampleHistory" remote-service="true" uuid="true" table="sampleHistory" cache-enabled="false">
<column name="search_id" type="long" primary="true"></column>
<column name="historyID" type="String"></column>
<column name="userid" type="String"></column>
<column name="groupid" type="long"></column>
<column name="createdDate" type="Date"></column>
<!-- References -->
<order by="desc">
<order-column name="createdDate" order-by="desc"></order-column>
</order>
<finder name="historyID" return-type="Collection" db-index="true">
<finder-column name="userid"></finder-column>
<finder-column name="historyID"></finder-column>
<finder-column name="groupid"></finder-column>
</finder>
<finder name="GroupId" return-type="Collection">
<finder-column name="userid"></finder-column>
<finder-column name="groupid"></finder-column>
</finder>
<reference entity="AssetEntry" package-path="com.liferay.portlet.asset" />
<reference entity="AssetTag" package-path="com.liferay.portlet.asset" />
</entity>
</service-builder>
Then after months it was refactored into another name of package: "com.history.samples.mqs"
1. I ran the service builder task.
2. Added a custom function in -service module, ran the service builder task again
3. Deployed in tomcat locally (working fine)
I deployed the same jar files in different tomcat, null pointer appears in "getService() in the return of the method below
public static com.history.samples.mqs.SampleHistory getSampleHistory(long search_id) throws com.liferay.portal.kernel.exception.PortalException {
return getService().getSampleHistory(search_id);
}
Hope some one can give me some light. I do not have any idea why it doesn't work in different environment (with the same set up as mine)
but doesn't work in my local.