Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

dorollback performing rollback in confluence plugin filter. How to solve the transaction occurrence?

gwakss
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 25, 2020

I am trying to attach a drm function.
When uploading a file, a servlet filter is registered in atlassian-plugin.xml to create a plugin.
When the servlet path in "doFilter" is "/plugins/drag-and-drop/upload.action", it was confirmed that the file was created using a stream.
Using the code below, until chain.doFilter is executed, the following WARN occurs, and the icon of the upload file is not created.
Is there any way to prevent WARN from happening?
If WARN does not occur, can the icon of the uploaded file be created?

 

AttachmentResource resource = new InputStreamAttachmentResource(new FileInputStream(file), filename_org, mimeType, file.length(), "");
resource1 = new InputStreamAttachmentResource(new FileInputStream(file), filename_org, mimeType, file.length(), "");
Attachment attachment = page.getAttachmentNamed(filename_org);

this.fileUploadManager.storeResource(resource, page);

chain.doFilter((ServletRequest)attachmentRequestWrapper, httpResponse);
return;

 

 

The WARN is as follows.

[INFO] [talledLocalContainer] 2020-05-25 16:49:51,982 WARN [http-nio-1990-exec-8] [confluence.impl.hibernate.ConfluenceHibernateTransactionManager] doRollback Performing rollback. Transactions:
[INFO] [talledLocalContainer] ->[null]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT (Session #1304699462)

1 answer

1 accepted

0 votes
Answer accepted
Diego
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 26, 2020

Hello @gwakss !

After reading your question, I believe that you will be able to find very capacitated input for your development here in our Developer Community:

 

Thanks for reaching out!

gwakss
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 26, 2020

thank you for telling me.

Like Diego likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events