Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-8669

Dot character is not supported in DB schema name in Hibernate Configuration

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Minor Minor
    • 3.3.0.M3
    • None
    • hibernate
    • None
    • Low

      1/ Create a schema on MySQL called: myschema.domain
      2/ Create a JPA project
      3/ Create an entity called myEntity
      4/ Create The corresponding Table (via generated script)
      5/ Configure Data Source Explorer to the connection => This works well
      6/ Configure Hibernate explorer (using above connection)
      7/ Try to open the Database part of this view => you get an SQL exception:

      org.hibernate.exception.SQLGrammarException: Could not get list of suggested identity strategies from database. Probably a JDBC driver problem.
      (...)
      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 '.DOMAIN like 'myentity'' at line 1
      (...)

      Hint:
      I just checked the SQL query (via MySQL proxy) and it lacks `` around the schema name in one query:
      show table status from MYSCHEMA.DOMAIN like 'myentity'

      Just replace dot by underscore and everything works well.

            manderse@redhat.com Max Andersen
            _boris__jira Boris Na (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: