aspose file tools*
The moose likes JDBC and the fly likes Getting Error while using MySQL 5.6 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Getting Error while using MySQL 5.6" Watch "Getting Error while using MySQL 5.6" New topic
Author

Getting Error while using MySQL 5.6

Nirav Belani
Greenhorn

Joined: May 31, 2011
Posts: 3

Hello Friends,

I am trying to build an application with MySQL 5.6. I am using Athena Framework in order to develop a cloud application. On the Athena Console, I am getting following MySQL error:

EO config file loaded successfully.
Creating database: employeedir ...
Database created successfully.
Initializing metadata setup in database: employeedir ...
Error: 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=innodb' at line 37

Can anyone please help me with this and guide me where and what to change?

Thanks,
Nirav Belani
Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3855

Welcome to the Ranch!

What SQL's are you executing here? Are you setting InnoDB explicitly.


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
Nirav Belani
Greenhorn

Joined: May 31, 2011
Posts: 3

Thanks a lot Vijitha for your reply.! It feels great when your query is heard.

I am using Athena framework which is enterprise object-relational mapping (ORM) framework that employs metadata as mapping configuration. Athena has built-in support for multi-tenancy which enables developers to build cloud applications.

At first step, Athena creates a database and at second step it initializes the metadata. I am getting this Error while Athena framework tries to initialize the meta-data for the database. So, I am having hard time to find out which particular SQL is giving me this error.

I am trying to de-compile all the Athena jar files and looking at the code but it is really testing me out..
Nirav Belani
Greenhorn

Joined: May 31, 2011
Posts: 3

I found the class where TYPE=innodb is set. The class is MySQL.java and method is sqlCreateTable. Here is the method code:

Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3855

Please UseCodeTags when posting code in the forums....
At first step, Athena creates a database and at second step it initializes the metadata. I am getting this Error while Athena framework tries to initialize the meta-data for the database. So, I am having hard time to find out which particular SQL is giving me this error.

I haven't use this particular framework though. But I think there must (most probably) be a way that you can inspect the generated SQL by the framework (by logging/tracing etc...). Have you checked the documentation for this? There even might be some compatible versions of RDBMS of each vendor for different versions of the framework.
I am trying to de-compile all the Athena jar files and looking at the code but it is really testing me out...

You can see them for academic purpose of course. But I don't think it would help solving this kind of problem (unless its not properly documented and you might get some tips by looking at the source, but most people would not use that kind of library anyway). Because you can't easily change a framework like this. Looking at the code it's hard to tell anything because it depends on many utility methods/configuration files etc... Best option would be look at the documentation or any other guide(s) available. It should tell you how to set the values and what to expect.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Getting Error while using MySQL 5.6