Error deleting record

User-1753299103 posted
  • Remove From My Forums
  • Question

  • User-1753299103 posted

    I have gone over this over and over and I do not understand as to why I am receiving this error when I try to delete a record:

    var rsdelete = db.QuerySingle("delete form teflpartner where idteflschool=@0", vblidteflschool);

    Server Error in ‘/’ Application.


    Incorrect syntax near ‘teflpartner’.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for
    more information about the error and where it originated in the code. 

    Exception Details: System.Data.SqlClient.SqlException: Incorrect syntax near ‘teflpartner’.

    Source Error: 

    Line 32:             if (rscheck == 0)
    Line 33:             {
    Line 34:                    var rsdelete = db.QuerySingle("delete form teflpartner where idteflschool=@0", vblidteflschool);
    Line 35:                   
    


    Source File: c:UsersSimonsourcereposSerious_V2017accountcpsdeletepartnertefl.cshtml    Line: 34 

    Stack Trace: 

    [SqlException (0x80131904): Incorrect syntax near 'teflpartner'.]
       System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +2551562
       System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +5951112
       System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +285
       System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) +4169
       System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() +58
       System.Data.SqlClient.SqlDataReader.get_MetaData() +89
       System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) +430
       System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) +2598
       System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) +1483
       System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) +64
       System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) +240
       System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +41
       System.Data.Common.DbCommand.ExecuteReader() +14
       WebMatrix.Data.<QueryInternal>d__22.MoveNext() +137
       System.Linq.Enumerable.FirstOrDefault(IEnumerable`1 source) +121
       WebMatrix.Data.Database.QuerySingle(String commandText, Object[] args) +51
       ASP._Page_account_cps_deletepartnertefl_cshtml.Execute() in c:UsersSimonsourcereposSerious_V2017accountcpsdeletepartnertefl.cshtml:34
       System.Web.WebPages.WebPageBase.ExecutePageHierarchy() +197
       System.Web.WebPages.WebPage.ExecutePageHierarchy(IEnumerable`1 executors) +69
       System.Web.WebPages.WebPage.ExecutePageHierarchy() +131
       System.Web.WebPages.StartPage.RunPage() +17
       System.Web.WebPages.StartPage.ExecutePageHierarchy() +73
       System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage) +78
       System.Web.WebPages.WebPageHttpHandler.ProcessRequestInternal(HttpContextBase httpContext) +116

Answers

  • User753101303 posted

    Hi,

    You have written delete FORM rather than delete FROM  and as the FROM keyword is optional, SQL sees FORM as a table name and doesn’t know what to do with «teflpartner».

    Also from the method name it seems QuerySingle might expect to read back a single row ? If you run into an issue with that, you should use a method that is expected to read back an integer result (DELETE returns how many rows were deleted).

    Edit: it seems it would be rather https://docs.microsoft.com/en-us/previous-versions/aspnet/web-frameworks/gg569254(v%3dvs.111) ie Execute
    rather than QuerySingle.

    • Marked as answer by

      Thursday, October 7, 2021 12:00 AM

Comments

@matthewmueller

Problem

The error we get back from bigserial ids it not very nice.

