Unable to Connect database

1,801 views

i m trying to install Ganib ver2.2 and recently ver2.3 with no success for three days now !!!

i get " Unable to Connect database " all the time ... i very sure of the inserted credentials ( username and password and database name ) in th econtext.xml file ...

here is extracts from the ganib log file :

2014-02-20 02:50:40,168 ERROR [com.ganib.hibernate.LoadHibernate] - could not load an entity: [com.ganib.hibernate.model.PnPerson#1]; nested exception is org.hibernate.exception.SQLGrammarException: could not load an entity: [com.ganib.hibernate.model.PnPerson#1]

2014-02-20 02:50:47,090 INFO [com.ganib.brand.BrandManager] - BrandManager.getBrandForHostname() threw an SQLException: 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 'OPTION SQL_SELECT_LIMIT=DEFAULT' at line 1
2014-02-20 02:50:47,100 ERROR [com.ganib.brand.Brand] - Brand.loadProperties() Unable to load brand from database.  This error often indicates the database could not be accessed.  Please check your database configuration or contract your system administrator. 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 'OPTION SQL_SELECT_LIMIT=DEFAULT' at line 1
2014-02-20 02:51:37,495 ERROR [org.quartz.impl.jdbcjobstore.JobStoreTX] - MisfireHandler: Error handling misfires: Database error recovering from misfires.
org.quartz.JobPersistenceException: Database error recovering from misfires. [See nested exception: 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 'OPTION SQL_SELECT_LIMIT=DEFAULT' at line 1]
at org.quartz.impl.jdbcjobstore.JobStoreSupport.doRecoverMisfires(JobStoreSupport.java:3197)
at org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.manage(JobStoreSupport.java:3947)
at org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.run(JobStoreSupport.java:3968)
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 'OPTION SQL_SELECT_LIMIT=DEFAULT' at line 1
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
at com.mysql.jdbc.Util.getInstance(Util.java:381)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1030)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3515)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3447)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1951)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2101)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2548)
at com.mysql.jdbc.StatementImpl.executeSimpleNonQuery(StatementImpl.java:1502)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1896)
at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)
at org.apache.tomcat.dbcp.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)
at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.countMisfiredTriggersInState(StdJDBCDelegate.java:416)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.doRecoverMisfires(JobStoreSupport.java:3176)

Please Helpppppppp

asked Feb 19, 2014 by wael_sh (120 points)

1 Answer

+1 vote

Hi,

Please follow the below steps

1) Download mysql connector Zip from below url
 http://cdn.mysql.com/Downloads/Connector-J/mysql-connector-java-5.1.29.zip
2) Extract the zip
3) Go to tomcat-home/lib
4) Now Delete mysql-connector-java-x.x.xx.jar
5) Now copy the latest jar extracted from the zip over there
6) Re-start tomcat

Now the problem you face might be resolved, It at all.. you are facing same problem.. please provide the below details so that we can help you better
 

a) Your Mysql version:
b) OS:
c)Ganib Version:

 

If you are using Ganib War file.. Please provide your tomcat version as well

 

Thanks,

 

Jaclyn

Jaclyn N,
Ganib Support Team, Ganib Inc.
Free Signup | Free Download | Documentation
Skype ID: ganib.support
Email: support@ganib.com

 

answered Feb 20, 2014 by Jaclyn (18,310 points)
edited Feb 20, 2014 by Jaclyn
thank you so much ... it works finally ... appreciate your support
...