Message Boards

Error in Custome SQL in Liferay 7

thumbnail
Nirav Prajapati, modified 5 Years ago.

Error in Custome SQL in Liferay 7

Regular Member Posts: 133 Join Date: 6/25/15 Recent Posts
Hello Friends,

I am working on Liferay 7.1 CE GA2.
​​​​​​​

I have implemented the Custom query. Everything is working fine during the implementation of it.


But When I call query I'll get the following error of CustomSQL.

​​​​​​​2019-03-19 06:41:05.294 ERROR [http-nio-8080-exec-4][PortletServlet:112] javax.portlet.PortletException: java.lang.IncompatibleClassChangeError: Found interface com.liferay.portal.dao.orm.custom.sql.CustomSQL, but class was expected
javax.portlet.PortletException: java.lang.IncompatibleClassChangeError: Found interface com.liferay.portal.dao.orm.custom.sql.CustomSQL, but class was expected
    at com.liferay.portal.kernel.portlet.LiferayPortlet.callActionMethod(LiferayPortlet.java:207)
    at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.callActionMethod(MVCPortlet.java:415)
    at com.liferay.portal.kernel.portlet.LiferayPortlet.processAction(LiferayPortlet.java:97)
    at com.liferay.portal.kernel.portlet.bridges.mvc.MVCPortlet.processAction(MVCPortlet.java:260)
    at com.liferay.portlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:77)
    at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:50)
    at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:108)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
    at org.eclipse.equinox.http.servlet.internal.registration.EndpointRegistration.service(EndpointRegistration.java:153)
    at org.eclipse.equinox.http.servlet.internal.servlet.ResponseStateHandler.processRequest(ResponseStateHandler.java:62)
    at org.eclipse.equinox.http.servlet.internal.context.DispatchTargets.doDispatch(DispatchTargets.java:120)
    at org.eclipse.equinox.http.servlet.internal.servlet.RequestDispatcherAdaptor.include(RequestDispatcherAdaptor.java:48)
    at com.liferay.portlet.internal.InvokerPortletImpl.invoke(InvokerPortletImpl.java:564)
    at com.liferay.portlet.internal.InvokerPortletImpl.invokeAction(InvokerPortletImpl.java:610)
    at com.liferay.portlet.internal.InvokerPortletImpl.processAction(InvokerPortletImpl.java:299)
    at com.liferay.portal.monitoring.internal.portlet.MonitoringInvokerPortlet.processAction(MonitoringInvokerPortlet.java:216)
    at com.liferay.portle

Please help me.

​​​​​​​Thanks in Advance.
thumbnail
Amos Fong, modified 5 Years ago.

RE: Error in Custome SQL in Liferay 7

Liferay Legend Posts: 2047 Join Date: 10/7/08 Recent Posts
Looks like the same error here?
https://community.liferay.com/forums/-/message_boards/message/112774929

If not, post some code where you are using customSQL
thumbnail
Nirav Prajapati, modified 5 Years ago.

RE: Error in Custome SQL in Liferay 7

Regular Member Posts: 133 Join Date: 6/25/15 Recent Posts
Thanks Amos Fong ,
It's Resolved. By adding following in build.gradle

compileInclude group: "com.liferay", name: "com.liferay.portal.dao.orm.custom.sql", version: "1.0.0"