await prisma.types.delete({
  where: {
    bigserial: "non-existent id",
  },
})
PrismaClientKnownRequestError2: 
Invalid `prisma.types.delete()` invocation in
/Users/m/Go/src/github.com/prisma/qa-native-types/index.ts:72:30

   68 //   },
   69 // })
   70 
   71 console.log(
→  72   await prisma.types.delete(
  Query interpretation error. Error for binding '0': RecordNotFound("Record to delete does not exist.")
    at PrismaClientFetcher.request (/Users/m/Go/src/github.com/prisma/qa-native-types/node_modules/@prisma/client/runtime/index.js:15871:15)
    at processTicksAndRejections (internal/process/task_queues.js:97:5) {
  code: 'P2016',
  clientVersion: '2.10.0-dev.58',
  meta: {
    details: `Error for binding '0': RecordNotFound("Record to delete does not exist.")`
  }
}

Suggested Solution

Remove Query interpretation error. Error for binding '0':

beeman, steebchen, danielrotaermel, sssrot, stemis, izi-vincent-chapron, jake-chambers, CDDelta, olliechick, treble-snake, and 13 more reacted with thumbs up emoji
iurylippo reacted with eyes emoji

@stemis

We have the same happening to us on MariaDB with ints:
Prisma version: 2.22.1

const nonExistingId = 1234;
this._prisma.someModel.delete({
  where: {
    someId: nonExistingId,
  },
})
driver_1  | InterpretationError("Error for binding '0'", Some(QueryGraphBuilderError(RecordNotFound("Record to delete does not exist.")))) +41845ms
driver_1  | Error: Error occurred during query execution:
driver_1  | InterpretationError("Error for binding '0'", Some(QueryGraphBuilderError(RecordNotFound("Record to delete does not exist."))))
driver_1  |     at /usr/src/app/node_modules/@prisma/client/runtime/index.js:27757:19
driver_1  |     at processTicksAndRejections (internal/process/task_queues.js:95:5)

As a workaround we are using deleteMany

@janpio

Is this the full error message here @stemis? No PrismaClientKnownRequestError from Prisma Client? That would make this a pretty bad bug vs. just an inconvenient error message. Or should the deletion actually work but does not?

@stemis

@janpio Yes this is the full error message. I do have to note that we are running the promise returned from delete via prisma.$transaction(). The delete should function as delete if exists for our use-case, but instead, it’s throwing the above error if the record is not in the database.

Be happy to provide you with more information, please let me know what you need!

@janpio

Ok, the $transaction makes this definitely a separate problem — can you open a new bug issue and fill the complete issue template? Maybe you can try to see if this happens in a new, minimal reproduction project you could put on Github and link to? That would be awesome.

@jake-chambers

I have this issue as well, deleteIfExists?

tobiasriemenschneider, sugimotoren, vladavip88, iampueroo, conspireagency, slnsrn, CDDelta, jbdemonte, steven-tey, GuilhermeAbacherli, and 15 more reacted with thumbs up emoji

@conspireagency

Same issue here as well. Feel like it shouldn’t require a different method, just handle more gracefully?

@CDDelta

It would be great to have something akin to the following for delete():

await this.prisma.product.delete({
    where: {
      id: product.id,
    },
    rejectOnNotFound: false,
});

The current behavior makes things hard to deal with when trying to write idempotent functions for handling Stripe webhooks etc.

While using deleteMany() is a decent workaround it doesn’t work in cases such as the below:

await this.prisma.product.update({
  where: {
    id: product.id,
  },
  data: {
    price: {
        delete: true,
    }
  },
});

Something akin to the following would be handy as well:

await this.prisma.product.update({
  where: {
    id: product.id,
  },
  data: {
    price: {
        delete: {
           rejectOnNotFound: false,
        },
    }
  },
});
jbdemonte, OffBy0x01, steven-tey, ablipan, FlacorLopes, hexnaught, turakvlad, vavra7, MaltesBytes, enslit, and 3 more reacted with thumbs up emoji

@jbdemonte

is there any plan for this problem?

I’m also facing the case where I need to update an object, with nested object nullable, and to delete it, I will have to first read the db to known if the nested is set or not, to put { delete : true } or undefined in the update nested property.

this.prisma.client.update({
      where: { id: client.id },
      data: {
        name: client.name,
        // ...


        billingAddress:
           billingAddressData
               ? { upsert: { create: billingAddressData, update: billingAddressData } }
               : hasPreviousBillingAddress ? { delete: true } : undefined,


        shippingAddress:
           shippingAddressData
               ? { upsert: { create: shippingAddressData, update: shippingAddressData } }
               : hasPreviousShippingAddress ? { delete: true } : undefined,
      },

@steven-tey

Facing a similar issue as well:

An operation failed because it depends on one or more records that were required but not found. 
Record to delete does not exist.

Right now I’m catching it in a try-catch but would love to be able to have a similar function as upsert but for deletes :)

@ntgussoni

I’m facing the same issue in this simple example, I don’t really care if it exists or not I just want to make sure its deleted before creating a new one. I think opting out so that delete doesn’t throw might be a good approach.

await db.$transaction([
                db.microsite.delete({
                    where: {
                        slug: micrositeSlug
                    }
                }),
                db.microsite.create({
                    data: {
                       ...
                    }
                })
            ]);

@mindlid

you can catch it until the delete if not exists is implemented is changed

await prisma.entity.delete({
  where: { id: product.id }
}).catch()

@joshribakoff-sm

@MaltesBytes

+1

@bahatron

My work around for this was to change delete for deleteMany. Hope it helps

@ansh

It is quite absurd this doesn’t exist yet even though the issue was opened 3 years ago…

@MaltesBytes

Uncle798

added a commit
to Uncle798/adapters
that referenced
this issue

Jan 29, 2023

@Uncle798

This was all performed while connected to my MBP through iTunes, downloaded through iTunes, and run through iTunes for my iPad2 mini Retina….

Update was successful (mostly) but the iPad goes into a loop that you cannot break out of if you follow the prompts. So, once the update is complete the iOS asks you to input your iCloud credentials and then attempts to update the login. However, after spinning for a couple minutes a popup dialog box «Error deleting record» is displayed. At which point you have only «OK» as a choice which then brings you right back to inputing credentials to login / update iCloud information….which, well you get the idea, now you are stuck in a loop.

The only «fix» I can determine is to break the sign-in by selecting «skip this step» at the bottom of the iCloud login screen.

While this seems to work and brought me to my home page on the iPad, I don’t really know what caused it to fail within the update. I have gone to the iCloud settings and all my info appears to be correct (and working); so I think this is may just be a glitch in the iOS 10.3.1 installation process and possibly only on iPad2 (my iPhone 7 worked just fine).

When you delete a record in Microsoft Dynamics CRM, the following error message may be logged in the Application log:

Event Type: Error
Event Source: MSCRMDeletionService
Event Category: None

Event ID: 16387
Date: Date
Time: Time
AM User: N/A

Computer: Computer_Name
Description:
Error: Deletion Service failed to clean up some tables.

Symptoms

This problem occurs because there is a constraint on the entity table of the record that is being deleted. Additionally, the user who deletes the record may not have the rights to delete all the associated records.

For example, assume that you have rights to delete only contacts. You try to delete a contact that is associated with three cases. In Microsoft Dynamics CRM, the cascade relationship between the contact entity and the case entity is set to «Cascade Delete All.» Therefore, the contact record is set to a delete status in the Microsoft Dynamics CRM database. However, you do not have rights to delete cases. Therefore, the delete status is not set on the case records. When the Deletion Service tries to delete the contact record, a constraint blocks that deletion because there are three existing cases that are assigned to the contact. To successfully delete this record, you must delete the records that cause the constraint conflict.

Cause

To resolve this problem, follow these steps.

Note Before you follow the instructions in this article, make sure that you have a complete backup copy of the database that you can restore if a problem occurs.

To identify the table where the Deletion Service is failing, follow these steps:

  1. On the Microsoft Dynamics CRM server, click Start, click
    Run, type cmd, and then click
    OK.

  2. At the command prompt, type directorycrmdeletionservice.exe –runonce, and then press ENTER.

    Note By default, the Crmdeletionservice.exe file is located in the drive: program filesMicrosoft Dynamics CRMserverbin directory.

    Then, you receive a message that resembles the following message:

    Can’t clean up the following tables: Campaign
    Note The table that is returned in the message is the table for which the Deletion Service failed.

The following example demonstrates how to resolve this problem for the Campaign table.

To resolve the problem for the Campaign table, follow these steps:

  1. Run a statement in SQL Query Analyzer. To do this, follow these steps:

    1. Click Start, point to All Programs, point to Microsoft SQL Server, and then click Query Analyzer.

    2. Run the following query against the
      Organization Name_MSCRM database.

      Note OrganizationName is a placeholder for the actual organization name.

      delete from Campaign where DeletionStateCode = 2

      This query returns a message that resembles the following message:

      DELETE statement conflicted with COLUMN REFERENCE constraint ‘campaign_leads’. The conflict occurred in database ‘OrganizationName_MSCRM’, table ‘LeadBase’, column ‘CampaignId’. The statement has been terminated.

  2. Correct the records that are causing the constraint conflict by using a statement that resembles the following statement.

    Update LeadBase set CampaignId=null WHERE CampaignId IN (SELECT CampaignId FROM CampaignBase WHERE DeletionStateCode = 2)

    Note The table and the fields that you use in the statement depend on the message that you received in step 1b earlier in this section. In this example, you are setting the CampaignId field in the LeadBase table to null if the campaign has been marked for deletion.

  3. Run the following command to verify that all the tables have been corrected.

    crmdeletionservice.exe –runonce 

    If you still experience a problem, repeat steps 1 through 3 earlier in this section to correct the other constraints.

Resolution

Need more help?

Submitted by alpha_luna on Thursday, May 12, 2016 — 16:08.

PHP Deleting Data In MySQL

We already did in the tutorial for PHP Inserting Data To MySQL and PHP Select Data In MySQL. So, I decided to create a follow-up tutorial for PHP Deleting Data In MySQL.
We’re gonna use Delete Statement to delete data from our database table.
«tbl_registration» Example Database Table.
This is the data.
Data

Deleting Data In MySQL Using MySQLi and PDO

Deleting the data tbl_registration_id = 2 in our «tbl_registration» table.

Deleting Record Using MySQLi (Object-Oriented)

  1. <?php

  2. $servername = "localhost";

  3. $username = "root";

  4. $password = "";

  5. $dbname = "add_query_pdo";

  6. // Create connection

  7. $conn = new mysqli($servername, $username, $password, $dbname);

  8. // Check connection

  9. if ($conn->connect_error) {

  10. die("Connection failed: " . $conn->connect_error);

  11. }

  12. // sql to delete a record

  13. $sql = "DELETE FROM tbl_registration WHERE tbl_registration_id = 2";

  14. if ($conn->query($sql) === TRUE) {

  15. echo "Record deleted successfully";

  16. } else {

  17. echo "Error deleting record: " . $conn->error;

  18. }

  19. $conn->close();

  20. ?>

Deleting Record Using MySQLi (Procedural)

  1. <?php

  2. $servername = "localhost";

  3. $username = "root";

  4. $password = "";

  5. $dbname = "add_query_pdo";

  6. // Create connection

  7. $conn = mysqli_connect($servername, $username, $password, $dbname);

  8. // Check connection

  9. if (!$conn) {

  10. }

  11. // sql to delete a record

  12. $sql = "DELETE FROM tbl_registration WHERE tbl_registration_id = 2";

  13. echo "Record deleted successfully";

  14. } else {

  15. echo "Error deleting record: " . mysqli_error($conn);

  16. }

  17. ?>

Deleting Record Using PDO (PHP Data Objects)

  1. <?php

  2. $servername = "localhost";

  3. $username = "root";

  4. $password = "";

  5. $dbname = "add_query_pdo";

  6. try {

  7. $conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);

  8. // set the PDO error mode to exception

  9. $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);

  10. // sql to delete a record

  11. $sql = "DELETE FROM tbl_registration WHERE tbl_registration_id = 2";

  12. // use exec() because no results are returned

  13. $conn->exec($sql);

  14. echo "Record deleted successfully";

  15. }

  16. catch(PDOException $e)

  17. {

  18. echo $sql . "<br>" . $e->getMessage();

  19. }

  20. $conn = null;

  21. ?>

