PersistenceUnitReader.readPersistenceUnitInfos() has thrown a FileNotFoundException

java.io.FileNotFoundException
Javadoc
at org.springframework.core.io.ClassPathResource.getInputStream
(source)
at org.springframework.orm.jpa.persistenceunit.PersistenceUnitReader.readPersistenceUnitInfos
(source)

Typical Exception Messages

  1. class path resource [META-INF/persistence.xml] cannot be opened because it does not exist
  2. Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/spring/spring-jpa.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Cannot parse persistence unit from class path resource [META-INF/persistence.xml]
  3. Error creating bean with name 'org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor#0' defined in class path resource [conf/context/beans-persistence.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [conf/context/beans-persistence.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Cannot parse persistence unit from class path resource [conf/tanaguru-persistence.xml]
  4. Failed to load ApplicationContext
  5. Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/springConfiguration.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Cannot parse persistence unit from class path resource [META-INF/persistence.xml]

Origin

ClassPathResource.getInputStream() has thrown a FileNotFoundException

java.io.FileNotFoundException
org.springframework.core.io.ClassPathResource.getInputStream
349Web pages
1Solution

Similar

Specific cases

External results for this pattern (4)

  1. Nina Gelderbloemvia Kuali JIRA5 months ago
  2. Unknown authorvia com.br5 months ago
    Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/spring/spring-jpa.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Cannot parse persistence unit from class path resource [META-INF/persistence.xml]
    Show stack trace
  3. softwareklinicvia GitHub2 years ago
    Error creating bean with name 'org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor#0' defined in class path resource [conf/context/beans-persistence.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [conf/context/beans-persistence.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Cannot parse persistence unit from class path resource [conf/tanaguru-persistence.xml]
    Show stack trace
  4. forhasvia Stack Overflow3 years ago
    class path resource [META-INF/persistence.xml] cannot be opened because it does not exist
    Show stack trace