컴퓨터

스프링 dB연결 테스트 하는데 안댄다 ㅠㅠ

캡처.PNG

 

캡처.PNG

에러내용 보니까 이짝에서 안댄다는거 같은데..

 

알려주는 소스 그대로 썼는데 안댐...

 

스프링 배울때 알려준대로 해도 안대서 짱났는데.. 

 

 

 

 

 

 

 

.m2 지우고 버전 만지작 거리다보니 에러가 바뀐듯

INFO : org.springframework.test.context.support.DefaultTestContextBootstrapper - Loaded default TestExecutionListener class names from location [META-INF/spring.factories]: [org.springframework.test.context.web.ServletTestExecutionListener, org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener, org.springframework.test.context.support.DependencyInjectionTestExecutionListener, org.springframework.test.context.support.DirtiesContextTestExecutionListener, org.springframework.test.context.transaction.TransactionalTestExecutionListener, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener]
INFO : org.springframework.test.context.support.DefaultTestContextBootstrapper - Using TestExecutionListeners: [org.springframework.test.context.web.ServletTestExecutionListener@598067a5, org.springframework.test.context.support.DirtiesContextBeforeModesTestExecutionListener@3c0ecd4b, org.springframework.test.context.support.DependencyInjectionTestExecutionListener@14bf9759, org.springframework.test.context.support.DirtiesContextTestExecutionListener@5f341870, org.springframework.test.context.transaction.TransactionalTestExecutionListener@553f17c, org.springframework.test.context.jdbc.SqlScriptsTestExecutionListener@4f7d0008]
java.sql.SQLNonTransientConnectionException: CLIENT_PLUGIN_AUTH is required
    at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:110)
    at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
    at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:89)
    at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:63)
    at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:73)
    at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:79)
    at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:835)
    at com.mysql.cj.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:455)
    at com.mysql.cj.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:240)
    at com.mysql.cj.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:199)
    at java.sql.DriverManager.getConnection(DriverManager.java:664)
    at java.sql.DriverManager.getConnection(DriverManager.java:208)
    at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:154)
    at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriver(DriverManagerDataSource.java:145)
    at org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnectionFromDriver(AbstractDriverBasedDataSource.java:205)
    at org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnection(AbstractDriverBasedDataSource.java:169)
    at com.kyulspring.web.MysqlConnectionTest.testConnection(MysqlConnectionTest.java:45)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
    at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    at org.springframework.test.context.junit4.statements.RunBeforeTestExecutionCallbacks.evaluate(RunBeforeTestExecutionCallbacks.java:74)
    at org.springframework.test.context.junit4.statements.RunAfterTestExecutionCallbacks.evaluate(RunAfterTestExecutionCallbacks.java:84)
    at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:75)
    at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:86)
    at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:84)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
    at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:251)
    at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:97)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
    at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:190)
    at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
    at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Caused by: com.mysql.cj.exceptions.UnableToConnectException: CLIENT_PLUGIN_AUTH is required
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:61)
    at com.mysql.cj.exceptions.ExceptionFactory.createException(ExceptionFactory.java:85)
    at com.mysql.cj.protocol.a.NativeAuthenticationProvider.connect(NativeAuthenticationProvider.java:205)
    at com.mysql.cj.protocol.a.NativeProtocol.connect(NativeProtocol.java:1452)
    at com.mysql.cj.NativeSession.connect(NativeSession.java:165)
    at com.mysql.cj.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:955)
    at com.mysql.cj.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:825)
    ... 41 more
 

 

 

8개의 댓글

2019.07.18

property 'driverClassName' threw exception; nested exception is java.lang.IllegalStateException: Could not load j~~

 

스택오버플로우에 검색하면 JDBC 드라이버가 로드가 안됐다고 나옴

 

com.mysql.cj.jdbc.Driver 이 드라이버가 제대로 깔렸는지 확인해봐. 메이븐인지 gradle인진 모르겠지만

0
2019.07.18
@그는신이야

