[jira] [Commented] (RANGER-1000) Tag service deletion failure due to MySQLIntegrityConstraintViolationException

2016-06-07 Thread Pradeep Agrawal (JIRA)

[ 
https://issues.apache.org/jira/browse/RANGER-1000?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15318388#comment-15318388
 ] 

Pradeep Agrawal commented on RANGER-1000:
-

RANGER-1000-4.patch committed to master branch : 
https://github.com/apache/incubator-ranger/commit/a01cce386a83b6f5f8384b94296c51a45b36

> Tag service deletion failure due to MySQLIntegrityConstraintViolationException
> --
>
> Key: RANGER-1000
> URL: https://issues.apache.org/jira/browse/RANGER-1000
> Project: Ranger
>  Issue Type: Bug
>  Components: Ranger
>Affects Versions: 0.6.0
>Reporter: Pradeep Agrawal
>Assignee: Pradeep Agrawal
> Fix For: 0.6.0
>
> Attachments: RANGER-1000-3.patch, RANGER-1000-4.patch
>
>
> Tag service deletion failed with a bad request error in one of the test 
> environments.
> Delete was performed via Ranger Admin UI.
> Request URL:http://localhost:6080/service/plugins/services/51
> Request Method:DELETE
> Status Code:400 Bad Request
> Remote Address:localhost:6080
> Response:
> {"statusCode":1,"msgDesc":"XXService can't be
> deleted","messageList":[{"name":"OPER_NOT_ALLOWED_FOR_STATE","rbKey":"xa.error.oper_not_allowed_for_state","message":"
> Operation not allowed in current state","objectId":51}]}
> Exception trace from xa_portal.log
> {noformat}
> 2016-05-25 08:57:32,424 [http-bio-6080-exec-32] ERROR 
> org.apache.ranger.service.RangerBaseModelService 
> (RangerBaseModelService.java:277) - Error deleting XXService. Id=51
> javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse 
> Persistence Services - 2.5.2.v20140319-9ad6abd): 
> org.eclipse.persistence.exceptions.DatabaseException
> Internal Exception: 
> com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: 
> Cannot delete or update a parent row: a foreign key constraint fails 
> (`ranger`.`x_service`, CONSTRAINT `x_service_FK_tag_service` FOREIGN KEY 
> (`tag_service`) REFERENCES `x_service` (`id`))
> Error Code: 1451
> Call: DELETE FROM x_service WHERE ((id = ?) AND (version = ?))
> bind => [2 parameters bound]
> Query: DeleteObjectQuery(XXService [id=51])
> at 
> org.eclipse.persistence.internal.jpa.EntityManagerImpl.flush(EntityManagerImpl.java:868)
> at sun.reflect.GeneratedMethodAccessor51.invoke(Unknown Source)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> ..
> Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 
> 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.DatabaseException
> Internal Exception: 
> com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: 
> Cannot delete or update a parent row: a foreign key constraint fails 
> (`ranger`.`x_service`, CONSTRAINT `x_service_FK_tag_service` FOREIGN KEY 
> (`tag_service`) REFERENCES `x_service` (`id`))
> Error Code: 1451
> Call: DELETE FROM x_service WHERE ((id = ?) AND (version = ?))
>   bind => [2 parameters bound]
> Query: DeleteObjectQuery(XXService [id=51])
>   at 
> org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:331)
>   at 
> org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:900)
>   at 
> org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeNoSelect(DatabaseAccessor.java:962)
> .
> Caused by: 
> com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: 
> Cannot delete or update a parent row: a foreign key constraint fails 
> (`ranger`.`x_service`, CONSTRAINT `x_service_FK_tag_service` FOREIGN KEY 
> (`tag_service`) REFERENCES `x_service` (`id`))
>   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>   at 
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
> .
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (RANGER-1000) Tag service deletion failure due to MySQLIntegrityConstraintViolationException

2016-06-01 Thread Gautam Borad (JIRA)

