javax.persistence.PersistenceException: Unable to build entity manager factory

Stack Overflow | user2908112 | 9 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Hibernate not working with Tomcat

    Stack Overflow | 9 months ago | user2908112
    javax.persistence.PersistenceException: Unable to build entity manager factory
  2. 0

    Tomcat deployment failing

    Stack Overflow | 9 months ago | user2908112
    javax.persistence.PersistenceException: Unable to build entity manager factory
  3. 0

    Error creating bean "entityManagerFactory" - SpringBoot+Tomcat 8

    Stack Overflow | 3 months ago | user5307803
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.class]: Invocation of init method failed; nested exception is org.hibernate.boot.archive.spi.ArchiveException: Could not build ClassFile
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Spring Boot Weird Could not build ClassFile Exception

    Stack Overflow | 3 months ago | Devian
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaAutoConfiguration.class]: Invocation of init method failed; nested exception is org.hibernate.boot.archive.spi.ArchiveException: Could not build ClassFile

    Root Cause Analysis

    1. org.hibernate.boot.archive.spi.ArchiveException

      Could not build ClassFile

      at org.hibernate.boot.archive.scan.spi.ClassFileArchiveEntryHandler.toClassFile()
    2. org.hibernate.boot
      MetadataBuildingProcess.prepare
      1. org.hibernate.boot.archive.scan.spi.ClassFileArchiveEntryHandler.toClassFile(ClassFileArchiveEntryHandler.java:64)
      2. org.hibernate.boot.archive.scan.spi.ClassFileArchiveEntryHandler.handleEntry(ClassFileArchiveEntryHandler.java:47)
      3. org.hibernate.boot.archive.internal.ExplodedArchiveDescriptor.processDirectory(ExplodedArchiveDescriptor.java:143)
      4. org.hibernate.boot.archive.internal.ExplodedArchiveDescriptor.visitArchive(ExplodedArchiveDescriptor.java:54)
      5. org.hibernate.boot.archive.scan.spi.AbstractScannerImpl.scan(AbstractScannerImpl.java:46)
      6. org.hibernate.boot.model.process.internal.ScanningCoordinator.coordinateScan(ScanningCoordinator.java:75)
      7. org.hibernate.boot.model.process.spi.MetadataBuildingProcess.prepare(MetadataBuildingProcess.java:98)
      7 frames
    3. org.hibernate.jpa
      HibernatePersistenceProvider.createEntityManagerFactory
      1. org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.<init>(EntityManagerFactoryBuilderImpl.java:199)
      2. org.hibernate.jpa.boot.spi.Bootstrap.getEntityManagerFactoryBuilder(Bootstrap.java:34)
      3. org.hibernate.jpa.HibernatePersistenceProvider.getEntityManagerFactoryBuilder(HibernatePersistenceProvider.java:165)
      4. org.hibernate.jpa.HibernatePersistenceProvider.getEntityManagerFactoryBuilderOrNull(HibernatePersistenceProvider.java:114)
      5. org.hibernate.jpa.HibernatePersistenceProvider.getEntityManagerFactoryBuilderOrNull(HibernatePersistenceProvider.java:71)
      6. org.hibernate.jpa.HibernatePersistenceProvider.createEntityManagerFactory(HibernatePersistenceProvider.java:52)
      6 frames
    4. JavaEE 7
      Persistence.createEntityManagerFactory
      1. javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:55)
      2. javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:39)
      2 frames
    5. com.app
      AppContextListener.contextInitialized
      1. com.app.AppContextListener.createEntityManagerFactory(AppContextListener.java:67)
      2. com.app.AppContextListener.contextInitialized(AppContextListener.java:63)
      2 frames
    6. Glassfish Core
      LifecycleBase.start
      1. org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4842)
      2. org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5303)
      3. org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
      3 frames
    7. org.apache.catalina
      HTMLManagerServlet.doPost
      1. org.apache.catalina.manager.ManagerServlet.start(ManagerServlet.java:1284)
      2. org.apache.catalina.manager.HTMLManagerServlet.start(HTMLManagerServlet.java:666)
      3. org.apache.catalina.manager.HTMLManagerServlet.doPost(HTMLManagerServlet.java:217)
      3 frames
    8. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:648)
      2. javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
      2 frames
    9. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:292)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
      3. org.apache.catalina.filters.CsrfPreventionFilter.doFilter(CsrfPreventionFilter.java:136)
      4. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
      5. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
      5 frames
    10. Tomcat WS
      WsFilter.doFilter
      1. org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      1 frame
    11. Glassfish Core
      CoyoteAdapter.service
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
      3. org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)
      4. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240)
      5. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207)
      6. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212)
      7. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
      8. org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:614)
      9. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141)
      10. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
      11. org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616)
      12. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
      13. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:528)
      13 frames
    12. Grizzly HTTP
      NioEndpoint$SocketProcessor.run
      1. org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1099)
      2. org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:670)
      3. org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1520)
      4. org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1476)
      4 frames
    13. Java RT
      ThreadPoolExecutor$Worker.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      2 frames
    14. Tomcat Util
      TaskThread$WrappingRunnable.run
      1. org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      1 frame
    15. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:745)
      1 frame