Foros de discusión
Unable to Execute Dynamic Query ln liferay 5.2.3
vipin bardia, modificado hace 12 años.
Unable to Execute Dynamic Query ln liferay 5.2.3
Regular Member Mensajes: 162 Fecha de incorporación: 28/02/11 Mensajes recientes
Java Code----
DynamicQuery dynamicQuery =DynamicQueryFactoryUtil.forClass(Custom.class);
dynamicQuery = dynamicQuery.add(PropertyFactoryUtil.forName("framework").eq(frmWork));
In above code Custom.class is our custom class and framework is our respective field.
As we add the filter to dynamicQuery It gives the below Error.
Error-------
Java.lang.ClassCastException: $Proxy304 cannot be cast to com.liferay.portal.dao.orm.hibernate.SessionImpl
Thanks & Regards
VIpin Bardia
CIGNEXian
DynamicQuery dynamicQuery =DynamicQueryFactoryUtil.forClass(Custom.class);
dynamicQuery = dynamicQuery.add(PropertyFactoryUtil.forName("framework").eq(frmWork));
In above code Custom.class is our custom class and framework is our respective field.
As we add the filter to dynamicQuery It gives the below Error.
Error-------
Java.lang.ClassCastException: $Proxy304 cannot be cast to com.liferay.portal.dao.orm.hibernate.SessionImpl
Thanks & Regards
VIpin Bardia
CIGNEXian
vipin bardia, modificado hace 12 años.
RE: Unable to Execute Dynamic Query ln liferay 5.2.3
Regular Member Mensajes: 162 Fecha de incorporación: 28/02/11 Mensajes recientes
Hi All,
I am stucked with this error,
Please, If some one can help.
Thanks & Regards
Vipin Bardia
I am stucked with this error,
Please, If some one can help.
Thanks & Regards
Vipin Bardia
Apoorva Prakash, modificado hace 12 años.
RE: Unable to Execute Dynamic Query ln liferay 5.2.3
Liferay Master Mensajes: 658 Fecha de incorporación: 15/06/10 Mensajes recientes
vipin bardia, modificado hace 12 años.
RE: Unable to Execute Dynamic Query ln liferay 5.2.3
Regular Member Mensajes: 162 Fecha de incorporación: 28/02/11 Mensajes recientes
Hi Apoorva,
First of all, i am really sorry for late reply.
We tried in that way mentioned in those link.
But still would not able to come out.
Now we are doing through simple jdbc.
Thanks for your reply.
Regards
Vipin Bardia
CIGNEXians
First of all, i am really sorry for late reply.
We tried in that way mentioned in those link.
But still would not able to come out.
Now we are doing through simple jdbc.
Thanks for your reply.
Regards
Vipin Bardia
CIGNEXians
Apoorva Prakash, modificado hace 12 años.
RE: Unable to Execute Dynamic Query ln liferay 5.2.3
Liferay Master Mensajes: 658 Fecha de incorporación: 15/06/10 Mensajes recientes
Hello Vipin,
Dynamic query is implemented in exactly the very same fashion... Mine works...
And its almost impossible to point out the exact problem that you are facing...
There must be some minor issue...
Keep trying...
Thanks and regards
Apoorva Prakash
Dynamic query is implemented in exactly the very same fashion... Mine works...
And its almost impossible to point out the exact problem that you are facing...
There must be some minor issue...
Keep trying...
Thanks and regards
Apoorva Prakash
Jignesh Vachhani, modificado hace 12 años.
RE: Unable to Execute Dynamic Query ln liferay 5.2.3
Liferay Master Mensajes: 803 Fecha de incorporación: 10/03/08 Mensajes recientes
Hi Vipin,
i think in your case you must need to create new portlet and just build service again after putting your code in newly created portlet this will resolve your problem.
As the link suggested by apoorva is correct and we can definitely run the code properly.
i think in your case you must need to create new portlet and just build service again after putting your code in newly created portlet this will resolve your problem.
As the link suggested by apoorva is correct and we can definitely run the code properly.