-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 8 posts ] 
Author Message
 Post subject: org.hibernate.exception.ConstraintViolationException:
PostPosted: Sat Aug 26, 2017 12:37 am 
Beginner
Beginner

Joined: Tue Aug 08, 2017 12:14 am
Posts: 44
Hi expert,

My latest attempt is changing to @GeneratedValue(strategy = GenerationType.IDENTITY) and at least I get less error, out of consolation.

But, I hope to get some advice as to how to overcome the following error :

Code:
Aug 26, 2017 11:54:06 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:Hi5S' did not find a matching property.
Aug 26, 2017 11:54:06 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server version:        Apache Tomcat/8.0.29
Aug 26, 2017 11:54:06 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server built:          Nov 20 2015 09:18:00 UTC
Aug 26, 2017 11:54:06 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server number:         8.0.29.0
Aug 26, 2017 11:54:06 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Name:               Windows 7
Aug 26, 2017 11:54:06 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Version:            6.1
Aug 26, 2017 11:54:06 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Architecture:          amd64
Aug 26, 2017 11:54:06 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Java Home:             C:\Program Files\Java\jdk1.8.0_45\jre
Aug 26, 2017 11:54:06 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Version:           1.8.0_45-b15
Aug 26, 2017 11:54:06 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Vendor:            Oracle Corporation
Aug 26, 2017 11:54:06 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_BASE:         C:\Program Files\Apache Software Foundation\Tomcat 8.0
Aug 26, 2017 11:54:06 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_HOME:         C:\Program Files\Apache Software Foundation\Tomcat 8.0
Aug 26, 2017 11:54:06 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:2374
Aug 26, 2017 11:54:06 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.base=C:\Program Files\Apache Software Foundation\Tomcat 8.0
Aug 26, 2017 11:54:06 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.home=C:\Program Files\Apache Software Foundation\Tomcat 8.0
Aug 26, 2017 11:54:06 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dwtp.deploy=C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps
Aug 26, 2017 11:54:06 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.endorsed.dirs=C:\Program Files\Apache Software Foundation\Tomcat 8.0\endorsed
Aug 26, 2017 11:54:06 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dfile.encoding=Cp1252
Aug 26, 2017 11:54:06 AM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.8.0_45\jre\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files\Java\jdk1.8.0_45\jre\bin;C:/Program Files/Java/jre1.8.0_131/bin/server;C:/Program Files/Java/jre1.8.0_131/bin;C:/Program Files/Java/jre1.8.0_131/lib/amd64;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Program Files\Java ; C:\apache-maven-3.3.9-bin\apache-maven-3.3.9\bin;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files\Lenovo\Fingerprint Manager Pro\;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\MySQL\MySQL Utilities 1.6\;C:\Windows; C:\Windows\system32; C:\Program Files\Java\jdk1.7.0_79\bin;C:\Program Files\apache-maven-3.3.9\bin;C:\Users\Karen Goh Seow Hui\Documents\eclipse-jee-mars-2-win32-x86_64\eclipse;;.
Aug 26, 2017 11:54:10 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-nio-8013"]
Aug 26, 2017 11:54:11 AM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
Aug 26, 2017 11:54:11 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-nio-8009"]
Aug 26, 2017 11:54:11 AM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
Aug 26, 2017 11:54:11 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 8600 ms
Aug 26, 2017 11:54:11 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Aug 26, 2017 11:54:11 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/8.0.29
Aug 26, 2017 11:54:19 AM org.apache.jasper.servlet.TldScanner scanJars
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
Aug 26, 2017 11:54:20 AM org.apache.catalina.util.SessionIdGeneratorBase createSecureRandom
INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [1,019] milliseconds.
Aug 26, 2017 11:54:20 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\docs
Aug 26, 2017 11:54:21 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\docs has finished in 453 ms
Aug 26, 2017 11:54:21 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\examples
Aug 26, 2017 11:54:25 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Aug 26, 2017 11:54:25 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Aug 26, 2017 11:54:25 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\examples has finished in 3,906 ms
Aug 26, 2017 11:54:25 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\host-manager
Aug 26, 2017 11:54:25 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\host-manager has finished in 296 ms
Aug 26, 2017 11:54:25 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\manager
Aug 26, 2017 11:54:25 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\manager has finished in 178 ms
Aug 26, 2017 11:54:25 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\ROOT
Aug 26, 2017 11:54:26 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\ROOT has finished in 467 ms
Aug 26, 2017 11:54:26 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-nio-8013"]
Aug 26, 2017 11:54:26 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-nio-8009"]
Aug 26, 2017 11:54:26 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 14631 ms
Aug 26, 2017 12:07:35 PM org.hibernate.Version logVersion
INFO: HHH000412: Hibernate Core {5.2.10.Final}
Aug 26, 2017 12:07:35 PM org.hibernate.cfg.Environment <clinit>
INFO: HHH000206: hibernate.properties not found
Aug 26, 2017 12:07:37 PM org.hibernate.annotations.common.reflection.java.JavaReflectionManager <clinit>
INFO: HCANN000001: Hibernate Commons Annotations {5.0.1.Final}
Aug 26, 2017 12:07:38 PM org.hibernate.engine.jdbc.connections.internal.ConnectionProviderInitiator instantiateC3p0Provider
WARN: HHH000022: c3p0 properties were encountered, but the c3p0 provider class was not found on the classpath; these properties are going to be ignored.
Aug 26, 2017 12:07:38 PM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
WARN: HHH10001002: Using Hibernate built-in connection pool (not for production use!)
Aug 26, 2017 12:07:38 PM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
INFO: HHH10001005: using driver [com.mysql.jdbc.Driver] at URL [jdbc:mysql://localhost:3306/hi5]
Aug 26, 2017 12:07:38 PM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
INFO: HHH10001001: Connection properties: {user=root, password=****, pool_size=true}
Aug 26, 2017 12:07:38 PM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
INFO: HHH10001003: Autocommit mode: false
Aug 26, 2017 12:07:38 PM org.hibernate.engine.jdbc.connections.internal.PooledConnections <init>
INFO: HHH000115: Hibernate connection pool size: 20 (min=1)
Aug 26, 2017 12:07:41 PM org.hibernate.dialect.Dialect <init>
INFO: HHH000400: Using dialect: org.hibernate.dialect.MySQLMyISAMDialect
Aug 26, 2017 12:07:47 PM org.hibernate.resource.transaction.backend.jdbc.internal.DdlTransactionIsolatorNonJtaImpl getIsolatedConnection
INFO: HHH10001501: Connection obtained from JdbcConnectionAccess [org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess@1dd1eb95] for (non-JTA) DDL execution was not in auto-commit mode; the Connection 'local transaction' will be committed and the Connection will be set into auto-commit mode.
Aug 26, 2017 12:07:50 PM org.hibernate.engine.jdbc.spi.SqlExceptionHelper logExceptions
WARN: SQL Error: 1048, SQLState: 23000
Aug 26, 2017 12:07:50 PM org.hibernate.engine.jdbc.spi.SqlExceptionHelper logExceptions
ERROR: Column 'tutorNRIC' cannot be null
org.hibernate.exception.ConstraintViolationException: could not execute statement
   at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:59)
   at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42)
   at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111)
   at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97)
   at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:208)
   at org.hibernate.dialect.identity.GetGeneratedKeysDelegate.executeAndExtract(GetGeneratedKeysDelegate.java:57)
   at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:42)
   at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2909)
   at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3480)
   at org.hibernate.action.internal.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:81)
   at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:626)
   at org.hibernate.engine.spi.ActionQueue.addResolvedEntityInsertAction(ActionQueue.java:280)
   at org.hibernate.engine.spi.ActionQueue.addInsertAction(ActionQueue.java:261)
   at org.hibernate.engine.spi.ActionQueue.addAction(ActionQueue.java:306)
   at org.hibernate.event.internal.AbstractSaveEventListener.addInsertAction(AbstractSaveEventListener.java:318)
   at org.hibernate.event.internal.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:275)
   at org.hibernate.event.internal.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:182)
   at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:113)
   at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:192)
   at org.hibernate.event.internal.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:38)
   at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:177)
   at org.hibernate.event.internal.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:32)
   at org.hibernate.event.internal.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:73)
   at org.hibernate.internal.SessionImpl.fireSave(SessionImpl.java:689)
   at org.hibernate.internal.SessionImpl.save(SessionImpl.java:681)
   at org.hibernate.internal.SessionImpl.save(SessionImpl.java:676)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   at java.lang.reflect.Method.invoke(Method.java:497)
   at org.hibernate.context.internal.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:355)
   at com.sun.proxy.$Proxy33.save(Unknown Source)
   at DAOSql.tutorDAOImpl.insertTutor(tutorDAOImpl.java:63)
   at Business.Manager.insertTutor(Manager.java:24)
   at controller.tutorController.doPost(tutorController.java:128)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
   at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
   at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1096)
   at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:674)
   at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
   at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
   at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
   at java.lang.Thread.run(Thread.java:745)
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Column 'tutorNRIC' cannot be null
   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
   at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
   at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)
   at com.mysql.jdbc.Util.getInstance(Util.java:387)
   at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:934)
   at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3870)
   at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3806)
   at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2470)
   at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2617)
   at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2550)
   at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1861)
   at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2073)
   at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2009)
   at com.mysql.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:5094)
   at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1994)
   at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:205)
   ... 52 more
Aug 26, 2017 12:07:50 PM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl stop
INFO: HHH10001008: Cleaning up connection pool [jdbc:mysql://localhost:3306/hi5]
Aug 26, 2017 12:07:50 PM org.hibernate.engine.jdbc.connections.internal.PooledConnections close
ERROR: Collection leak detected: there are 1 unclosed connections upon shutting down pool jdbc:mysql://localhost:3306/hi5



I have tried many times making sure that I have entered a tutorNRIC that never entered before. I checked my database schema and the fields is indeed indicated with a not null. I searched the stackoverflow for clue but nothing seems to help.

I really don't know who to ask for help already.

Hope someone can advise me how to rectify the problem.

Tks.


Top
 Profile  
 
 Post subject: Re: org.hibernate.exception.ConstraintViolationException:
PostPosted: Sat Aug 26, 2017 1:18 am 
Hibernate Team
Hibernate Team

Joined: Thu Sep 11, 2014 2:50 am
Posts: 1628
Location: Romania
Try adding statement logging as explained in this article.

Then you will know the exact statements that get executed.


Top
 Profile  
 
 Post subject: Re: org.hibernate.exception.ConstraintViolationException:
PostPosted: Mon Aug 28, 2017 11:11 pm 
Beginner
Beginner

Joined: Tue Aug 08, 2017 12:14 am
Posts: 44
vlad wrote:
Try adding statement logging as explained in this article.

Then you will know the exact statements that get executed.


Hi Vlad,

First, thanks for the logging advice. It is a great clue to a novice like me.

Can I know if Log4j2 is it possible to do the job ?

Anyway, here's the latest error which I can't make head or tail out of the stacktrace. Hope you could me give me clue again what is wrong. Also, I realised now that all the schema that I have created manually at MySQL are all gone !!! Help.

Code:
Aug 29, 2017 10:33:47 AM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:Hi5S' did not find a matching property.
Aug 29, 2017 10:33:48 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server version:        Apache Tomcat/8.0.29
Aug 29, 2017 10:33:48 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server built:          Nov 20 2015 09:18:00 UTC
Aug 29, 2017 10:33:48 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Server number:         8.0.29.0
Aug 29, 2017 10:33:48 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Name:               Windows 7
Aug 29, 2017 10:33:48 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: OS Version:            6.1
Aug 29, 2017 10:33:48 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Architecture:          amd64
Aug 29, 2017 10:33:48 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Java Home:             C:\Program Files\Java\jdk1.8.0_45\jre
Aug 29, 2017 10:33:48 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Version:           1.8.0_45-b15
Aug 29, 2017 10:33:48 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: JVM Vendor:            Oracle Corporation
Aug 29, 2017 10:33:48 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_BASE:         C:\Program Files\Apache Software Foundation\Tomcat 8.0
Aug 29, 2017 10:33:48 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: CATALINA_HOME:         C:\Program Files\Apache Software Foundation\Tomcat 8.0
Aug 29, 2017 10:33:48 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:1392
Aug 29, 2017 10:33:48 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.base=C:\Program Files\Apache Software Foundation\Tomcat 8.0
Aug 29, 2017 10:33:48 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dcatalina.home=C:\Program Files\Apache Software Foundation\Tomcat 8.0
Aug 29, 2017 10:33:48 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dwtp.deploy=C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps
Aug 29, 2017 10:33:48 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Djava.endorsed.dirs=C:\Program Files\Apache Software Foundation\Tomcat 8.0\endorsed
Aug 29, 2017 10:33:48 AM org.apache.catalina.startup.VersionLoggerListener log
INFO: Command line argument: -Dfile.encoding=Cp1252
Aug 29, 2017 10:33:48 AM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.8.0_45\jre\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Program Files\Java\jdk1.8.0_45\jre\bin;C:/Program Files/Java/jre1.8.0_131/bin/server;C:/Program Files/Java/jre1.8.0_131/bin;C:/Program Files/Java/jre1.8.0_131/lib/amd64;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Program Files\Java ; C:\apache-maven-3.3.9-bin\apache-maven-3.3.9\bin;C:\Program Files\Microsoft\Web Platform Installer\;C:\Program Files\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\110\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\120\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Microsoft SQL Server\120\DTS\Binn\;C:\Program Files\Lenovo\Fingerprint Manager Pro\;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\DTS\Binn\;C:\Program Files (x86)\Microsoft SQL Server\130\Tools\Binn\ManagementStudio\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\MySQL\MySQL Utilities 1.6\;C:\Windows; C:\Windows\system32; C:\Program Files\Java\jdk1.7.0_79\bin;C:\Program Files\apache-maven-3.3.9\bin;C:\Users\Karen Goh \Documents\eclipse-jee-mars-2-win32-x86_64\eclipse;;.
Aug 29, 2017 10:33:51 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-nio-8013"]
Aug 29, 2017 10:33:54 AM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
Aug 29, 2017 10:33:54 AM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-nio-8009"]
Aug 29, 2017 10:33:54 AM org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
INFO: Using a shared selector for servlet write/read
Aug 29, 2017 10:33:54 AM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 10937 ms
Aug 29, 2017 10:33:55 AM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Aug 29, 2017 10:33:55 AM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/8.0.29
Aug 29, 2017 10:34:00 AM org.apache.jasper.servlet.TldScanner scanJars
INFO: At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
Aug 29, 2017 10:34:03 AM org.apache.catalina.util.SessionIdGeneratorBase createSecureRandom
INFO: Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [2,727] milliseconds.
Aug 29, 2017 10:34:04 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\docs
Aug 29, 2017 10:34:04 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\docs has finished in 377 ms
Aug 29, 2017 10:34:04 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\examples
Aug 29, 2017 10:34:10 AM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Aug 29, 2017 10:34:10 AM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Aug 29, 2017 10:34:10 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\examples has finished in 6,054 ms
Aug 29, 2017 10:34:10 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\host-manager
Aug 29, 2017 10:34:11 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\host-manager has finished in 210 ms
Aug 29, 2017 10:34:11 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\manager
Aug 29, 2017 10:34:11 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\manager has finished in 219 ms
Aug 29, 2017 10:34:11 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\ROOT
Aug 29, 2017 10:34:11 AM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deployment of web application directory C:\Program Files\Apache Software Foundation\Tomcat 8.0\webapps\ROOT has finished in 158 ms
Aug 29, 2017 10:34:11 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-nio-8013"]
Aug 29, 2017 10:34:11 AM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-nio-8009"]
Aug 29, 2017 10:34:11 AM org.apache.catalina.startup.Catalina start
INFO: Server startup in 16865 ms
Aug 29, 2017 10:55:21 AM org.hibernate.Version logVersion
INFO: HHH000412: Hibernate Core {5.2.10.Final}
Aug 29, 2017 10:55:21 AM org.hibernate.cfg.Environment <clinit>
INFO: HHH000206: hibernate.properties not found
Aug 29, 2017 10:55:22 AM util.HibernateUtil <clinit>
INFO: Hibernate Configuration loaded
Aug 29, 2017 10:55:23 AM org.hibernate.annotations.common.reflection.java.JavaReflectionManager <clinit>
INFO: HCANN000001: Hibernate Commons Annotations {5.0.1.Final}
Aug 29, 2017 10:55:24 AM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl configure
WARN: HHH10001002: Using Hibernate built-in connection pool (not for production use!)
Aug 29, 2017 10:55:24 AM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
INFO: HHH10001005: using driver [com.mysql.jdbc.Driver] at URL [jdbc:mysql://localhost:3306/hi5]
Aug 29, 2017 10:55:24 AM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
INFO: HHH10001001: Connection properties: {user=root, password=****, pool.size=1}
Aug 29, 2017 10:55:24 AM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl buildCreator
INFO: HHH10001003: Autocommit mode: false
Aug 29, 2017 10:55:24 AM org.hibernate.engine.jdbc.connections.internal.PooledConnections <init>
INFO: HHH000115: Hibernate connection pool size: 20 (min=1)
Aug 29, 2017 10:55:25 AM org.hibernate.dialect.Dialect <init>
INFO: HHH000400: Using dialect: org.hibernate.dialect.MySQLMyISAMDialect
Hibernate: drop table if exists subject
Aug 29, 2017 10:55:32 AM org.hibernate.resource.transaction.backend.jdbc.internal.DdlTransactionIsolatorNonJtaImpl getIsolatedConnection
INFO: HHH10001501: Connection obtained from JdbcConnectionAccess [org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess@7480b74c] for (non-JTA) DDL execution was not in auto-commit mode; the Connection 'local transaction' will be committed and the Connection will be set into auto-commit mode.
Hibernate: drop table if exists subject_tutor
Hibernate: drop table if exists tutor
Hibernate: drop table if exists tutor_subject
Hibernate: create table subject (sub_id integer not null, subj varchar(255), subjectName tinyblob, primary key (sub_id)) type=MyISAM
Aug 29, 2017 10:55:32 AM org.hibernate.resource.transaction.backend.jdbc.internal.DdlTransactionIsolatorNonJtaImpl getIsolatedConnection
INFO: HHH10001501: Connection obtained from JdbcConnectionAccess [org.hibernate.engine.jdbc.env.internal.JdbcEnvironmentInitiator$ConnectionProviderJdbcConnectionAccess@6ca6afd1] for (non-JTA) DDL execution was not in auto-commit mode; the Connection 'local transaction' will be committed and the Connection will be set into auto-commit mode.
Aug 29, 2017 10:55:32 AM org.hibernate.tool.schema.internal.ExceptionHandlerLoggedImpl handleException
WARN: GenerationTarget encountered exception accepting command : Error executing DDL via JDBC Statement
org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL via JDBC Statement
   at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:67)
   at org.hibernate.tool.schema.internal.SchemaCreatorImpl.applySqlString(SchemaCreatorImpl.java:440)
   at org.hibernate.tool.schema.internal.SchemaCreatorImpl.applySqlStrings(SchemaCreatorImpl.java:424)
   at org.hibernate.tool.schema.internal.SchemaCreatorImpl.createFromMetadata(SchemaCreatorImpl.java:315)
   at org.hibernate.tool.schema.internal.SchemaCreatorImpl.performCreation(SchemaCreatorImpl.java:166)
   at org.hibernate.tool.schema.internal.SchemaCreatorImpl.doCreation(SchemaCreatorImpl.java:135)
   at org.hibernate.tool.schema.internal.SchemaCreatorImpl.doCreation(SchemaCreatorImpl.java:121)
   at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.performDatabaseAction(SchemaManagementToolCoordinator.java:155)
   at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.process(SchemaManagementToolCoordinator.java:72)
   at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:309)
   at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:452)
   at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:710)
   at util.HibernateUtil.<clinit>(HibernateUtil.java:27)
   at DAOSql.tutorDAOImpl.insertTutor(tutorDAOImpl.java:33)
   at Business.Manager.insertTutor(Manager.java:24)
   at controller.tutorController.doPost(tutorController.java:128)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
   at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
   at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1096)
   at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:674)
   at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
   at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
   at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
   at java.lang.Thread.run(Thread.java:745)
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'type=MyISAM' at line 1
   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
   at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
   at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)
   at com.mysql.jdbc.Util.getInstance(Util.java:387)
   at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:941)
   at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3870)
   at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3806)
   at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2470)
   at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2617)
   at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2546)
   at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2504)
   at com.mysql.jdbc.StatementImpl.executeInternal(StatementImpl.java:840)
   at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:740)
   at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:54)
   ... 37 more

