컴퓨터

스프링 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
무분별한 사용은 차단될 수 있습니다.
번호 제목 글쓴이 추천 수 날짜 조회 수
180377 [견적] 컴 살까 하는데 견적 어떤가여 3 함박눈 0 1 시간 전 28
180376 [컴퓨터] 5700x3d 장착 후기 바숲 1 1 시간 전 50
180375 [잡담] U4025QW 도착! (WFHD 75 HZ -> WUHD 120HZ 한방 업글기) 2 냐하하하하 1 2 시간 전 62
180374 [견적] 노트북 처음 사보려고 하는데 어디서 어떻게 사야 좋을까요? 3 하늘을나는잉어킹 0 2 시간 전 32
180373 [컴퓨터] 요즘 윈도우 하는짓거리 너무싫어서 4 Vv연옥의사신vV 0 2 시간 전 92
180372 [모바일] 핏3 구매후 느낀점 2 타이거밤 0 3 시간 전 115
180371 [컴퓨터] 암드9천번대 및 5080존버 견적좀 봐주세여 16 사촌간부랄빨기 0 3 시간 전 77
180370 [프로그래밍] Exiftool 이거 일본어 못 읽는데 11 부터시작하는이세... 0 4 시간 전 108
180369 [잡담] 컴터 질렀다 32 사촌간부랄빨기 0 5 시간 전 128
180368 [컴퓨터] 모니터 화면 10 흙수저 0 5 시간 전 61
180367 [컴퓨터] SSD 문제 있을때 고칠 방법 뭐가 있을까? 4 베데엔차 0 5 시간 전 73
180366 [컴퓨터] 모니터가 QHD에 주사율 165hz 인데 이걸 적용이 안됨ㅠㅠ 31 야스그랜드마스터 0 6 시간 전 121
180365 [컴퓨터] 모니터 12v 어뎁터 필요한가요 전원 ㅈ 6 흙수저 0 6 시간 전 50
180364 [컴퓨터] 60>144hz도 체감 엄청 커? 10 청주리신 0 7 시간 전 178
180363 [잡담] 애드블럭 dns 개드립만 뚫리네 1qaz2wsx 0 7 시간 전 91
180362 [컴퓨터] 모니터 HDR 이거 켜는게 좋음? 16 야스그랜드마스터 0 8 시간 전 176
180361 [잡담] 회사 회의용으로 google meet 쓰는 분 있음? 3 갤럭시울리 0 10 시간 전 97
180360 [잡담] 지금 HDD 특가 뜬곳 있나? 5 내일까지 0 12 시간 전 188
180359 [컴퓨터] 라데온으로 헬다2 돌리시는분 15 에더리 0 13 시간 전 138
180358 [컴퓨터] 모니터 한대 더 사려는데 오버려나? 4 or5469 0 13 시간 전 137