In this tutorial, this is my simple source code and easy to understand on how to delete data in MySQL.

This is the Data Table and has a «Delete Record» button.

  1. <table border="1" cellspacing="5" cellpadding="5" width="100%">

  2. <th>First Name</th>

  3. <th>Middle Name</th>

  4. <th>Last Name</th>

  5. <th>Contact Number</th>

  6. <?php

  7. require_once('connection.php');

  8. $result = $conn->prepare("SELECT * FROM tbl_registration ORDER BY tbl_registration_id ASC");

  9. $result->execute();

  10. for($i=0; $row = $result->fetch(); $i++){

  11. $id=$row['tbl_registration_id'];

  12. ?>

  13. <td><label><?php echo $row['tbl_registration_id']; ?></label></td>

  14. <td><label><?php echo $row['first_name']; ?></label></td>

  15. <td><label><?php echo $row['middle_name']; ?></label></td>

  16. <td><label><?php echo $row['contact_number']; ?></label></td>

  17. <a href="delete.php<?php echo '?tbl_registration_id='.$id; ?>" class="btn btn-danger">

  18. <button class="btn_delete">

  19. Delete Record

  20. <?php } ?>

And, this is our PHP Delete Query to deleting data in our table.

  1. <?php

  2. require_once('connection.php');

  3. $get_id=$_GET['tbl_registration_id'];

  4. // sql to delete a record

  5. $sql = "Delete from tbl_registration where tbl_registration_id = '$get_id'";

  6. // use exec() because no results are returned

  7. $conn->exec($sql);

  8. echo "<script>alert('Successfully Deleted!'); window.location='index.php'</script>";

  9. ?>

