Cannot register first user

209 views

  Hi,

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.
 
/ganib/newregistration/registerUser.jsp
=========== 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(NativeConstructorAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:408)
        at com.mysql.jdbc.Util.getInstance(Util.java:383)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1049)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4208)
        at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4140)
        at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2597)
        at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2758)
        at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2826)
        at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2082)
        at com.mysql.jdbc.PreparedStatement.execute(PreparedStatement.java:1302)
        at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
        at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.execute(DelegatingPreparedStatement.java:172)
        at com.ganib.database.DBBean.executePrepared(DBBean.java:744)
        at org.apache.jsp.newregistration.registerUserProcessing_jsp._jspService(registerUserProcessing_jsp.java:526)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:439)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:395)

 

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