• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

java.sql.SQLException: Io exception: Broken pipe

 
Ranch Hand
Posts: 72
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have deployed a war on tomcat server, the first login screen appears without any issue but when I press 'submit' button (submit form), then I get stacktrace screen :


I'm unable to find the cause or solution. I even restarted the server couple of times but this problem still persist.
When I run the same code (from which I have made this war) through eclipse, which connect to the same database server, this page/issue doesn't occur.
Any suggestions are welcome.

nir
 
Ranch Hand
Posts: 179
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can you post some code from your AuthorizationDAO?
 
nir sharma
Ranch Hand
Posts: 72
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


this is some of the code in ' getDBConnection()' which return connection.



this is in my context.xml which provide connection.



hope this helps..
 
Ranch Hand
Posts: 300
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ,

Broken pipe indicates that your database connection has failed. Please check the database connection.

Regards
jatan
 
nir sharma
Ranch Hand
Posts: 72
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

jatan bhavsar wrote:
Broken pipe indicates that your database connection has failed. Please check the database connection.



how should I check the connection?

and as I mentioned, this problem doesn't occur when I run this using eclipse, also this problem wasn't even there till yesterday.
 
jatan bhavsar
Ranch Hand
Posts: 300
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Nir,

Try to check what is the difference when you are running through eclipse and tomcat server.
Are you pointing to the same tomcat when you run application through eclipse?
check for the proepr jdbc driver and jar files. Also divers are compatible or not. check is there nay network issue.
Many possibilites are there.

you can search the follwoing post with the similar issues.

thread1
thread2

Regards
Jatan
 
nir sharma
Ranch Hand
Posts: 72
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the help jatan

jatan bhavsar wrote:
Try to check what is the difference when you are running through eclipse and tomcat server.


No difference here.

jatan bhavsar wrote:
Are you pointing to the same tomcat when you run application through eclipse?


yes.

jatan bhavsar wrote:
check for the proepr jdbc driver and jar files. Also divers are compatible or not. check is there nay network issue.


Drivers and jar are same, as i have deployed many war files in the past, but never showed this problem, also this application through this specific war ran fine for 2 days.
Don't know how to check network issue.

I would like to hear out more possibilities in case this issue keep occurring, because as of now, i have removed re-deployed the same war few minutes back, and for now its working.
Hope the same problem doesn't reappear.
 
jatan bhavsar
Ranch Hand
Posts: 300
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Nir,

I think its the network issue .is your database on remote machine?

To check the for network issue you can ping with the IP address where your database resides.

If the network issue is there then it will give you the request time out in cmd console.

Command to ping is pint -t IP address. Open cmd and then execute ping -t IPaddress.

Regards
jatan
 
nir sharma
Ranch Hand
Posts: 72
Eclipse IDE Tomcat Server Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi jatan,


I think its the network issue .is your database on remote machine?


yes, but connected through lan.
I have already tried 'ping' and there is not problem and never was and i don't think you can detect network issue using ping (not an expert, just a thought) because few times when i have faced some network issue, 'ping' worked fine at that time.

regards
nir
reply
    Bookmark Topic Watch Topic
  • New Topic