Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

SQLException: 17002 Io exception: Bad packet type

843859Nov 12 2005 — edited Nov 13 2005
Hey,

Okay I am gettting the following error message:
SQLException: 17002 Io exception: Bad packet type
When trying to connect to a oracle db using jdbc and I am running a tomcat server.
I looked all over the inet for a solution - nothing. Some please help me.

Here is the code:
		String url= "jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)"+
		"(HOST=localhost)(PORT=5500))(CONNECT_DATA=(SID=COCKYJOB)(SERVER=DEDICATED)))";
		
		try 
		{
		    DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
		    con = DriverManager.getConnection(url, "scott", "tiger");	
		    //stmt = con.createStatement();	
		} 
		catch(SQLException ex) 
		{
		    System.out.println("SQLException: " + ex.getErrorCode() + " " + ex.getMessage());
		}	
And the error again is:
SQLException: 17002 Io exception: Bad packet type

Thanks for any responses and help in advance.

Thorben
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 11 2005
Added on Nov 12 2005
3 comments
11,790 views