• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Getting Error while using MySQL 5.6

 
Greenhorn
Posts: 3
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Bartender
Posts: 4116
72
Mac TypeScript Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch!

What SQL's are you executing here? Are you setting InnoDB explicitly.
 
Nirav Belani
Greenhorn
Posts: 3
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 3
Eclipse IDE Oracle Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 4116
72
Mac TypeScript Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
What are you doing in my house? Get 'em tiny ad!
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic