The method get?nt(int) is undefined for the type ResultSet

One Star

The method get?nt(int) is undefined for the type ResultSet

Hi 
Talend Version TOS_DI-Win32-20141207_1530-V5.6.1
Jdk :Java Se development Kit 7u75
java: java 7u75
I have the same problem with mr bahad?r , in my scenario I want to get data from MSSQL and store it to MYSQL , connections are done , and schemas are gotten , but when I start the job I get this errors ;
Starting job Job1 at 12:51 20/02/2015.
 
connecting to socket on port 3887
connected
Exception in thread "main" java.lang.Error: Unresolved compilation problems: 
The method get?nt(int) is undefined for the type ResultSet
The method set?nt(int, int) is undefined for the type PreparedStatement
at newproject.job1_0_1.Job1.tMSSqlInput_1Process(Job1.java:702)
at newproject.job1_0_1.Job1.runJobInTOS(Job1.java:1264)
at newproject.job1_0_1.Job1.main(Job1.java:1121)
Job Job1 ended at 12:51 20/02/2015.


Thanks for help & Best Regards
One Star

Re: The method get?nt(int) is undefined for the type ResultSet

Hi,
Pls post the job screen shots for easy understand.
Regards,
Kumar.talend
Five Stars

Re: The method get?nt(int) is undefined for the type ResultSet

Hi,
I use the result set's getInt(x) to get an integer problem with no issue and maybe the following will be of help.  And my apologies in advance if you already know of what is presented below.
-> when using the getInt(x) method on a result set, the x value denotes the index of the column in the result set or the column label
     you want to access. 
     ResultSet myResultSet = do sql statement.
     int resultsetValue = myResultSet(1) - will get the value from the first column in the result set. Note that the first column must be
           an int else you will get an SQLException.
     int resultsetValue = myResultSet(columnName) - will get the value for the named column.  Again the column must be an int.
-> if the above does not help, are your java.sql imports set-up correctly?
Hopefully one of the above mentioned helps you - cannot think of anything else at the moment that would be causing you this issue.
 
One Star

Re: The method get?nt(int) is undefined for the type ResultSet

Hi
just for test , I have mssql input (one integer coloumn) one tmap , and one mysql output and tables are set correctly to get data . what I wanted to do is copy integer data from mssql and store it to mysql .When I started the job I got the error shown ;

Starting job deneme at 22:37 21/02/2015.
connecting to socket on port 4077
connected
Exception in thread "main" java.lang.Error: Unresolved compilation problem: 
The method get?nt(int) is undefined for the type ResultSet
at prj1.deneme_0_1.deneme.tMSSqlInput_1Process(deneme.java:705)
at prj1.deneme_0_1.deneme.runJobInTOS(deneme.java:1271)
at prj1.deneme_0_1.deneme.main(deneme.java:1128)
Job deneme ended at 22:37 21/02/2015.
Thanks & Best Regards