Cannot register first user



I have problem register first user after fresh installation. Below is my environment information. 

Ganib version: 5.1 (installation through Ganib-5.1.war)

OS: CentOS release 6.6 (Final)

DB: 5.6.26 MySQL Community Server (GPL)

Tomcat Version: 7.0.63

Java version: 

java version "1.7.0_80"
Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)
I was following steps in the README file to perform installation
Please can you help? I've been troubleshooting the problem for days.
Here are few lines of the exception, if you need to full trace please let me know.
=========== checking limit ==========
Class not found exception
Is Valied 1
Error in registration process creation
com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Column 'USER_ID' cannot be null
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
        at java.lang.reflect.Constructor.newInstance(
        at com.mysql.jdbc.Util.handleNewInstance(
        at com.mysql.jdbc.Util.getInstance(
        at com.mysql.jdbc.SQLError.createSQLException(
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(
        at com.mysql.jdbc.MysqlIO.sendCommand(
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(
        at com.mysql.jdbc.ConnectionImpl.execSQL(
        at com.mysql.jdbc.PreparedStatement.executeInternal(
        at com.mysql.jdbc.PreparedStatement.execute(
        at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.execute(
        at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.execute(
        at com.ganib.database.DBBean.executePrepared(
        at org.apache.jsp.newregistration.registerUserProcessing_jsp._jspService(
        at org.apache.jasper.runtime.HttpJspBase.service(
        at javax.servlet.http.HttpServlet.service(
        at org.apache.jasper.servlet.JspServletWrapper.service(
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(


asked Sep 23, 2015 by itcdannykwan (160 points)

1 Answer

0 votes
Root cause identified: I was securely creating a new MySQL user "ganib" intended for use by Ganib application in order to avoid using 'root' user from potential risks. But I found out that Ganib requires this DB user account has specific privilegesj in order to work properly. So at last, I solved the problem by using 'root' user account in context.xml and all worked fine then.
answered Sep 28, 2015 by itcdannykwan (160 points)