je travaille un projet maven+spring+hibernate ,lors de la créeation de mes entitées , les importations de javax.persistance ne sont pas reconnus et les annotations @entity aussi pouvez vous m'aider svp?
je travaille un projet maven+spring+hibernate ,lors de la créeation de mes entitées , les importations de javax.persistance ne sont pas reconnus et les annotations @entity aussi pouvez vous m'aider svp?
Bonjour, c'est à prémière lecture un souci de librairie absente. Peux tu vérifier que toutes les librairies de persistence sont bien dans ton classpath?
Bonjour,
Il manque la dépendence :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6<dependency> <groupId>org.hibernate.javax.persistence</groupId> <artifactId>hibernate-jpa-2.0-api</artifactId> <version>1.0.1.Final</version> <scope>compile</scope> </dependency>
Faites une recherche sur le forum et/ou sur internet et lisez la doc officielle avant de poser une question svp.
et n'oubliez pas de lire les FAQ !
FAQ Java et les cours et tutoriels Java
Doc JAVA officielle
AngularJS 1.x
Angular 2
Do it simple... and RTFM !
merci pour vos réponses mais ça ne marche pas encore j'ai cette exception :org.springframework.transaction.CannotCreateTransactionException : Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Cannot open connection
null
As-tu modifié le fichier de configuration applicationContext.xml ?
Faites une recherche sur le forum et/ou sur internet et lisez la doc officielle avant de poser une question svp.
et n'oubliez pas de lire les FAQ !
FAQ Java et les cours et tutoriels Java
Doc JAVA officielle
AngularJS 1.x
Angular 2
Do it simple... and RTFM !
oui je l'ai changé dans l'url elle était juste localhost donc j'ai mis localhost:5432
en fait pour la couche présentation c'est en flex donc lors le lancement de l'application il m'affiche dans une popup:dans le console j'ai
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2 org.springframework.transaction.CannotCreateTransactionException : Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.exception.GenericJDBCException: Cannot open connection null
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 mai 02, 2013 8:12:15 AM org.apache.catalina.core.AprLifecycleListener init INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: C:\Program Files\Java\jdk1.7.0_10\jre\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files/Adobe/Adobe Flash Builder 4.5/jre/bin/client;C:/Program Files/Adobe/Adobe Flash Builder 4.5/jre/bin;C:/Program Files/Adobe/Adobe Flash Builder 4.5/jre/lib/i386;C:\Program Files\Adobe\Adobe Flash Builder 4.5\;C:\oraclexe\app\oracle\product\10.2.0\server\bin;C:\Program Files\AMD APP\bin\x86;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\ATI Technologies\ATI.ACE\Core-Static;C:\maven_lib\apache-maven-3.0.2\bin;C:\Program Files\Java\jdk1.7.0_10\bin;C:\Program Files\doxygen\bin;C:\Program Files\MiKTeX 2.9\miktex\bin\;D:\privateRepository\bin\;D:\privateRepository\bin;D:\plate-forme du travail\softs\jdk1.7.0_01\bin\;;. mai 02, 2013 8:12:16 AM org.apache.tomcat.util.digester.SetPropertiesRule begin WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:SmartSupport' did not find a matching property. mai 02, 2013 8:12:16 AM org.apache.coyote.AbstractProtocol init INFO: Initializing ProtocolHandler ["http-bio-8083"] mai 02, 2013 8:12:16 AM org.apache.coyote.AbstractProtocol init INFO: Initializing ProtocolHandler ["ajp-bio-8010"] mai 02, 2013 8:12:16 AM org.apache.catalina.startup.Catalina load INFO: Initialization processed in 545 ms mai 02, 2013 8:12:16 AM org.apache.catalina.core.StandardService startInternal INFO: Démarrage du service Catalina mai 02, 2013 8:12:16 AM org.apache.catalina.core.StandardEngine startInternal INFO: Starting Servlet Engine: Apache Tomcat/7.0.20 mai 02, 2013 8:12:21 AM org.apache.catalina.core.ApplicationContext log INFO: Initializing Spring FrameworkServlet 'flexspring' mai 02, 2013 8:12:25 AM org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler ["http-bio-8083"] mai 02, 2013 8:12:25 AM org.apache.coyote.AbstractProtocol start INFO: Starting ProtocolHandler ["ajp-bio-8010"] mai 02, 2013 8:12:25 AM org.apache.catalina.startup.Catalina start INFO: Server startup in 9012 ms
Trace toujours incomplètes. Ny'a til pas une ligne causedBy... ?
non je t'ai rapporté exactement ce qui était affiché sur le console et dans la popup
Partager