This week's book giveaway is in the Spring forum.
We're giving away four copies of Spring in Action (5th edition) and have Craig Walls on-line!
See this thread for details.
Win a copy of Spring in Action (5th edition) this week in the Spring 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
  • Bear Bibeault
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Ganesh Patekar
  • Frits Walraven
  • Tim Moores
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Stephan van Hulst
  • salvin francis
  • Tim Holloway

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)
 
Sheriff
Posts: 5448
147
Chrome Eclipse IDE Java Postgres Database 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: 1983
57
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: 61756
193
  • 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: 5448
147
Chrome Eclipse IDE Java Postgres Database 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).
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!