One Star

java.sql.SQLException: Io exception: Invalid number format for port nu

Hi all,
Can anyone help me with the below error while running a job using context load...
Starting job database at 12:39 20/04/2010.
connecting to socket on port 4229
connected
connecting to socket on port 4481
connected
tContextLoad_1 set key "host" with value ""
tContextLoad_1 set key "port" with value ""
tContextLoad_1 set key "schema" with value ""
tContextLoad_1 set key "database" with value ""
tContextLoad_1 set key "username" with value ""
tContextLoad_1 set key "password" with value ""
Info: Parameter "host" is a new parameter of tContextLoad_1
Info: Parameter "port" is a new parameter of tContextLoad_1
Info: Parameter "schema" is a new parameter of tContextLoad_1
Info: Parameter "database" is a new parameter of tContextLoad_1
Info: Parameter "username" is a new parameter of tContextLoad_1
Info: Parameter "password" is a new parameter of tContextLoad_1
Exception in component tOracleInput_1
java.sql.SQLException: Io exception: Invalid number format for port number
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:334)
at oracle.jdbc.ttc7.TTC7Protocol.handleIOException(TTC7Protocol.java:3668)
at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:353)
at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:371)
at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:551)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:351)
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at mt_s.database_0_1.database.tOracleInput_1Process(database.java:970)
at mt_s.database_0_1.database.tFileList_1Process(database.java:730)
at mt_s.database_0_1.database.runJobInTOS(database.java:1298)
at mt_s.database_0_1.database.main(database.java:1185)
disconnected
disconnected
Job database ended at 12:39 20/04/2010.
2 REPLIES
Community Manager

Re: java.sql.SQLException: Io exception: Invalid number format for port nu

Hello
tContextLoad_1 set key "port" with value ""
java.sql.SQLException: Io exception: Invalid number format for port number

As the exception message shows, the port should not be null or empty here.
Best regards
Shong
----------------------------------------------------------
Talend | Data Agility for Modern Business
One Star

Re: java.sql.SQLException: Io exception: Invalid number format for port nu

That is empty because I removed it for security purpose while posting the query..
Here is what I am trying to do
1. I have a empty trigger file (created manually in a UNIX server) with year and month as its file name.
Example : MAP200911.SND
2. I need to extract the data from the database based on the year and month mentioned in the file name. In this case year
is 2009 and month is 11
As per the belwo solution by you I was able to do it
"Using tFileProperties to get the properties of file, include the file name. and then parse and get the
year and month by cut the file name."
Now I need to use this year and month (ie 2009 and 11) as variable to my sql query...
how can I achive this... by using context load? or any thing else...
Could you please let me know step by step process for achiving this..
Thanks in advance
Mahir Jain