Hibernate 3.2 Mysql 5.5.9 sous netbeans 6.9.1

Fermé
taznakhte Messages postés 63 Date d'inscription jeudi 15 octobre 2009 Statut Membre Dernière intervention 14 février 2012 - Modifié par taznakhte le 21/02/2011 à 17:19
 moh-abi - 15 déc. 2011 à 12:07
Bonjour,

j'ai essayé de generer les pojo et les fichier de maping avec hibernate sous netbeans,suivant le tuto https://netbeans.org/kb/docs/web/hibernate-webapp.html
et il m'a donne l'erreur suivant :
org.hibernate.HibernateException: could not instantiate QueryTranslatorFactory: org.hibernate.hql.classic.ClassicQueryTransactionFactory
at org.hibernate.cfg.SettingsFactory.createQueryTranslatorFactory(SettingsFactory.java:391)
at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:222)
at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2005)
at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:40)
at org.netbeans.modules.hibernate.wizards.HibernateCodeGenWizard.generateClasses(HibernateCodeGenWizard.java:328)
at org.netbeans.modules.hibernate.wizards.HibernateCodeGenWizard.instantiate(HibernateCodeGenWizard.java:419)
at org.openide.loaders.TemplateWizard$InstantiatingIteratorBridge.instantiate(TemplateWizard.java:1019)
at org.openide.loaders.TemplateWizard.handleInstantiate(TemplateWizard.java:591)
at org.openide.loaders.TemplateWizard.instantiateNewObjects(TemplateWizard.java:412)
at org.openide.loaders.TemplateWizardIterImpl.instantiate(TemplateWizardIterImpl.java:256)
at org.openide.loaders.TemplateWizardIteratorWrapper.instantiate(TemplateWizardIteratorWrapper.java:168)
at org.openide.WizardDescriptor.callInstantiateOpen(WizardDescriptor.java:1541)
at org.openide.WizardDescriptor.callInstantiate(WizardDescriptor.java:1498)
at org.openide.WizardDescriptor.access$1700(WizardDescriptor.java:130)
at org.openide.WizardDescriptor$Listener$2$1.run(WizardDescriptor.java:2069)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1957)
Caused by: java.lang.ClassNotFoundException: org.hibernate.hql.classic.ClassicQueryTransactionFactory starting from ModuleCL@1ddad02[org.netbeans.modules.hibernatelib] with possible defining loaders [ModuleCL@1ddad02[org.netbeans.modules.hibernatelib]] and declared parents [ModuleCL@1afa486[org.netbeans.libs.freemarker], ModuleCL@1f4b0dc[org.netbeans.libs.commons_logging]]
at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:264)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:100)
at org.hibernate.cfg.SettingsFactory.createQueryTranslatorFactory(SettingsFactory.java:388)
... 16 more
Caused by: java.lang.ClassNotFoundException: org.hibernate.hql.classic.ClassicQueryTransactionFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at org.netbeans.ProxyClassLoader.loadClass(ProxyClassLoader.java:262)
... 21 more




si vous pouvez m'aidée
de même j'ai telecharger le projet https://netbeans.org/project_downloads/samples/Samples/JavaEE/DVDStoreEE6.zip qui daja sur le site de netbeans,lors ce que j'ai test la requet " from Film " il ma donne l'erreur :



org.hibernate.exception.SQLGrammarException: could not execute query
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.loader.Loader.doList(Loader.java:2223)
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
at org.hibernate.loader.Loader.list(Loader.java:2099)
at org.hibernate.hql.classic.QueryTranslatorImpl.list(QueryTranslatorImpl.java:912)
at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
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 'from limit 100' at line 1
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:407)
at com.mysql.jdbc.Util.getInstance(Util.java:382)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1052)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3603)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3535)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1989)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2150)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2626)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2119)
at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:2281)
at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)
at org.hibernate.loader.Loader.getResultSet(Loader.java:1787)
at org.hibernate.loader.Loader.doQuery(Loader.java:674)
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
at org.hibernate.loader.Loader.doList(Loader.java:2220)
... 8 more


merci de m'aidée

A voir également:

1 réponse

taznakhte Messages postés 63 Date d'inscription jeudi 15 octobre 2009 Statut Membre Dernière intervention 14 février 2012 1
22 févr. 2011 à 10:03
c'est bon j'est trouver ou il y a le proleme ,il faut ajouter le jar slf4j dans le projet
0
comment ???
0
tu va importé le jar slf4j dans lib>jar de votre projet
0