I am using the following code to query my database in scriptrunner for Jira. I am receiving the following error
How can I print which object names are available? That way, I know what query to use. package SuperFeature
import com.atlassian.jira.issue.Issue
import org.apache.log4j.Logger
import com.atlassian.jira.project.version.Version
import com.atlassian.jira.bc.project.component.ProjectComponent
import com.atlassian.jira.bc.project.component.ProjectComponentManager
import com.atlassian.jira.security.JiraAuthenticationContext
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.issue.label.LabelManager
import SuperFeature.Configuration_SuperFeature
import groovy.sql.Sql
import java.sql.Driver
import java.sql.*
def log = Logger.getLogger('atlassian-jira.log')
def driver = Class.forName('com.microsoft.sqlserver.jdbc.SQLServerDriver').newInstance() as Driver // <1>
def props = new Properties()
props.setProperty("user", "webM_Feature") // <2>
props.setProperty("password", "webM_Feature")
String connectstmt= "jdbc:sqlserver://ireport:1433;RND_webM_Feature="
log.warn("MOUNA CAMELIA "+connectstmt)
def conn = driver.connect(connectstmt, props) // <3>
def sql = new Sql(conn)
try {
String query = "SELECT cycle, line, prod, fcomp, sfcomp, pm, rnd FROM dbo.itrac_rnd"
ResultSet rs = sql.executeQuery(query);
while (rs.next()) {
log.warn("MOUNA CAMELIA "+rs.getString("cycle"))
}
} finally {
sql.close()
conn.close()
}