groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jochen Theodorou (JIRA)" <j...@apache.org>
Subject [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'
Date Thu, 05 Jul 2018 08:55:00 GMT

     [ 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)

Mime
View raw message