[ 
https://issues.apache.org/jira/browse/RANGER-1000?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15310408#comment-15310408
 ] 

Gautam Borad commented on RANGER-1000:
--

Committed to master : 
https://github.com/apache/incubator-ranger/commit/01e1d05923f8ab9f6d2d36ef1e12605e8719cc54

> Tag service deletion failure due to MySQLIntegrityConstraintViolationException
> --
>
> Key: RANGER-1000
> URL: https://issues.apache.org/jira/browse/RANGER-1000
> Project: Ranger
>  Issue Type: Bug
>  Components: Ranger
>Affects Versions: 0.6.0
>Reporter: Pradeep Agrawal
>Assignee: Pradeep Agrawal
> Fix For: 0.6.0
>
> Attachments: RANGER-1000-2.patch
>
>
> Tag service deletion failed with a bad request error in one of the test 
> environments.
> Delete was performed via Ranger Admin UI.
> Request URL:http://localhost:6080/service/plugins/services/51
> Request Method:DELETE
> Status Code:400 Bad Request
> Remote Address:localhost:6080
> Response:
> {"statusCode":1,"msgDesc":"XXService can't be
> deleted","messageList":[{"name":"OPER_NOT_ALLOWED_FOR_STATE","rbKey":"xa.error.oper_not_allowed_for_state","message":"
> Operation not allowed in current state","objectId":51}]}
> Exception trace from xa_portal.log
> {noformat}
> 2016-05-25 08:57:32,424 [http-bio-6080-exec-32] ERROR 
> org.apache.ranger.service.RangerBaseModelService 
> (RangerBaseModelService.java:277) - Error deleting XXService. Id=51
> javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse 
> Persistence Services - 2.5.2.v20140319-9ad6abd): 
> org.eclipse.persistence.exceptions.DatabaseException
> Internal Exception: 
> com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: 
> Cannot delete or update a parent row: a foreign key constraint fails 
> (`ranger`.`x_service`, CONSTRAINT `x_service_FK_tag_service` FOREIGN KEY 
> (`tag_service`) REFERENCES `x_service` (`id`))
> Error Code: 1451
> Call: DELETE FROM x_service WHERE ((id = ?) AND (version = ?))
> bind => [2 parameters bound]
> Query: DeleteObjectQuery(XXService [id=51])
> at 
> org.eclipse.persistence.internal.jpa.EntityManagerImpl.flush(EntityManagerImpl.java:868)
> at sun.reflect.GeneratedMethodAccessor51.invoke(Unknown Source)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> ..
> Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 
> 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.DatabaseException
> Internal Exception: 
> com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: 
> Cannot delete or update a parent row: a foreign key constraint fails 
> (`ranger`.`x_service`, CONSTRAINT `x_service_FK_tag_service` FOREIGN KEY 
> (`tag_service`) REFERENCES `x_service` (`id`))
> Error Code: 1451
> Call: DELETE FROM x_service WHERE ((id = ?) AND (version = ?))
>   bind => [2 parameters bound]
> Query: DeleteObjectQuery(XXService [id=51])
>   at 
> org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:331)
>   at 
> org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:900)
>   at 
> org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeNoSelect(DatabaseAccessor.java:962)
> .
> Caused by: 
> com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: 
> Cannot delete or update a parent row: a foreign key constraint fails 
> (`ranger`.`x_service`, CONSTRAINT `x_service_FK_tag_service` FOREIGN KEY 
> (`tag_service`) REFERENCES `x_service` (`id`))
>   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>   at 
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
> .
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (RANGER-1000) Tag service deletion failure due to MySQLIntegrityConstraintViolationException

2016-06-01 Thread rangerqa (JIRA)

[ 
https://issues.apache.org/jira/browse/RANGER-1000?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15309983#comment-15309983
 ] 

rangerqa commented on RANGER-1000:
--

{color:red}-1 overall{color}.  Here are the results of testing the latest 
attachment
  http://issues.apache.org/jira/secure/attachment/12807377/RANGER-1000-2.patch
  against master revision bc63484.

