Win a copy of Java Database Connections & Transactions (e-book only) this week in the JDBC forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

Error in persistence and other files  RSS feed

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Error in persistence and other files. pleas help me. trying to connect with sql only pom.xml work

Car.java CarManage.java persistence file error
please help me.






 
Alinagi nagi
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
car.java file error

Nov 27, 2018 5:47:17 PM org.hibernate.annotations.common.Version <clinit>
INFO: HCANN000001: Hibernate Commons Annotations {4.0.2.Final}
Nov 27, 2018 5:47:17 PM org.hibernate.Version logVersion
INFO: HHH000412: Hibernate Core {4.2.8.Final}
Nov 27, 2018 5:47:17 PM org.hibernate.cfg.Environment <clinit>
INFO: HHH000206: hibernate.properties not found
Nov 27, 2018 5:47:17 PM org.hibernate.cfg.Environment buildBytecodeProvider
INFO: HHH000021: Bytecode provider name : javassist
Nov 27, 2018 5:47:17 PM org.hibernate.ejb.Ejb3Configuration configure
INFO: HHH000318: Could not find any META-INF/persistence.xml file in the classpath
Exception in thread "main" javax.persistence.PersistenceException: No Persistence provider for EntityManager named CarDealer
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:84)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:54)
at car.assignment.CarsManager.main(CarsManager.java:13)



----------------------------------------------------------------------------------------------------------------------------------------------------------

persistence.xml file error

Nov 27, 2018 6:01:12 PM org.hibernate.annotations.common.Version <clinit>
INFO: HCANN000001: Hibernate Commons Annotations {4.0.2.Final}
Nov 27, 2018 6:01:12 PM org.hibernate.Version logVersion
INFO: HHH000412: Hibernate Core {4.2.8.Final}
Nov 27, 2018 6:01:12 PM org.hibernate.cfg.Environment <clinit>
INFO: HHH000206: hibernate.properties not found
Nov 27, 2018 6:01:12 PM org.hibernate.cfg.Environment buildBytecodeProvider
INFO: HHH000021: Bytecode provider name : javassist
Nov 27, 2018 6:01:12 PM org.hibernate.ejb.Ejb3Configuration configure
INFO: HHH000318: Could not find any META-INF/persistence.xml file in the classpath
Exception in thread "main" javax.persistence.PersistenceException: No Persistence provider for EntityManager named CarDealer
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:84)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:54)
at car.assignment.CarsManager.main(CarsManager.java:12)

-----------------------------------------------------------------------------------------------------------------------------------------------------------

CarManager.java   file error

Nov 27, 2018 6:01:55 PM org.hibernate.annotations.common.Version <clinit>
INFO: HCANN000001: Hibernate Commons Annotations {4.0.2.Final}
Nov 27, 2018 6:01:55 PM org.hibernate.Version logVersion
INFO: HHH000412: Hibernate Core {4.2.8.Final}
Nov 27, 2018 6:01:55 PM org.hibernate.cfg.Environment <clinit>
INFO: HHH000206: hibernate.properties not found
Nov 27, 2018 6:01:55 PM org.hibernate.cfg.Environment buildBytecodeProvider
INFO: HHH000021: Bytecode provider name : javassist
Nov 27, 2018 6:01:55 PM org.hibernate.ejb.Ejb3Configuration configure
INFO: HHH000318: Could not find any META-INF/persistence.xml file in the classpath
Exception in thread "main" javax.persistence.PersistenceException: No Persistence provider for EntityManager named CarDealer
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:84)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:54)
at car.assignment.CarsManager.main(CarsManager.java:12)
 
Marshal
Posts: 5995
156
Chrome Eclipse IDE Java Postgres Database Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's the common message in all of these errors: INFO: HHH000318: Could not find any META-INF/persistence.xml file in the classpath

So where is your persistence.xml file?  What does you project file tree look like?
 
Alinagi nagi
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Knute Snortum wrote:Here's the common message in all of these errors: INFO: HHH000318: Could not find any META-INF/persistence.xml file in the classpath

So where is your persistence.xml file?  What does you project file tree look like?




like this you want?

/CarsManager
  >CarsManager/src/main/java
      >car.assignment

CarsManager/src/main/java/car/assignment/Car.java
car.assignment.Car
/CarsManager/src/main/java/car/assignment/CarsManager.java
car.assignment.CarsManager
/CarsManager/src/main/resources
   >CarsManager/src/main/resources/META-INF
   >CarsManager/src/main/resources/META-INF/persistence.xml

/CarsManager/src/test/java
/CarsManager/src/test/resources
/CarsManager/lib
/CarsManager/src
/CarsManager/target

/CarsManager/Main.java
/CarsManager/pom.xml
 
Alinagi nagi
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Knute Snortum wrote:Here's the common message in all of these errors: INFO: HHH000318: Could not find any META-INF/persistence.xml file in the classpath

So where is your persistence.xml file?  What does you project file tree look like?




Untitled.png
[Thumbnail for Untitled.png]
 
Bartender
Posts: 2282
95
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is incorrect

should be :


have a look at :
https://docs.oracle.com/cd/E16439_01/doc.1013/e13981/cfgdepds005.htm
 
Marshal
Posts: 64494
225
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

I am moving you since this question is too difficult for its current location.
 
Alinagi nagi
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

salvin francis wrote: is incorrect

should be :


have a look at :
https://docs.oracle.com/cd/E16439_01/doc.1013/e13981/cfgdepds005.htm



rid of some error thanks..
but others are same
 
Knute Snortum
Marshal
Posts: 5995
156
Chrome Eclipse IDE Java Postgres Database Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you want others to respond, then TellTheDetails (that's link).  We can't do anything if we don't know what the error is and see the full stack trace (at least).
 
I'm not sure if I approve of this interruption. But this tiny ad checks out:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!