2016-12-14 5 views
-3

休止状態のプログラムでプログラミング中に以下の例外が発生しましたcom.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorExceptioncom.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorExceptionチェックを要求するハイバーネーションプログラムでmysqlバージョン

MySqlのバージョンは5.7.9で、私の方言はorg.hibernate.dialect.MySQLDialectです。

+0

私もorg.hibernate.dialect.MySQL5Dialectで試してみました 'org.hibernate.dialect.MySQL5Dialect' – SachinSarawgi

+0

てみたが、それはまだあなたのエラー・スタックとJDBCの設定を投稿してください –

+1

を来エラー。 – SachinSarawgi

答えて

0

SessionFactoryオブジェクトを作成するには、次のコードスニペットを使用して、hibernate.cfg.xmlがクラスパスに含まれていることを確認してください。

try 
{ 
    Configuration configuration = new Configuration(); 
    configuration.configure(); 
    SessionFactory sessionFactory = configuration 
       .buildSessionFactory(new StandardServiceRegistryBuilder() 
         .applySettings(configuration.getProperties()) 
         .build()); 
} catch (Exception e) { 
    e.printStackTrace(); 
    throw new RuntimeException(
      "There was an error building the factory"); 
} 
関連する問題