Thursday, August 28, 2014

Liferay SQL

SELECT * FROM "LRAY"."LAYOUT" WHERE FRIENDLYURL = '/bla'
SELECT * FROM "LRAY"."JOURNALARTICLE" where TITLE = 'bla'

Find dups:

SELECT FRIENDLYURL, count(*)
FROM "LRAY"."LAYOUT"
GROUP BY
FRIENDLYURL
having
count(*) > 1


Find bad article

SELECT * FROM "LRAY"."JOURNALARTICLE" where URLTITLE IS NULL;



Count

select count(*) cnt
from user_constraints
where table_name='JOURNALARTICLE'
and constraint_type='U';




Let's say:

17:30:33,297 ERROR [JDBCExceptionReporter:234] ORA-00001: unique constraint (LRAY.IX_E2815081) violated

17:30:33,298 ERROR [JDBCExceptionReporter:234] ORA-00001: unique constraint (LRAY.IX_E2815081) violated

17:30:33,299 ERROR [PortletImporter:669] com.liferay.portal.kernel.lar.PortletDataException: com.liferay.portal.kernel.exception.SystemException: com.liferay.portal.kernel.dao.orm.ORMException: org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
com.liferay.portal.kernel.lar.PortletDataException: com.liferay.portal.kernel.exception.SystemException: com.liferay.portal.kernel.dao.orm.ORMException: org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update
at com.liferay.portal.kernel.lar.BasePortletDataHandler.importData(BasePortletDataHandler.java:78)
at com.liferay.portal.lar.PortletImporter.importPortletData(PortletImporter.java:665)
at com.liferay.portal.lar.PortletImporter.importPortletData(PortletImporter.java:546)
at com.liferay.portal.lar.LayoutImporter.importLayouts(LayoutImporter.java:417)
at com.liferay.portal.service.impl.LayoutLocalServiceImpl.importLayouts(LayoutLocalServiceImpl.java:685)
at com.liferay.portal.service.impl.LayoutLocalServiceImpl.importLayouts(LayoutLocalServiceImpl.java:709)
at com.liferay.portal.service.impl.LayoutLocalServiceImpl.importLayouts(LayoutLocalServiceImpl.java:672)
at sun.reflect.GeneratedMethodAccessor4493.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at com.liferay.portal.spring.transaction.TransactionInterceptor.invoke(TransactionInterceptor.java:86)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
at com.liferay.portal.spring.aop.ChainableMethodAdvice.invoke(ChainableMethodAdvice.java:58)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at $Proxy34.importLayouts(Unknown Source)



select table_name from all_indexes where index_name='IX_E2815081';

shows DLFILEVERSION


No comments:

Post a Comment