Hibernate: create table subject_tutor (subject_sub_id integer not null, tutors_tutor_id integer not null) type=MyISAM
Hibernate: create table tutor (tutor_id integer not null, tutorNRIC varchar(255), tutorAddress1 varchar(255), tutorAddress2 varchar(255), tutorAge integer, tutorRates varchar(255), tutorContactNo varchar(255), tutorEmail varchar(255), tutorGender varchar(255), tutorName varchar(255), tutorQualification varchar(255), tutorQualficationDetail varchar(255), tutorRemarks varchar(255), subjMany tinyblob, zipcode varchar(255), primary key (tutor_id)) type=MyISAM
Aug 29, 2017 10:55:32 AM org.hibernate.tool.schema.internal.ExceptionHandlerLoggedImpl handleException
WARN: GenerationTarget encountered exception accepting command : Error executing DDL via JDBC Statement
org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL via JDBC Statement
   at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:67)
   at org.hibernate.tool.schema.internal.SchemaCreatorImpl.applySqlString(SchemaCreatorImpl.java:440)
   at org.hibernate.tool.schema.internal.SchemaCreatorImpl.applySqlStrings(SchemaCreatorImpl.java:424)
   at org.hibernate.tool.schema.internal.SchemaCreatorImpl.createFromMetadata(SchemaCreatorImpl.java:315)
   at org.hibernate.tool.schema.internal.SchemaCreatorImpl.performCreation(SchemaCreatorImpl.java:166)
   at org.hibernate.tool.schema.internal.SchemaCreatorImpl.doCreation(SchemaCreatorImpl.java:135)
   at org.hibernate.tool.schema.internal.SchemaCreatorImpl.doCreation(SchemaCreatorImpl.java:121)
   at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.performDatabaseAction(SchemaManagementToolCoordinator.java:155)
   at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.process(SchemaManagementToolCoordinator.java:72)
   at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:309)
   at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:452)
   at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:710)
   at util.HibernateUtil.<clinit>(HibernateUtil.java:27)
   at DAOSql.tutorDAOImpl.insertTutor(tutorDAOImpl.java:33)
   at Business.Manager.insertTutor(Manager.java:24)
   at controller.tutorController.doPost(tutorController.java:128)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
   at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
   at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1096)
   at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:674)
   at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
   at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
   at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
   at java.lang.Thread.run(Thread.java:745)
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'type=MyISAM' at line 1
   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
   at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
   at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)
   at com.mysql.jdbc.Util.getInstance(Util.java:387)
   at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:941)
   at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3870)
   at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3806)
   at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2470)
   at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2617)
   at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2546)
   at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2504)
   at com.mysql.jdbc.StatementImpl.executeInternal(StatementImpl.java:840)
   at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:740)
   at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:54)
   ... 37 more

