• 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
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Error in persistence and other files

 
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)
 
Sheriff
Posts: 6108
157
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • 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: 2323
100
Google Web Toolkit Eclipse IDE 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: 65033
247
  • 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
Sheriff
Posts: 6108
157
Eclipse IDE Postgres Database VI Editor Chrome Java Ubuntu
  • 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).
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!