Hi Cindy,

I getting deja vu from this...we had a similar problem over a year ago. What happened to us is that our IS&T dept (who run a mysql service) made some changes to their load balancer and pooling configuration on their servers.
You might be running into a similar problem. The solution a coworker figured out was the following: 

1. Edit  the  hibernate.cfg.xml in the /Archivists Toolkit 2.0/src folder.
Starting about line 35:

<property name="hibernate.c3p0.min_size">5</property>
        <!--This maxsize was changed from a 100 to 15 on 8/30/2010-->
        <property name="hibernate.c3p0.max_size">5</property>
        <property name="hibernate.c3p0.timeout">299</property>
        <!--<property name="hibernate.c3p0.max_statements">50</property>-->
        <property name="hibernate.c3p0.idle_test_period">30</property>

2.  add a file named to the src folder with these lines :


You'll have to compile this and replace ArchivistToolkit.jar  in all of your the AT clients with the new version. 
 You might be able to avoid this by using your own MySQL database, which might be easier for you to deploy than compiling the code and updating all the AT clients....


On Oct 6, 2011, at 12:05 PM, Cindy Harper wrote:

> I'm asking you all because it's not clear to me how to interact with the AT
> developers directly - the response back from the ATUG list is rather slow,
> and I'm hoping you can give me a technical explanation a la "no, because..."
> rather than just a "no".
> We're trying to adopt Archivists Toolkit at Colgate. We don't have a Java
> developer in-house, but I'm exploring whether I can learn to address minor
> issues myself.
> We're a small liberal arts college, so library policy is to out-source as
> much infrastructure as possible (meaning open source is generally avoided).
> So the MySQL database is hosted on a Lunarpages server, and I can't adjust
> the timeout at the server level. But I'm suspecting that the timeout we're
> seeing is not a timeout of the given MySQL transaction, but instead a
> problem with Hibernate persistence.  The symptom - we edit a record, proceed
> to child records that require much editing - the chunk of data that my
> people are trying to enter at one time takes over 10 minutes to edit.
> During their editing the child records, an error occurs.  AT has added error
> code to sense that when this is a JDBCConnectionError, then it forces you to
> restart.
>       if(errorText.contains("JDBCConnectionException")) {
>            String message = "Database connection has been lost due to a
> server timeout.\n\n" +
>                "Please RESTART the program to continue.  If the problem
> persists, consult your System Administrator.";
> So what I did was add a "&connectTimeout=3600" parameter to the
> SessionFactory database URL.  But I still seem to have trouble with the
> timeout.
> Now, I acknowledge that understanding Hibernate and how it interacts with
> JDBC and altering code in AT may be getting over my head, and that what I
> probably should try next is either putting the database on my local MS SQL
> Server instance, or my test-server instance of MySQL (I don't have a local
> production instance of MySQL), and abandon the hosted server.
> But can any of you add to my knowledge base here, and tell me:
> - is it possible to correct this problem easily in the AT code?
> - is the JDBCConnectionException due to the MySQL server timeout that is
> set by &connectTimeout?
> - is simply adding a parameter to the database URL an effective way of
> making sure that that parameter is used in each opensession instance?
> - I know I have a lot to learn about hibernate - I've located a book to skim
> in Books24x7 - I'll try wikipedia to get a briefer intial grounding. Any
> other advice?
> Cindy Harper, Systems Librarian
> Colgate University Libraries
> [log in to unmask]
> 315-228-7363