inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

golden3333님의 게시글

golden3333 golden3333

@golden33337364

수강평 작성수
-
평균평점
-

게시글 8

질문&답변

3:12초에 emf로 변수 고치고 실행을 눌렀는데 연결이 아예 안되구 에러가 떠요 ㅠㅠ

xml version ="1.0" encoding ="UTF-8" ?> project xmlns ="http://maven.apache.org/POM/4.0.0" xmlns: xsi ="http://www.w3.org/2001/XMLSchema-instance" xsi :schemaLocation ="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" > modelVersion >4.0.0 modelVersion > groupId >jpa-basic groupId > artifactId >ex1-hello-jpa artifactId > version >1.0.0 version > build > plugins > plugin > groupId >org.apache.maven.plugins groupId > artifactId >maven-compiler-plugin artifactId > configuration > source >11 source > target >11 target > configuration > plugin > plugins > build > dependencies > 하이버네이트 --> dependency > groupId >org.hibernate groupId > artifactId >hibernate-entitymanager artifactId > version >5.3.10.Final version > dependency > 데이터베이스 --> dependency > groupId >com.h2database groupId > artifactId >h2 artifactId > version >1.4.200 version > dependency > dependencies > project > 위는 실행시킨 poem.xml 이고 아래는 수정한 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
댓글수
11
조회수
1489

질문&답변

3:12초에 emf로 변수 고치고 실행을 눌렀는데 연결이 아예 안되구 에러가 떠요 ㅠㅠ

위는 자바 버전을 14로 한것이고 자바를 11로 다운그레이드 해서 적용해보았더니 이런 에러가 뜹니다 ... 이번에는 javax.persistence.PersistenceException: Unable to locate persistence units 이라고 떠요! poem.xml에 build > plugins > plugin > groupId >org.apache.maven.plugins groupId > artifactId >maven-compiler-plugin artifactId > configuration > source >11 source > target >11 target > configuration > plugin > plugins > build > 이 부분도 추가했구 setting에 들어가서 바이트코드 각각 11로도 해보구 8로도 해봤는데 계속 밑에오류만 뜹니다..

좋아요수
0
댓글수
11
조회수
1489