• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getting error java.net.SocketException incompatible with java.sql.SQLException

 
Lalit Tomar
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
application fails after sometime, if i login my application getting
java.lang.ClassCastException: java.net.SocketException incompatible with java.sql.SQLException, but once i restart the Server, it'll get back application to normal mode.

Can anyone please help me with why this exception is coming?is that related to the code or the server?

please Help....

Thanks in Advance





 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Lalit,
Welcome to CodeRanch!

The classcast looks like a bug in Microsoft's driver. You should be able to avoid that use case though as it looks like a connection leak. Are you closing your connection in a finally block? Are you using a connection pool? What is the minimum size?
 
Lalit Tomar
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks....Yes, am using data sorce.... Poll size min 1 and max 100.......also am close connection in finaly block in my coding...please tell me what i do ?
 
Lalit Tomar
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have alredy replced sqljdbc.jar to sqljdbc4.jar file in websphere 7 for driver class..i have also icrease websphere jvm size default to min 4 gb and max 16 gb.
Please help because i am trouble this problem from last week.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 35279
384
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might try making the minimum pool size 0. This closes connections sooner and might get rid of the "stale" connection issue you are seeing.
 
Lalit Tomar
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
and one another thing ,from last one week that exception is happening in morning after 7:00 am when user trying to access application. but before this was coming monthly once.
 
Lalit Tomar
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



hi anyone please help me ?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic