Attachment Name Length Is Not Being Verified By the Application (Doc ID 1903511.1)

Last updated on MARCH 08, 2017

Applies to:

Oracle Agile Product Lifecycle Management for Process - Version 6.1.1.3 and later
Information in this document applies to any platform.

Symptoms

On Oracle Agile PLM for Process 6.1.1.3, Document Reference Library :
When attempting to attach a document to a specification that has a name longer than 128 characters, the following error occurs on the server event log DRL-Prodika:

Error:
====
ErrorType: First| ErrorCount: 0| App: DRL| SessionId: 4c4178ed-14c9-0847-f34b-183cc69bf051| UserId: rburrier| IsNewSession: False| ServerID: 10.64.141.231| Misc: |
Exception: System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> Xeno.Data.DataObjectException: Error executing sql command 'insert into DrlAttachment ( pkid , FileName, FileSize, FileType, fkOwner, Title ) values ( '75038ad10c91-f372-4f84-b535-abe298cc43c4', N'Prod_NPD_Signature_Request_issue_NEW_5273310-003 - 2675 - Smart Ones - Breakfast Sandwich - Egg, Canadian Style Turkey Bacon and Cheese - 6ct - Copack (6-19-2014).docx', 296354, 'docx', NULL, N'Prod_NPD_Signature_Request_issue_NEW_5273310-003 - 2675 - Smart Ones - Breakfast Sandwich - Egg, Canadian Style Turkey Bacon and Cheese - 6ct - Copack (6-19-2014).docx' )' ---> Xeno.Data.DataObjectException: Error executing sql command 'insert into DrlAttachment ( pkid , FileName, FileSize, FileType, fkOwner, Title ) values ( '75038ad10c91-f372-4f84-b535-abe298cc43c4', N'Prod_NPD_Signature_Request_issue_NEW_5273310-003 - 2675 - Smart Ones - Breakfast Sandwich - Egg, Canadian Style Turkey Bacon and Cheese - 6ct - Copack (6-19-2014).docx', 296354, 'docx', NULL, N'Prod_NPD_Signature_Request_issue_NEW_5273310-003 - 2675 - Smart Ones - Breakfast Sandwich - Egg, Canadian Style Turkey Bacon and Cheese - 6ct - Copack (6-19-2014).docx' )' ---> System.Data.SqlClient.SqlException: String or binary data would be truncated.
The statement has been terminated.
  at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
  at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
  at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
  at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)
  at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
  at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
  at Xeno.Data.XDataObjectBaseLight.internal_save(IDbCommand command)
  --- End of inner exception stack trace ---
  at Xeno.Data.XDataObjectBaseLight.internal_save(IDbCommand command)
  at Xeno.Data.XDataObjectBaseLight.internal_save(IDbCommand[] commandList)
  at Xeno.Data.XDataObjectBaseLight.Internal_Save()
  at Xeno.Data.XDataObjectBaseLight.Internal_ExistingTransSave()
  --- End of inner exception stack trace ---
  at Xeno.Data.XDataObjectBaseLight.Internal_ExistingTransSave()
  at Xeno.Data.XDataObjectBaseLight.Save(IXDataObjectConnection connection)
  at Xeno.Data.XDataObjectBaseLight.Save()
  at Xeno.Prodika.DRL.WebUI.Popups.AddAttachment.SaveDoc(IDrlAttachmentDocument doc)
  at Xeno.Prodika.DRL.WebUI.Popups.AddAttachment.ProcessFileUpload()
  at System.Web.UI.Control.LoadRecursive()
  at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
  --- End of inner exception stack trace ---
  at System.Web.UI.Page.HandleError(Exception e)
  at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
  at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
  at System.Web.UI.Page.ProcessRequest()
  at System.Web.UI.Page.ProcessRequest(HttpContext context)
  at ASP.popups_addattachment_aspx.ProcessRequest(HttpContext context)
  at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
  at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)


The issue can be reproduced at will with the following steps:
==========================================
1. Create a document (for example a Word document) and give it a long name with more than 128 characters (including extension) like "Prod_NPD_Signature_Request_issue_NEW_5273310-003 - 2675 - Smart Ones - Breakfast Sandwich - Egg, Canadian Style Turkey Bacon and Cheese - 6ct - Copack (12-19-2013).docx"
2. In PLM4P open a specification and open the supporting documents tab
3. Open spec in edit mode an press the "Attachments/ Procedures" button.
4. In the popup press button "Add New" and add the newly created document from step 1 to the specification.
=> unhandled error message appears in the popup (only in the server event log the details of the error can be found).
=> If the name of the document is shortened to less than 129 characters, the issue goes away and the document can be attached.


Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms