강의

멘토링

커뮤니티

Inflearn Community Q&A

ssa41414839's profile image
ssa41414839

asked

Java ORM Standard JPA Programming - Basics

Hello JPA - Application Development

javax.persistence.PersistenceException: No Persistence provider for EntityManager named hello

Written on

·

1K

0

javax.persistence.PersistenceException: No Persistence provider for EntityManager named hello

이런 에러가 떠요 선생님

javaJPA

Answer 2

0

혹시 해결하셨나요?

persistence.xml 파일 내용 첨부합니다ㅎㅎ

<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.2"
xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence http://xmlns.jcp.org/xml/ns/persistence/persistence_2_2.xsd">
<persistence-unit name="hello">
<properties>
<!-- 필수 속성 -->
<property name="javax.persistence.jdbc.driver" value="org.h2.Driver"/>
<property name="javax.persistence.jdbc.user" value="sa"/>
<property name="javax.persistence.jdbc.password" value=""/>
<property name="javax.persistence.jdbc.url" value="jdbc:h2:tcp://localhost/~/test"/>
<property name="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"/>
<!-- 옵션 -->
<property name="hibernate.show_sql" value="true"/>
<property name="hibernate.format_sql" value="true"/>
<property name="hibernate.use_sql_comments" value="true"/>
<!--<property name="hibernate.hbm2ddl.auto" value="create" />-->
</properties>
</persistence-unit>
</persistence>

0

yh님의 프로필 이미지
yh
Instructor

안녕하세요. 신형준님^^

러이브러리나 설정이 잘못된 것 같아요.

사용하신 코드를 압축해서 다운 받을 수 있게 링크를 걸어주시면 도움을 드릴께요^^

ssa41414839's profile image
ssa41414839

asked

Ask a question