Aug 29, 2017 10:55:32 AM org.hibernate.tool.schema.internal.ExceptionHandlerLoggedImpl handleException
WARN: GenerationTarget encountered exception accepting command : Error executing DDL via JDBC Statement
org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL via JDBC Statement
   at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:67)
   at org.hibernate.tool.schema.internal.SchemaCreatorImpl.applySqlString(SchemaCreatorImpl.java:440)
   at org.hibernate.tool.schema.internal.SchemaCreatorImpl.applySqlStrings(SchemaCreatorImpl.java:424)
   at org.hibernate.tool.schema.internal.SchemaCreatorImpl.createFromMetadata(SchemaCreatorImpl.java:315)
   at org.hibernate.tool.schema.internal.SchemaCreatorImpl.performCreation(SchemaCreatorImpl.java:166)
   at org.hibernate.tool.schema.internal.SchemaCreatorImpl.doCreation(SchemaCreatorImpl.java:135)
   at org.hibernate.tool.schema.internal.SchemaCreatorImpl.doCreation(SchemaCreatorImpl.java:121)
   at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.performDatabaseAction(SchemaManagementToolCoordinator.java:155)
   at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.process(SchemaManagementToolCoordinator.java:72)
   at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:309)
   at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:452)
   at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:710)
   at util.HibernateUtil.<clinit>(HibernateUtil.java:27)
   at DAOSql.tutorDAOImpl.insertTutor(tutorDAOImpl.java:33)
   at Business.Manager.insertTutor(Manager.java:24)
   at controller.tutorController.doPost(tutorController.java:128)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
   at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
   at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1096)
   at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:674)
   at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
   at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
   at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
   at java.lang.Thread.run(Thread.java:745)

