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);