Script Runner Http Post to splunk

Hi All,

I am following this article on version 5.8.10 of Confluence and also version 6.2 but am not able to get it working. I keep getting errors.

http://www.mos-eisley.dk/display/ATLASSIAN/Logging+PageEvents+to+Splunk

Current errors are below:

 

post2splunk.groovy

  • Script38.groovy:44 [Static type checking] - Cannot find matching method java.net.URLConnection#setRequestMethod(java.lang.String). Please check if the declared type is right and if the method exists. @ line 44, column 1.
  • Script38.groovy:71 [Static type checking] - Cannot find matching method java.net.URLConnection#getResponseCode(). Please check if the declared type is right and if the method exists. @ line 71, column 15.
  • Script38.groovy:72 [Static type checking] - Cannot find matching method java.net.URLConnection#getResponseMessage(). Please check if the declared type is right and if the method exists. @ line 72, column 16.

1 answer

Hi,

The post should happend anyway (?) Its my script and all places in JIRA i get the:

  • Script1231.groovy:85 [Static type checking] - Cannot find matching method java.net.URLConnection#setRequestMethod(java.lang.String). Please check if the declared type is right and if the method exists. @ line 85, column 7.
  • Script1231.groovy:97 [Static type checking] - Cannot find matching method java.net.URLConnection#getResponseCode(). Please check if the declared type is right and if the method exists. @ line 97, column 126.
  • Script1231.groovy:97 [Static type checking] - Cannot find matching method java.net.URLConnection#getResponseMessage(). Please check if the declared type is right and if the method exists. @ line 97, column 179.
  • Script1231.groovy:101 [Static type checking] - Cannot find matching method java.net.URLConnection#getResponseCode(). Please check if the declared type is right and if the method exists. @ line 101, column 15.
  • Script1231.groovy:106 [Static type checking] - Cannot find matching method java.net.URLConnection#getResponseCode(). Please check if the declared type is right and if the method exists. @ line 106, column 128.
  • Script1231.groovy:106 [Static type checking] - Cannot find matching method java.net.URLConnection#getResponseMessage(). Please check if the declared type is right and if the method exists. @ line 106, column 181.
  • Script1231.groovy:110

But thing do work fine anyway

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Oct 24, 2018 in Confluence

Atlassian Research opportunity with Confluence templates

Do you use templates with Confluence? Take part in a remote 1-hr workshop. You'll receive USD $100 for your time!   We're looking for people to participate in a   remote 1-hr workshop...

1,088 views 17 14
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you