Hibernate: create table tutor_subject (tutor_tutor_id integer not null, subjects_sub_id integer not null) type=MyISAM
Hibernate: alter table subject_tutor add constraint UK_hsjysbadrxe9dobqxh09sudcs unique (tutors_tutor_id)
Aug 29, 2017 10:55:32 AM org.hibernate.tool.schema.internal.ExceptionHandlerLoggedImpl handleException
WARN: GenerationTarget encountered exception accepting command : Error executing DDL via JDBC Statement
org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL via JDBC Statement
   at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:67)
   at org.hibernate.tool.schema.internal.SchemaCreatorImpl.applySqlString(SchemaCreatorImpl.java:440)
   at org.hibernate.tool.schema.internal.SchemaCreatorImpl.applySqlStrings(SchemaCreatorImpl.java:424)
   at org.hibernate.tool.schema.internal.SchemaCreatorImpl.createFromMetadata(SchemaCreatorImpl.java:315)
   at org.hibernate.tool.schema.internal.SchemaCreatorImpl.performCreation(SchemaCreatorImpl.java:166)
   at org.hibernate.tool.schema.internal.SchemaCreatorImpl.doCreation(SchemaCreatorImpl.java:135)
   at org.hibernate.tool.schema.internal.SchemaCreatorImpl.doCreation(SchemaCreatorImpl.java:121)
   at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.performDatabaseAction(SchemaManagementToolCoordinator.java:155)
   at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.process(SchemaManagementToolCoordinator.java:72)
   at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:309)
   at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:452)
   at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:710)
   at util.HibernateUtil.<clinit>(HibernateUtil.java:27)
   at DAOSql.tutorDAOImpl.insertTutor(tutorDAOImpl.java:33)
   at Business.Manager.insertTutor(Manager.java:24)
   at controller.tutorController.doPost(tutorController.java:128)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
   at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
   at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1096)
   at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:674)
   at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
   at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
   at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
   at java.lang.Thread.run(Thread.java:745)
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'type=MyISAM' at line 1
   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
   at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
   at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)
   at com.mysql.jdbc.Util.getInstance(Util.java:387)
   at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:941)
   at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3870)
   at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3806)
   at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2470)
   at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2617)
   at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2546)
   at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2504)
   at com.mysql.jdbc.StatementImpl.executeInternal(StatementImpl.java:840)
   at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:740)
   at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:54)
   ... 37 more

