留言板

Liferay 6.2 User's Private Page Random HTTP 400 Bad Request

Greg Marin,修改在8 年前。

Liferay 6.2 User's Private Page Random HTTP 400 Bad Request

New Member 帖子: 5 加入日期: 13-11-12 最近的帖子
Hello All,

After upgrading to 6.2 EE, we are seeing that on a user's private page, some of the requests from the browser show "400 Bad Request". This appears random as different requests will succeed/fail every time you refresh the page. The same portlet does not have these issues when deployed on a public page, it only seems to happen when on a user's private page. I've confirmed the request itself is good (and again, sometimes that request will go through when page is refreshed).

Has anyone else noticed this behavior and can possibly provide some insight on a cause/solution?

Thank you in advance for your help.

<Edit>

Following Exceptions are generated with Bad Requests:

16:04:27,775 ERROR [http-bio-8080-exec-16][JDBCExceptionReporter:82] ORA-00001: unique constraint (LIFERAY_USER.IX_8D83D0CE) violated

16:04:27,776 ERROR [http-bio-8080-exec-16][JDBCExceptionReporter:82] ORA-00001: unique constraint (LIFERAY_USER.IX_8D83D0CE) violated

16:04:32,428 ERROR [http-bio-8080-exec-8][status_jsp:749] com.liferay.portal.kernel.portlet.PortletContainerException: com.liferay.portal.kernel.portlet.PortletContainerException: 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.portlet.PortletContainerException: com.liferay.portal.kernel.portlet.PortletContainerException: 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.portlet.RestrictPortletContainerWrapper.serveResource(RestrictPortletContainerWrapper.java:169)
at com.liferay.portal.kernel.portlet.PortletContainerUtil.serveResource(PortletContainerUtil.java:164)

---
I dropped the index referenced in exception (IX_8D83D0CE) and all requests were successful. This index refers to ResourcePermission table. After dropping and reloading page, I’m unable to recreate index because of duplicate keys found.

CREATE UNIQUE INDEX "LIFERAY_USER"."IX_8D83D0CE" ON "LIFERAY_USER"."RESOURCEPERMISSION" ("COMPANYID", "NAME", "SCOPE", "PRIMKEY", "ROLEID")
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "LIFERAY_USER_TS" ;

Error starting at line 34 in command:
CREATE UNIQUE INDEX "LIFERAY_USER"."IX_8D83D0CE" ON "LIFERAY_USER"."RESOURCEPERMISSION" ("COMPANYID", "NAME", "SCOPE", "PRIMKEY", "ROLEID")
PCTFREE 10 INITRANS 2 MAXTRANS 255 COMPUTE STATISTICS
STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1
BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT)
TABLESPACE "LIFERAY_USER_TS"
Error at Command Line:34 Column:68
Error report:
SQL Error: ORA-01452: cannot CREATE UNIQUE INDEX; duplicate keys found
01452. 00000 - "cannot CREATE UNIQUE INDEX; duplicate keys found"
*Cause:
*Action:

Ran following query to find duplicates:

select count(*), companyid, name, scope, primkey, roleid from resourcepermission group by companyid, name, scope, primkey, roleid having count(*) > 1;

Count CompanyID Name Scope PrimKey RoleID
6 10157 test_WAR_test1portlet 4 65108_LAYOUT_test_WAR_test1portlet 10166
4 10157 test_WAR_test1portlet 4 65108_LAYOUT_test_WAR_test1portlet 10167

Deleted duplicates and was able to recreate Index but requests started failing again. Checked for duplicates in db again (none exist) but something is trying to insert duplicates which is why the requests fail.

Is this Index critical and can it be safely removed in higher environments (IE: Production)?
thumbnail
David H Nebinger,修改在8 年前。

RE: Liferay 6.2 User's Private Page Random HTTP 400 Bad Request

Liferay Legend 帖子: 14916 加入日期: 06-9-2 最近的帖子
What service pack are you using?

Have you submitted a LESA ticket for help from Liferay?
thumbnail
Piotr Swiniarski,修改在7 年前。

RE: Liferay 6.2 User's Private Page Random HTTP 400 Bad Request

New Member 帖子: 13 加入日期: 15-2-6 最近的帖子
Hi Greg

Did you create LESA or resolved this problem. We have similar problem. Looking for info.

Best
Piotr