No operations allowed after connection closed.

Hi
I am using below hibernate configuration.
But on server i’m getting “SQL Error: 0, SQLState: 08003” error in my log file.
Can u please help why i’m getting this and also “could not prepare statement”
error is coming on server.
please let me know about config changes

configuration.setProperty("hibernate.connection.url", "jdbc:mysql://" + URL);
configuration.setProperty("hibernate.dialect", "org.hibernate.dialect.MySQLDialect");
configuration.setProperty("hibernate.connection.username", USER_NAME);
configuration.setProperty("hibernate.connection.password", PASSWORD);
configuration.setProperty("hibernate.connection.driver_class", "com.mysql.jdbc.Driver");
configuration.setProperty("hibernate.hbm2ddl.auto", "update");
configuration.setProperty("hibernate.connection.isolation", "2");
/* Disable the second-level cache */
configuration.setProperty("cache.provider_class", "org.hibernate.cache.NoCacheProvider");
/* Enable Hibernate's automatic session context management */
configuration.setProperty("current_session_context_class", "thread");
configuration.setProperty("hibernate.connection.provide_class", "org.hibernate.c3p0.internal.C3P0ConnectionProvider");
configuration.setProperty("hibernate.c3p0.numHelperThreads", "100");
configuration.setProperty("hibernate.c3p0.max_size", "300");
configuration.setProperty("hibernate.c3p0.min_size", "1");
configuration.setProperty("hibernate.c3p0.acquire_increment", "1");
configuration.setProperty("hibernate.c3p0.idle_test_period", "300");
configuration.setProperty("hibernate.c3p0.max_statements", "0");
configuration.setProperty("hibernate.c3p0.timeout", "360");
configuration.setProperty("hibernate.c3p0.initialPoolSize", "1");
configuration.setProperty("hibernate.c3p0.maxPoolSize", "30");
configuration.setProperty("hibernate.c3p0.minPoolSize", "1");

configuration.setProperty("hibernate.connection.autoReconnect", "true");
configuration.setProperty("hibernate.connection.autoReconnectForPools", "true");

configuration.addAnnotatedClass(CustomFormLearnerProfile.class);
configuration.addAnnotatedClass(CustomFormLES.class);
configuration.addAnnotatedClass(CustomFormStudents.class);
configuration.addAnnotatedClass(CustomFormTeachers.class);

One thing that stands out to me is you’re setting hibernate.connection.provide_class rather than hibernate.connection.provider_class. I wonder if that is the reason as this would cause Hibernate to use the built-in connection pooling mechanism which is not recommended for anything outside of development and testing.

Could you change that configuration setting for me and see if you continue to have the same problems?