Hibernate: alter table subject_tutor add constraint FKlvadtd1mhbtos4ay74cbv9wyt foreign key (tutors_tutor_id) references tutor (tutor_id)
Aug 29, 2017 10:55:32 AM org.hibernate.tool.schema.internal.ExceptionHandlerLoggedImpl handleException
WARN: GenerationTarget encountered exception accepting command : Error executing DDL via JDBC Statement
org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL via JDBC Statement
   at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:67)
   at org.hibernate.tool.schema.internal.SchemaCreatorImpl.applySqlString(SchemaCreatorImpl.java:440)
   at org.hibernate.tool.schema.internal.SchemaCreatorImpl.applySqlStrings(SchemaCreatorImpl.java:424)
   at org.hibernate.tool.schema.internal.SchemaCreatorImpl.createFromMetadata(SchemaCreatorImpl.java:349)
   at org.hibernate.tool.schema.internal.SchemaCreatorImpl.performCreation(SchemaCreatorImpl.java:166)
   at org.hibernate.tool.schema.internal.SchemaCreatorImpl.doCreation(SchemaCreatorImpl.java:135)
   at org.hibernate.tool.schema.internal.SchemaCreatorImpl.doCreation(SchemaCreatorImpl.java:121)
   at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.performDatabaseAction(SchemaManagementToolCoordinator.java:155)
   at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.process(SchemaManagementToolCoordinator.java:72)
   at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:309)
   at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:452)
   at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:710)
   at util.HibernateUtil.<clinit>(HibernateUtil.java:27)
   at DAOSql.tutorDAOImpl.insertTutor(tutorDAOImpl.java:33)
   at Business.Manager.insertTutor(Manager.java:24)
   at controller.tutorController.doPost(tutorController.java:128)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
   at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
   at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1096)
   at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:674)
   at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
   at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
   at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
   at java.lang.Thread.run(Thread.java:745)
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'hi5.subject_tutor' doesn't exist
   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
   at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
   at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)
   at com.mysql.jdbc.Util.getInstance(Util.java:387)
   at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:941)
   at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3870)
   at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3806)
   at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2470)
   at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2617)
   at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2546)
   at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2504)
   at com.mysql.jdbc.StatementImpl.executeInternal(StatementImpl.java:840)
   at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:740)
   at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:54)
   ... 37 more

Aug 29, 2017 10:55:32 AM org.hibernate.tool.schema.internal.ExceptionHandlerLoggedImpl handleException
WARN: GenerationTarget encountered exception accepting command : Error executing DDL via JDBC Statement
org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL via JDBC Statement
   at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:67)
   at org.hibernate.tool.schema.internal.SchemaCreatorImpl.applySqlString(SchemaCreatorImpl.java:440)
   at org.hibernate.tool.schema.internal.SchemaCreatorImpl.applySqlStrings(SchemaCreatorImpl.java:424)
   at org.hibernate.tool.schema.internal.SchemaCreatorImpl.createFromMetadata(SchemaCreatorImpl.java:375)
   at org.hibernate.tool.schema.internal.SchemaCreatorImpl.performCreation(SchemaCreatorImpl.java:166)
   at org.hibernate.tool.schema.internal.SchemaCreatorImpl.doCreation(SchemaCreatorImpl.java:135)
   at org.hibernate.tool.schema.internal.SchemaCreatorImpl.doCreation(SchemaCreatorImpl.java:121)
   at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.performDatabaseAction(SchemaManagementToolCoordinator.java:155)
   at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.process(SchemaManagementToolCoordinator.java:72)
   at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:309)
   at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:452)
   at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:710)
   at util.HibernateUtil.<clinit>(HibernateUtil.java:27)
   at DAOSql.tutorDAOImpl.insertTutor(tutorDAOImpl.java:33)
   at Business.Manager.insertTutor(Manager.java:24)
   at controller.tutorController.doPost(tutorController.java:128)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
   at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
   at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1096)
   at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:674)
   at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
   at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
   at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
   at java.lang.Thread.run(Thread.java:745)
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'hi5.subject_tutor' doesn't exist
   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
   at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
   at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)
   at com.mysql.jdbc.Util.getInstance(Util.java:387)
   at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:941)
   at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3870)
   at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3806)
   at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2470)
   at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2617)
   at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2546)
   at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2504)
   at com.mysql.jdbc.StatementImpl.executeInternal(StatementImpl.java:840)
   at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:740)
   at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:54)
   ... 37 more

