This is how i am trying
1. created an extension
2. created a folder 'custom-sql' under the folder 'ext-impl\src\'
3. created below 2 files in the custom-sql folder
default-ext.xml
<?xml version="1.0" encoding="UTF-8"?>
<custom-sql>
<sql file="custom-sql/messageboards.xml" />
</custom-sql>
messageboards.xml
<?xml version="1.0"?>
<custom-sql>
<sql id="com.liferay.portlet.messageboards.service.persistence.MBThreadFinder.findByG_C">
<![CDATA[
SELECT
DISTINCT {MBThread.*}
FROM
MBThread
INNER JOIN
MBMessage ON
(MBMessage.messageId = MBThread.rootMessageId)
WHERE
(MBThread.groupId = ?) AND
(MBThread.categoryId = ?)
ORDER BY
MBThread.priority DESC,
MBThread.lastPostDate DESC
]]>
</sql>
</custom-sql>
4. added below line to 'portal-ext.properties'
custom.sql.configs=custom-sql/default-ext.xml
5. ant direct-deploy shows build success full
6. On starting the tomcat i get the below error and fails to load properly.
07:53:15,227 ERROR [CheckEntryMessageListener:34] Unable to process message {des
tinationName=liferay/scheduler_dispatch, responseDestinationName=null, responseI
d=null, payload=null, values={receiver_key=com.liferay.portlet.announcements.mes
saging.CheckEntryMessageListener:com.liferay.portlet.announcements.messaging.Che
ckEntryMessageListener, scheduledFireTime=Mon Jul 25 07:53:14 GMT 2011}}
com.liferay.portal.kernel.exception.SystemException: com.liferay.portal.kernel.d
ao.orm.ORMException: java.lang.NullPointerException
at com.liferay.portlet.announcements.service.persistence.AnnouncementsEn
tryFinderImpl.findByDisplayDate(AnnouncementsEntryFinderImpl.java:215)
at com.liferay.portlet.announcements.service.impl.AnnouncementsEntryLoca
lServiceImpl.checkEntries(AnnouncementsEntryLocalServiceImpl.java:128)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflecti
on(AopUtils.java:309)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJo
inpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
ReflectiveMethodInvocation.java:150)
at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(T
ransactionInterceptor.java:65)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableM
ethodAdvice.java:58)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableM
ethodAdvice.java:58)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableM
ethodAdvice.java:58)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableM
ethodAdvice.java:58)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
ReflectiveMethodInvocation.java:172)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invok
e(ExposeInvocationInterceptor.java:89)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(
ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami
cAopProxy.java:202)
at $Proxy118.checkEntries(Unknown Source)
at com.liferay.portlet.announcements.service.AnnouncementsEntryLocalServ
iceUtil.checkEntries(AnnouncementsEntryLocalServiceUtil.java:249)
at com.liferay.portlet.announcements.messaging.CheckEntryMessageListener
.doReceive(CheckEntryMessageListener.java:39)
at com.liferay.portlet.announcements.messaging.CheckEntryMessageListener
.receive(CheckEntryMessageListener.java:31)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
Can anyone tell me where i am going wrong?
Thanks for your kind support.
Please sign in to flag this as inappropriate.