And, this is the output after deleting data in the table. The tbl_registration_id = 2 was deleted.
Result
Share us your thoughts and comments below. Thank you so much for dropping by and reading this tutorial post. For more updates, don’t hesitate and feel free to visit this website more often and please share this with your friends or email me at [email protected]. Practice Coding. Thank you very much.

  • 279 views

  • Solved Questions
  • This Question

sfdeveloper12sfdeveloper12

Getting an error while deleting a record.

Hello,

I am doing task where i want to delete share record but its giving me an error as shown below. 
«Insufficient Privileges
You do not have the level of access necessary to perform the operation you requested. Please contact the owner of the record or your administrator if access is necessary. For more information, see Insufficient Privileges Errors.»

Account {«Party_Sea_ID__c»:8375,»Customer_Number__c»:»C3092″,»Name»:»VILLAGE JEWELRY OUTLET OF KANNAPOLIS, INC.»,»DBA_Name__c»:»VILLAGE JEWELRY OUTLET OF KANNAPOLIS, INC.»,»Customer_Group_Id__c»:»a0028000015lr7TAAQ»,»OwnerId»:»00528000003iGolAAE»,»owner1__c»:»00528000003iL8FAAU»,»Terms_Id__c»:»a042800000oV26ZAAS»,»Default_Currency__c»:»US DOLLARS»,»No_of_Doors__c»:0,»NumberOfEmployees»:0,»Store_Size__c»:0,»Status__c»:0,»Sales_Code__c»:»NONE»,»RecordTypeId»:»01228000000QbiM»,»Asset_Credit_Limit__c»:0,»Memo_Credit_Limit__c»:0,»Outstanding_A_R_Balance__c»:0,»Outstanding_Memo_Balance__c»:0} Delete_Share: execution of BeforeUpdate caused by: System.DmlException: Delete failed. First exception on row 0 with id 00r28000020WN31AAG; first error: DELETE_FAILED, cannot delete owner or rule share rows, id=00r28000020WN31: [] Trigger.Delete_Share: line 29, column 1