pom.xml에         
<!-- mysql -->
        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <version>8.0.13</version>
        </dependency>

 

이거 아니야??

0
2019.07.18
@샤켓

그럼 driverClassName을 com.mysql.jdbc.Driver 이걸로 바꿔봐

0
2019.07.18
@그는신이야

Property 'driverClassName' threw exception; nested exception is java.lang.IllegalStateException: Could not load JDBC driver class [com.mysql.jdbc.Drive]

 

똑같넹.. 내가 뭐 잘못했남...

0
2019.07.18
@샤켓

Drive라고 되어있음. Driver로 바꿔보고 그래도 안되면 path같은곳에 패키지 잡아줬는지 확인해봐

0
2019.07.18
@그는신이야

왜 Drive라고 나왔찌

Property 'driverClassName' threw exception; nested exception is java.lang.IllegalStateException: Could not load JDBC driver class [com.mysql.jdbc.Driver]

 

아니면 이거랑 비슷한 경운가

http://theeye.pe닷kr/archives/2095

중간에 에러 해결못해서 라이브러리 다운받아서 했다는데..

0
2019.07.18
@샤켓

그럼 따라해보고 이유를 찾아봐야될듯

0
2019.07.18
@그는신이야

앗..아아..mysql버전이 구버전인데 너무 신버전의 커넥터써서 그런듯

답변 감사여

0
무분별한 사용은 차단될 수 있습니다.
번호 제목 글쓴이 추천 수 날짜 조회 수
180562 [정보] 개드립 mp4 재생 안되는 사람 보시오 2 쪼렙고양이 0 3 시간 전 39
180561 [컴퓨터] 메인보드 어떤거 써야되죠? 4 함박눈 0 5 시간 전 63
180560 [프로그래밍] 안드로이드 책 추천좀 집에가게해줘 0 5 시간 전 55
180559 [잡담] 갤럭시 앱 아이콘 숫자? 안뜸ㅠ 3 1q2w3es 0 7 시간 전 68
180558 [컴퓨터] 이런 도킹스테이션 어떰? 6 쿠엥쿠엥 0 7 시간 전 159
180557 [잡담] 허먼밀러 뉴 에어론B 하루체감 5 창원토박이 0 7 시간 전 178
180556 [컴퓨터] 노트북 가지고다니기 vs 미니컴퓨터 가지고다니기 15 황제건 0 8 시간 전 157
180555 [잡담] 아이패드 프로 얼마에 나올거 같음? 5 노보케인 0 9 시간 전 147
180554 [정보] 알리 ssd 2테라 9.6만 3 년차html개발자 0 11 시간 전 326
180553 [잡담] 거북선 -> 레이니로 바꿀까 3 fhana 0 11 시간 전 123
180552 [잡담] 집안에 돌아다니는 물건들 싹 다 파는 중 1 연골어류 0 13 시간 전 198
180551 [모바일] 현시점 아이폰 중고 가성비 뭐가 나음? 12 상한가 1 18 시간 전 382
180550 [프로그래밍] 폰 스크리닝 해 본 사람 있어? 3 무지개빛푸딩 0 19 시간 전 307
180549 [컴퓨터] rx7600 이 가격이면 살 만하죠? 4 죽업 0 19 시간 전 228
180548 [잡담] 사무실에서 사운드바 주워옴 2 빠빠양 0 20 시간 전 234
180547 [견적] 더는 못 짜겠어요.. 1 아랫마을공돌이 0 20 시간 전 167
180546 [컴퓨터] 컴붕이의 추천에 따라 독거미 키보드 결제함 ㅎㅎ 쿠쿠N취킨 0 21 시간 전 152
180545 [견적] 두제품간의 Cpu, 내장 그래픽 둘중 뭐가 나을까요 1 소산스님 0 1 일 전 215
180544 [컴퓨터] 573d 149달러 어떰? 3 Kalysaar 0 1 일 전 166
180543 [견적] R리 cpu 구매 질문있습니다 2 꿀탱 0 1 일 전 141