> I've had the same thing happen using DBCP and C3PO, I believe its the > driver rather than the pooling. As I said we've a app thats > live, and i > haven't touched it in months using DBCP.
Interesting. Going to C3P0 totally fixed this for me, and I'm using the supposedly stable 3.0 driver. I was getting the *exact* same message. I'm guessing it's a combination of the 2.0 drivers having a longer timeout than the 3.0 drivers do and bad^H^H^H questionable DBCP support in hibernate :-) Marco, please tell us what winds up happening with your app. I'm now very curious. > > [OT] subject change.. Have you had any joy with byte[] to > blob mapping > for file uploads with hibernate 2.1.4? I created a custom > usertype, but > i get a npe. 2.0 delbt with life, but things appear to have taken a > step backwards. (please dont make me go the the scary hibernate forum > :) ) Haven't done it myself. 2.1.x fought with old version of JBuilder, so it's only recently I moved to 2.1.4 Personally I don't trust the database to store my uploaded file data for me, but that's a very uninformed opinion. I trust Hibernate to do most things...but I'm not going to put it into the position of needing to be smarter than I think it can be either. What happens if it inner joins into the table with a blob column in it? How long does it take to retrieve a row with a large blob? I don't know any of this, and it could be no big deal, but it's I've managed to deftly avoid needing the answer :-) That being said...I put the uploaded file onto disk some place and store the location of said file in a VARCHAR. While I hate the forum myself, I strongly suspect if you post a stack trace of an NPE, youre real likely to get an answer from someone on the dev team :-) -Joe > > > On 30 Jul 2004, at 11:34, Joe Hertz wrote: > > > I noticed this behavior with 3.0.14. > > > > This _really_ sounds like this entry in the Hibernate FAQ to me: > > > > http://www.hibernate.org/117.html#A13 > > > > I wouldn't use DBCP though as Gavin King is apparently fed > up with it, > > and built-in support for it is being yanked in the next > major version > > of Hibernate. > > > >> -----Original Message----- > >> From: Marco Mistroni [mailto:[EMAIL PROTECTED] > >> Sent: Friday, July 30, 2004 5:08 AM > >> To: 'Struts Users Mailing List' > >> Subject: RE: OT/ Tomcat, Hibernate and MYSQL problem > >> > >> > >> Hello, > >> If I remember correct, mysql connector 3.0.11 > >> > >> Regards > >> marco > >> > >> -----Original Message----- > >> From: Mark Lowe [mailto:[EMAIL PROTECTED] > >> Sent: 30 July 2004 09:36 > >> To: Struts Users Mailing List > >> Subject: Re: OT/ Tomcat, Hibernate and MYSQL problem > >> > >> Marco > >> > >> What jdbc driver are you using? > >> > >> They was a shady version 3 behaving like this. > >> > >> > >> On 30 Jul 2004, at 10:05, Joe Hertz wrote: > >> > >>> Hibernate's internal connection pooling isn't meant for > production > >>> because it does things just like that. > >>> > >>> Suggest you use c3p0 for the pooling. > >>> > >>>> From my hibernate.cfg.xml, I only had to add this: > >>> > >>> <property name="c3p0.minPoolSize">5</property> > >>> <property name="c3p0.maxPoolSize">20</property> > >>> <property name="c3p0.timeout">1800</property> > >>> <property name="c3p0.max_statement">50</property> > >>> > >>> HTH > >>> > >>> -Joe > >>> > >>> > >>>> -----Original Message----- > >>>> From: Marco Mistroni [mailto:[EMAIL PROTECTED] > >>>> Sent: Friday, July 30, 2004 3:58 AM > >>>> To: 'Struts Users Mailing List' > >>>> Subject: OT/ Tomcat, Hibernate and MYSQL problem > >>>> > >>>> > >>>> Hello, > >>>> > >>>> First of all, I apologize for the off topic issue.. > >>>> I know this is not the list, but I tried hibernate forums, and > >>>> Searched the web with no solution.. hopefully some of u > >> had the Same > >>>> problem and solved it.. > >>>> > >>>> > >>>> I m experiencing problems with Hibernate in tomcat, > >> talking to mysql. > >>>> > >>>> My situation is that I didn't define any connection pools > >> in tomcat, > >>>> but left it to Hibernate to handle that... > >>>> > >>>> After leaving the application running for 11 hours, I got > >> following > >>>> exception > >>>> > >>>> hi all, > >>>> i have a webapp taht uses Hibernate and MYSQL, running on top of > >>>> tomcat. > >>>> > >>>> i am letting Hibernate handle the connections to mysql > db, since i > >>>> have no connection pools defined in tomcat. after running the > >>>> application for nearly 9 hours, when i tried to use my app > >> to connect > >>>> to the database i got following exception: > >>>> > >>>> Caused by: net.sf.hibernate.JDBCException: Could not > >> execute query at > >>>> net.sf.hibernate.impl.SessionImpl.find(SessionImpl.java:1476) > >>>> at net.sf.hibernate.impl.QueryImpl.list(QueryImpl.java:45) > >>>> at com.myapp.hibernate.HibernatePersistenceManager.query(Hibernat > >>>> ePersisten > >>>> ceManager.java:205) > >>>> ... 31 more > >>>> Caused by: java.sql.SQLException: Communication link failure: > >>>> java.net.SocketException, underlying cause: Software caused > >> connection > >>>> abort: recv failed > >>>> > >>>> ** BEGIN NESTED EXCEPTION ** > >>>> > >>>> java.net.SocketException > >>>> MESSAGE: Software caused connection abort: recv failed > >>>> > >>>> STACKTRACE: > >>>> > >>>> java.net.SocketException: Software caused connection abort: recv > >>>> failed > >>>> > >>>> > >>>> > >>>> now i have searched the web and found two possible > >> alternatives.. one > >>>> was to add following problems to hibernate config file.. > <property > >>>> name="connection.autoReconnect">true</property> > >>>> <property name="connection.autoReconnectForPools">true</property> > >>>> <property > >>>> > name="connection.is-connection-validation-required">true</property> > >>>> > >>>> > >>>> but this does not work, as ihave added thos eproperties to > >> hibernate > >>>> properties file and i am still getting same exception > >>>> > >>>> > >>>> then I tried to add ?autoReconnect=true to JBDC URL, but > >> that didn't > >>>> work either coz I left application running for 11 hours > and after > >>>> that I got same exception... > >>>> > >>>> can anyone help me out? > >>>> > >>>> THANX in advance and regards > >>>> marco > >>>> > >>>> > >>>> > >>>> l: [EMAIL PROTECTED] > >>>> > >>>> > >>>> > >> > --------------------------------------------------------------------- > >>>> To unsubscribe, e-mail: [EMAIL PROTECTED] > >>>> For additional commands, e-mail: [EMAIL PROTECTED] > >>>> > >>>> > >>>> > >>> > >>> > >>> > >>> > >> > --------------------------------------------------------------------- > >>> To unsubscribe, e-mail: [EMAIL PROTECTED] > >>> For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > >> > --------------------------------------------------------------------- > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > >> > --------------------------------------------------------------------- > >> To unsubscribe, e-mail: [EMAIL PROTECTED] > >> For additional commands, e-mail: [EMAIL PROTECTED] > >> > >> > >> > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]