Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
Next:
badges earned

Your Points Tracker
Challenges
Leaderboard
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Recognition
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Kudos
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Getting PostgreSQL Exception while trying to execute query in ScriptRunner

I am using Confluence Data Center Version. I am trying to execute a query in ScriptRunner by using Create Resource->Local database connection->Preview. While executing the query i am getting the below error:

Error: Cannot change transaction read-only property in the middle of a transaction.

ScriptRunner Version: 6.15.0
Database used in PostgreSQL. 

Please find the screenshot for the same. 

Error SC.PNG

2 answers

2 accepted

2 votes
Answer accepted

Hi @raja_sooriya ,

After I had been struggled for some time with this same error, I decided not to make pool for Local Database Connection, but to try to make another resource as Database Connection where I included parameters of my local database. Might not be the best solution but it worked for me.

Regards

@Aleksa Novevski  Thanks for the solution. But sometimes it may happen that we can't get DB details from the client due to compliance policy.

Like Aleksa Novevski likes this

Hi @raja_sooriya,

Are you using the latest ScriptRunner version for Confluence? If not, could you please update your ScriptRunner to the latest release, and retest the query again?


Thank you and Kind Regards,

Ram

Hi @Ram Kumar Aravindakshan _Adaptavist_ ,

Can you possibly think of any other solutions to the problem? I was using latest release and was facing the same problem. With some older versions of Scriptrunner I was able to see preview but I am getting error rendering macro. With the latest one I get both error whilst trying to test connection pool and the rendering error. 

image.png

As you can see it is the same error. As soon as I exclude lines that requesting data from the database pool, macro is rendering with no errors. 

Thank you in advance,


Aleksa

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence

Miss the Confluence demos at Team 21? Watch them here!

Phew, Atlassian Team 2021 blew by. With dozens of demos and a handful of keynotes, you may have missed some of the awesome Confluence Cloud sessions. Don't' worry, you can watch them all here or on Y...

393 views 2 6
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you