{color:green}+1 @author{color}.  The patch does not contain any @author 
tags.

{color:red}-1 tests included{color}.  The patch doesn't appear to include 
any new or modified tests.
Please justify why no new tests are needed for this 
patch.
Also please list what manual steps were performed to 
verify this patch.

{color:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

{color:green}+1 javadoc{color}.  There were no new javadoc warning messages.

+1 checkstyle.  The patch generated 0 code style errors.

{color:green}+1 findbugs{color}.  The patch does not introduce any new 
Findbugs (version 2.0.3) warnings.

{color:green}+1 release audit{color}.  The applied patch does not increase 
the total number of release audit warnings.

{color:green}+1 core tests{color}.  The patch passed unit tests in .

Test results: 
https://builds.apache.org/job/PreCommit-RANGER-Build/235//testReport/
Console output: 
https://builds.apache.org/job/PreCommit-RANGER-Build/235//console

This message is automatically generated.

> Tag service deletion failure due to MySQLIntegrityConstraintViolationException
> --
>
> Key: RANGER-1000
> URL: https://issues.apache.org/jira/browse/RANGER-1000
> Project: Ranger
>  Issue Type: Bug
>  Components: Ranger
>Affects Versions: 0.6.0
>Reporter: Pradeep Agrawal
>Assignee: Pradeep Agrawal
> Fix For: 0.6.0
>
> Attachments: RANGER-1000-2.patch
>
>
> Tag service deletion failed with a bad request error in one of the test 
> environments.
> Delete was performed via Ranger Admin UI.
> Request URL:http://localhost:6080/service/plugins/services/51
> Request Method:DELETE
> Status Code:400 Bad Request
> Remote Address:localhost:6080
> Response:
> {"statusCode":1,"msgDesc":"XXService can't be
> deleted","messageList":[{"name":"OPER_NOT_ALLOWED_FOR_STATE","rbKey":"xa.error.oper_not_allowed_for_state","message":"
> Operation not allowed in current state","objectId":51}]}
> Exception trace from xa_portal.log
> {noformat}
> 2016-05-25 08:57:32,424 [http-bio-6080-exec-32] ERROR 
> org.apache.ranger.service.RangerBaseModelService 
> (RangerBaseModelService.java:277) - Error deleting XXService. Id=51
> javax.persistence.PersistenceException: Exception [EclipseLink-4002] (Eclipse 
> Persistence Services - 2.5.2.v20140319-9ad6abd): 
> org.eclipse.persistence.exceptions.DatabaseException
> Internal Exception: 
> com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: 
> Cannot delete or update a parent row: a foreign key constraint fails 
> (`ranger`.`x_service`, CONSTRAINT `x_service_FK_tag_service` FOREIGN KEY 
> (`tag_service`) REFERENCES `x_service` (`id`))
> Error Code: 1451
> Call: DELETE FROM x_service WHERE ((id = ?) AND (version = ?))
> bind => [2 parameters bound]
> Query: DeleteObjectQuery(XXService [id=51])
> at 
> org.eclipse.persistence.internal.jpa.EntityManagerImpl.flush(EntityManagerImpl.java:868)
> at sun.reflect.GeneratedMethodAccessor51.invoke(Unknown Source)
> at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> ..
> Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 
> 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.DatabaseException
> Internal Exception: 
> com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: 
> Cannot delete or update a parent row: a foreign key constraint fails 
> (`ranger`.`x_service`, CONSTRAINT `x_service_FK_tag_service` FOREIGN KEY 
> (`tag_service`) REFERENCES `x_service` (`id`))
> Error Code: 1451
> Call: DELETE FROM x_service WHERE ((id = ?) AND (version = ?))
>   bind => [2 parameters bound]
> Query: DeleteObjectQuery(XXService [id=51])
>   at 
> org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:331)
>   at 
> org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:900)
>   at 
> org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeNoSelect(DatabaseAccessor.java:962)
> .
> Caused by: 
> com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: 
> Cannot delete or