Hibernate: alter table subject_tutor add constraint FK8dm148922fieuijbd2hskn4o4 foreign key (subject_sub_id) references subject (sub_id)
Hibernate: alter table tutor_subject add constraint FKdvfgnj7eilcs7nvovpfe9koah foreign key (subjects_sub_id) references subject (sub_id)
Aug 29, 2017 10:55:32 AM org.hibernate.tool.schema.internal.ExceptionHandlerLoggedImpl handleException
WARN: GenerationTarget encountered exception accepting command : Error executing DDL via JDBC Statement
org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL via JDBC Statement
   at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:67)
   at org.hibernate.tool.schema.internal.SchemaCreatorImpl.applySqlString(SchemaCreatorImpl.java:440)
   at org.hibernate.tool.schema.internal.SchemaCreatorImpl.applySqlStrings(SchemaCreatorImpl.java:424)
   at org.hibernate.tool.schema.internal.SchemaCreatorImpl.createFromMetadata(SchemaCreatorImpl.java:375)
   at org.hibernate.tool.schema.internal.SchemaCreatorImpl.performCreation(SchemaCreatorImpl.java:166)
   at org.hibernate.tool.schema.internal.SchemaCreatorImpl.doCreation(SchemaCreatorImpl.java:135)
   at org.hibernate.tool.schema.internal.SchemaCreatorImpl.doCreation(SchemaCreatorImpl.java:121)
   at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.performDatabaseAction(SchemaManagementToolCoordinator.java:155)
   at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.process(SchemaManagementToolCoordinator.java:72)
   at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:309)
   at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:452)
   at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:710)
   at util.HibernateUtil.<clinit>(HibernateUtil.java:27)
   at DAOSql.tutorDAOImpl.insertTutor(tutorDAOImpl.java:33)
   at Business.Manager.insertTutor(Manager.java:24)
   at controller.tutorController.doPost(tutorController.java:128)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
   at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
   at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1096)
   at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:674)
   at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
   at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
   at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
   at java.lang.Thread.run(Thread.java:745)

Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'hi5.tutor_subject' doesn't exist
   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
   at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
   at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)
   at com.mysql.jdbc.Util.getInstance(Util.java:387)
   at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:941)
   at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3870)
   at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3806)
   at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2470)
   at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2617)
   at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2546)
   at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2504)
   at com.mysql.jdbc.StatementImpl.executeInternal(StatementImpl.java:840)
   at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:740)
   at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:54)
   ... 37 more

Hibernate: alter table tutor_subject add constraint FKte2b4cu7991vvpa2lt8ycai6k foreign key (tutor_tutor_id) references tutor (tutor_id)
Aug 29, 2017 10:55:32 AM org.hibernate.tool.schema.internal.ExceptionHandlerLoggedImpl handleException
WARN: GenerationTarget encountered exception accepting command : Error executing DDL via JDBC Statement
org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL via JDBC Statement
   at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:67)
   at org.hibernate.tool.schema.internal.SchemaCreatorImpl.applySqlString(SchemaCreatorImpl.java:440)
   at org.hibernate.tool.schema.internal.SchemaCreatorImpl.applySqlStrings(SchemaCreatorImpl.java:424)
   at org.hibernate.tool.schema.internal.SchemaCreatorImpl.createFromMetadata(SchemaCreatorImpl.java:375)
   at org.hibernate.tool.schema.internal.SchemaCreatorImpl.performCreation(SchemaCreatorImpl.java:166)
   at org.hibernate.tool.schema.internal.SchemaCreatorImpl.doCreation(SchemaCreatorImpl.java:135)
   at org.hibernate.tool.schema.internal.SchemaCreatorImpl.doCreation(SchemaCreatorImpl.java:121)
   at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.performDatabaseAction(SchemaManagementToolCoordinator.java:155)
   at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.process(SchemaManagementToolCoordinator.java:72)
   at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:309)
   at org.hibernate.boot.internal.SessionFactoryBuilderImpl.build(SessionFactoryBuilderImpl.java:452)
   at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:710)
   at util.HibernateUtil.<clinit>(HibernateUtil.java:27)
   at DAOSql.tutorDAOImpl.insertTutor(tutorDAOImpl.java:33)
   at Business.Manager.insertTutor(Manager.java:24)
   at controller.tutorController.doPost(tutorController.java:128)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
   at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
   at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
   at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
   at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
   at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
   at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
   at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
   at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
   at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
   at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:518)
   at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1096)
   at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:674)
   at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500)
   at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
   at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
   at java.lang.Thread.run(Thread.java:745)
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'hi5.tutor_subject' doesn't exist
   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
   at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
   at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)
   at com.mysql.jdbc.Util.getInstance(Util.java:387)
   at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:941)
   at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3870)
   at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3806)
   at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2470)
   at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2617)
   at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2546)
   at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2504)
   at com.mysql.jdbc.StatementImpl.executeInternal(StatementImpl.java:840)
   at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:740)
   at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:54)
   ... 37 more

Aug 29, 2017 10:55:32 AM org.hibernate.tool.schema.internal.SchemaCreatorImpl applyImportSources
INFO: HHH000476: Executing import script 'org.hibernate.tool.schema.internal.exec.ScriptSourceInputNonExistentImpl@37b4539a'
Aug 29, 2017 10:55:32 AM util.HibernateUtil <clinit>
INFO: sessionFactory created.
Hibernate: insert into tutor (tutorNRIC, tutorAddress1, tutorAddress2, tutorAge, tutorRates, tutorContactNo, tutorEmail, tutorGender, tutorName, tutorQualification, tutorQualficationDetail, tutorRemarks, subjMany, zipcode, tutor_id) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
Aug 29, 2017 10:55:34 AM org.hibernate.engine.jdbc.spi.SqlExceptionHelper logExceptions
WARN: SQL Error: 1146, SQLState: 42S02
Aug 29, 2017 10:55:34 AM org.hibernate.engine.jdbc.spi.SqlExceptionHelper logExceptions
ERROR: Table 'hi5.tutor' doesn't exist
Aug 29, 2017 10:55:34 AM org.hibernate.engine.jdbc.batch.internal.AbstractBatchImpl release
INFO: HHH000010: On release of batch it still contained JDBC statements
Aug 29, 2017 10:55:34 AM org.hibernate.internal.ExceptionMapperStandardImpl mapManagedFlushFailure
ERROR: HHH000346: Error during managed flush [org.hibernate.exception.SQLGrammarException: could not execute statement]
javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute statement
   at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:147)
   at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:155)
   at org.hibernate.internal.ExceptionConverterImpl.convert(ExceptionConverterImpl.java:162)
   at org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1441)
   at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:491)
   at org.hibernate.internal.SessionImpl.flushBeforeTransactionCompletion(SessionImpl.java:3201)
   at org.hibernate.internal.SessionImpl.beforeTransactionCompletion(SessionImpl.java:2411)
   at org.hibernate.engine.jdbc.internal.JdbcCoordinatorImpl.beforeTransactionCompletion(JdbcCoordinatorImpl.java:467)
   at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcResourceLocalTransactionCoordinatorImpl.beforeCompletionCallback(JdbcResourceLocalTransactionCoordinatorImpl.java:146)
   