My trigger is as followed.

trigger Delete_Share on Account (before update) {

set<Id> AccountIDs = new Set<Id>();
for(Account a: trigger.new){
AccountIDs.add(a.id);
}
List<AccountShare> jobShares = new List<AccountShare>();

map<String,AccountShare>accountShareMap = new Map<String,AccountShare>();

for(AccountShare accShare : [select AccountId,UserOrGroupId from AccountShare where AccountId in :AccountIds])
{
 accountShareMap.put(String.valueOf(accShare.UserOrGroupId),accShare);

}

for(Account a : trigger.new){
Account oldAccount = Trigger.OldMap.get(a.id);
if (a.owner1__c != null && a.owner1__c !=oldAccount.owner1__c) {

    AccountShare accountRecord = accountShareMap.get(string.valueOf(oldAccount.owner1__c)); 
    if (accountRecord  != null)
    jobShares.add(accountRecord);
  }
 }

if(jobShares.isEmpty() == false){
 delete jobShares;
 }
}

29th line is this :  delete jobShares;

Please help me. i dont know why is this happening.

Thanks & Best Regards,
Utkarsha

You need to sign in to do that.

Dismiss

My end goal is to return the text «Success» or the DB error message when calling my delete(id) function in the DAO. I have created a bunch of foreign key constraints in my DB that will not allow orphaned records. I expect when I try to delete something that has children, the ORA-02292: integrity constraint (SLAMTST.SLAM_SITE_SELECT_OPT_FK1) violated - child record found message gets returned. I am getting the error message, but the program terminates immediately after as if it is trying to commit the failed transaction.

If I have left something important out, let me know. Basically it is called via service via controller.

Relavant DAO code:

import java.io.Serializable;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;
import com.amdocs.tmo.dao.BaseDao;
import com.amdocs.tmo.model.reference.Select;

@Repository
@Transactional
public class SelectDao implements BaseDao<Select> {

	@PersistenceContext
	private EntityManager em;


	@Override
	public Select get(Serializable id) {
		Select select = (Select) em.find(Select.class, id);

		return select;
	}

	@Override
	public String delete(Serializable id) {
		System.out.println("Starting");
		try {
			em.remove(get(id));
			em.flush();
			return "Success";
		} catch (Exception e) {
			while (e.getCause() != null) {
				e = (Exception) e.getCause();
			}
			System.out.println(e.getMessage());
			return e.getMessage();
		}
	}

}

Error message:

Starting
Hibernate: select select0_.SELECT_ID as SELECT_ID1_15_0_, select0_.LAST_UPDATE_DATE as LAST_UPDATE_DATE2_15_0_, select0_.LAST_UPDATE_USER as LAST_UPDATE_USER3_15_0_, select0_.SELECT_GROUP as SELECT_GROUP4_15_0_, select0_.SELECT_NAME as SELECT_NAME5_15_0_, select0_.SELECT_SUBGROUP as SELECT_SUBGROUP6_15_0_ from SLAM_SITE_SELECT select0_ where select0_.SELECT_ID=?
12:40:45.659 [http-nio-8080-exec-4] INFO  com.amdocs.tmo.dao.reference.SelectDao - Select found successfully, Details=[ID=23; Group=Site; Name=Yes/No]
Hibernate: delete from SLAM_SITE_SELECT where SELECT_ID=?
12:40:45.839 [http-nio-8080-exec-4] WARN  org.hibernate.engine.jdbc.spi.SqlExceptionHelper - SQL Error: 2292, SQLState: 23000
12:40:45.839 [http-nio-8080-exec-4] ERROR org.hibernate.engine.jdbc.spi.SqlExceptionHelper - ORA-02292: integrity constraint (SLAMTST.SLAM_SITE_SELECT_OPT_FK1) violated - child record found

12:40:45.842 [http-nio-8080-exec-4] INFO  org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl - HHH000010: On release of batch it still contained JDBC statements
ORA-02292: integrity constraint (SLAMTST.SLAM_SITE_SELECT_OPT_FK1) violated - child record found

May 19, 2017 12:40:46 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [SpringDispatch] in context with path [/sla-manager] threw exception [Request processing failed; nested exception is org.springframework.orm.jpa.JpaSystemException: Transaction was marked for rollback only; cannot commit; nested exception is org.hibernate.TransactionException: Transaction was marked for rollback only; cannot commit] with root cause
org.hibernate.TransactionException: Transaction was marked for rollback only; cannot commit
	at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl$TransactionDriverControlImpl.commit(JdbcResourceLocalTransactionCoordinatorImpl.java:217)
	at org.hibernate.engine.transaction.internal.TransactionImpl.commit(TransactionImpl.java:68)
	at org.springframework.orm.jpa.JpaTransactionManager.doCommit(JpaTransactionManager.java:517)
	at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:761)
	at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:730)
	at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:504)
	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:292)
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
	at com.sun.proxy.$Proxy105.delete(Unknown Source)
	at com.amdocs.tmo.service.reference.SelectService.delete(SelectService.java:43)
	at com.amdocs.tmo.controller.reference.SelectController.deleteRecord(SelectController.java:98)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:220)
	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:134)
	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:116)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:827)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:738)
	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:963)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897)
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
	at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:230)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:317)
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:127)
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:114)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
	at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
	at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
	at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
	at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilterInternal(BasicAuthenticationFilter.java:158)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:200)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
	at org.springframework.security.web.csrf.CsrfFilter.doFilterInternal(CsrfFilter.java:100)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
	at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:64)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
	at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:331)
	at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:214)
	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:177)
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:262)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:192)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:165)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:474)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:140)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
	at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:624)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:349)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:783)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:66)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:745)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1437)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:745)

Понравилась статья? Поделить с друзьями:
  • Error deleting partition ubuntu
  • Error deleting file nextcloud
  • Error definition of implicitly declared
  • Error defining an external function hotline miami
  • Error default title