You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Jochen Theodorou (JIRA)" <ji...@apache.org> on 2018/07/05 08:55:00 UTC
[jira] [Updated] (GROOVY-8684) compilation issue 'Description
Resource Path Location Type Groovy:expecting EOF, found 'while' @ line 12,
column 2. ConnectToDb2Groovy.groovy /MDS2_Dev/src/com/mds2/automation line
12 Java Problem'
[ https://issues.apache.org/jira/browse/GROOVY-8684?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jochen Theodorou updated GROOVY-8684:
-------------------------------------
Description:
Hello all, There is a problem with the Groovy compilation
Here is the code
{code:java}
package com.mds2.automation
import groovy.sql.Sql
class ConnectToDb2Groovy {
def url = 'jdbc:db2://9.202.178.157:50000/MDS2_DEV'
def user = 'db2admin'
def password = 'Password123'
def driver = 'com.ibm.db2.jcc.DB2Driver'
def sqlStr = Sql.newInstance(url, user, password, driver)
sqlStr.query('SELECT * FROM MDS2.BOND'){resultSet ->
while (resultSet.next()) {
print resultSet.getString(1)
}
}
{code}
Here is the error found in the ecllipse
Description Resource Path Location Type
Groovy:expecting EOF, found 'while' @ line 12, column 2. ConnectToDb2Groovy.groovy /MDS2_Dev/src/com/mds2/automation line 12 Java Problem
Description Resource Path Location Type
Groovy:unexpected token: sqlStr @ line 11, column 2. ConnectToDb2Groovy.groovy /MDS2_Dev/src/com/mds2/automation line 11 Java Problem
Description Resource Path Location Type
Groovy:unexpected token: while @ line 12, column 2. ConnectToDb2Groovy.groovy /MDS2_Dev/src/com/mds2/automation line 12 Java Problem
Here are the details :eclipse kepler with IBM Java 8 SKD & Groovy 2.4
was:
Hello all, There is a problem with the Groovy compilation
Here is the code
package com.mds2.automation
import groovy.sql.Sql
class ConnectToDb2Groovy {
def url = 'jdbc:db2://9.202.178.157:50000/MDS2_DEV'
def user = 'db2admin'
def password = 'Password123'
def driver = 'com.ibm.db2.jcc.DB2Driver'
def sqlStr = Sql.newInstance(url, user, password, driver)
sqlStr.query('SELECT * FROM MDS2.BOND'){resultSet ->
while (resultSet.next()) {
print resultSet.getString(1)
}
}
Here is the error found in the ecllipse
Description Resource Path Location Type
Groovy:expecting EOF, found 'while' @ line 12, column 2. ConnectToDb2Groovy.groovy /MDS2_Dev/src/com/mds2/automation line 12 Java Problem
Description Resource Path Location Type
Groovy:unexpected token: sqlStr @ line 11, column 2. ConnectToDb2Groovy.groovy /MDS2_Dev/src/com/mds2/automation line 11 Java Problem
Description Resource Path Location Type
Groovy:unexpected token: while @ line 12, column 2. ConnectToDb2Groovy.groovy /MDS2_Dev/src/com/mds2/automation line 12 Java Problem
Here are the details :eclipse kepler with IBM Java 8 SKD & Groovy 2.4
> compilation issue 'Description Resource Path Location Type Groovy:expecting EOF, found 'while' @ line 12, column 2. ConnectToDb2Groovy.groovy /MDS2_Dev/src/com/mds2/automation line 12 Java Problem'
> -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
> Key: GROOVY-8684
> URL: https://issues.apache.org/jira/browse/GROOVY-8684
> Project: Groovy
> Issue Type: Bug
> Components: groovy-jdk
> Affects Versions: 2.4.0
> Reporter: Thulsi Doss Krishnan
> Priority: Major
>
> Hello all, There is a problem with the Groovy compilation
> Here is the code
> {code:java}
> package com.mds2.automation
> import groovy.sql.Sql
> class ConnectToDb2Groovy {
>
> def url = 'jdbc:db2://9.202.178.157:50000/MDS2_DEV'
> def user = 'db2admin'
> def password = 'Password123'
> def driver = 'com.ibm.db2.jcc.DB2Driver'
> def sqlStr = Sql.newInstance(url, user, password, driver)
>
> sqlStr.query('SELECT * FROM MDS2.BOND'){resultSet ->
> while (resultSet.next()) {
> print resultSet.getString(1)
> }
> }
> {code}
> Here is the error found in the ecllipse
> Description Resource Path Location Type
> Groovy:expecting EOF, found 'while' @ line 12, column 2. ConnectToDb2Groovy.groovy /MDS2_Dev/src/com/mds2/automation line 12 Java Problem
>
> Description Resource Path Location Type
> Groovy:unexpected token: sqlStr @ line 11, column 2. ConnectToDb2Groovy.groovy /MDS2_Dev/src/com/mds2/automation line 11 Java Problem
>
> Description Resource Path Location Type
> Groovy:unexpected token: while @ line 12, column 2. ConnectToDb2Groovy.groovy /MDS2_Dev/src/com/mds2/automation line 12 Java Problem
>
> Here are the details :eclipse kepler with IBM Java 8 SKD & Groovy 2.4
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)