Caused by: org.hibernate.exception.SQLGrammarException: could not execute statement
   at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:63)
   at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42)
   at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111)
   at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97)
   at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:208)
   at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:45)
   at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3003)
   at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3503)
   at org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:89)
   at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:589)
   at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:463)
   at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:337)
   at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:39)
   at org.hibernate.internal.SessionImpl.doFlush(SessionImpl.java:1435)
   ... 33 more
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'hi5.tutor' doesn't exist
   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
   at java.lang.reflect.Constructor.newInstance(Constructor.java:422)
   at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)
   at com.mysql.jdbc.Util.getInstance(Util.java:387)
   at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:941)
   at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3870)
   at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3806)
   at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2470)
   at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2617)
   at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2550)
   at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1861)
   at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2073)
   at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2009)
   at com.mysql.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:5094)
   at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1994)
   at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:205)
   ... 42 more
Aug 29, 2017 10:55:34 AM org.hibernate.engine.jdbc.connections.internal.DriverManagerConnectionProviderImpl stop
INFO: HHH10001008: Cleaning up connection pool [jdbc:mysql://localhost:3306/hi5]




Top
 Profile  
 
 Post subject: Re: org.hibernate.exception.ConstraintViolationException:
PostPosted: Tue Aug 29, 2017 1:33 am 
Hibernate Team
Hibernate Team

Joined: Thu Sep 11, 2014 2:50 am
Posts: 1628
Location: Romania
Quote:
Also, I realized now that all the schema that I have created manually at MySQL are all gone !!!


That's because you use the hbm2ddl to recreate the schema. Unless you read the Hibernate User Guide, you are going to make many such mistakes.

So, start with the User Guide and continue with these tutorials and you'll find all the answers.


Top
 Profile  
 
 Post subject: Re: org.hibernate.exception.ConstraintViolationException:
PostPosted: Tue Aug 29, 2017 7:59 am 
Beginner
Beginner

Joined: Tue Aug 08, 2017 12:14 am
Posts: 44
vlad wrote:
Quote:
Also, I realized now that all the schema that I have created manually at MySQL are all gone !!!


That's because you use the hbm2ddl to recreate the schema. Unless you read the Hibernate User Guide, you are going to make many such mistakes.

So, start with the User Guide and continue with these tutorials and you'll find all the answers.


Thank you. Vlad has told me to use Update and I was wondering why it could be wrong.

I have copied and pasted another person's cfg.xml file and he has used 'create'. So sorry guys I have posted something without going thru carefully. It makes me wonder if I am really suitable to do 'programming'...

Thanks and so sorry for the trouble I have created.


Top
 Profile  
 
 Post subject: Re: org.hibernate.exception.ConstraintViolationException:
PostPosted: Tue Aug 29, 2017 10:31 am 
Hibernate Team
Hibernate Team

Joined: Thu Sep 11, 2014 2:50 am
Posts: 1628
Location: Romania
Hb2ddl is only suitable for prototyping and update is a much safer choice than create.

Not only that I've done thousands of mistakes myself, but I'll do other mistakes in the future as well. As long as you are learning from them, it's all part of the game. If you enjoy programming, then you know you have made the right choice. Happy coding.


Top
 Profile  
 
 Post subject: Re: org.hibernate.exception.ConstraintViolationException:
PostPosted: Wed Aug 30, 2017 2:43 am 
Beginner
Beginner

Joined: Tue Aug 08, 2017 12:14 am
Posts: 44
vlad wrote:
Hb2ddl is only suitable for prototyping and update is a much safer choice than create.

Not only that I've done thousands of mistakes myself, but I'll do other mistakes in the future as well. As long as you are learning from them, it's all part of the game. If you enjoy programming, then you know you have made the right choice. Happy coding.


Thanks Vlad, I have recommended your book to the national library board and hopefully they will buy many copies :)

Regarding the proxy source that you mentioned, do I just drop the entire files to the source folder in my Eclipse in order to use it ?


Top
 Profile  
 
 Post subject: Re: org.hibernate.exception.ConstraintViolationException:
PostPosted: Wed Aug 30, 2017 4:15 am 
Hibernate Team
Hibernate Team

Joined: Thu Sep 11, 2014 2:50 am
Posts: 1628
Location: Romania
Quote:
Thanks Vlad, I have recommended your book to the national library board and hopefully they will buy many copies :)


Woohoo!

Quote:
Regarding the proxy source that you mentioned, do I just drop the entire files to the source folder in my Eclipse in order to use it ?


Do you mean the datasource-proxy configuration? Usually, if you have config files, they go to the src/main/resources folder. That's a Maven config convention and works no matter what IDE you might be using.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 8 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.