MySQL 연동 오류(java.lang.ClassNotFoundException: com.mysql.jdbc.Driver) , intellij
내가 만난 에러들 2023. 2. 4. 11:46

pom.xml에서 4.0.0 org.example jdbctest3 1.0-SNAPSHOT 8 8 UTF-8 mysql mysql-connector-java 8.0.31 처럼 dependency를 추가하였는데도 com.mysql 에서 mysql-connector.jar 파일을 못찾는 오류가 발생했다. package org.example; public class DriverLoadingTest { public DriverLoadingTest() { try { Class.forName("com.mysql.cj.jdbc.Driver"); System.out.println("로딩 성공"); } catch (ClassNotFoundException e) { e.printStackTrace(); System.out..

Refused to apply style from 'http://localhost:3000/...' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
내가 만난 에러들 2022. 1. 24. 22:44

상황 cdn을 사용하지 않고 bootstrap.css 파일을 로컬에 포함해서 내가 구현하고자 하는 웹페이지의 디테일을 조작하기 위해 bootstrap.css를 작업 중인 디렉토리에 포함하고 경로를 지정했는데도 계속 css 파일을 찾지 못하고 와 같이 css가 적용되지 않은 html의 틀만 뱉어냈다. 까닭 결국 경로를 제대로 설정하지 않아서인데, 경로를 제대로 로컬에 포함하고 맞는 상대 경로를 지정해줬어도 // user에게 public folder를 사용가능하게 제공 /public 이동시 public폴더를 볼 수있음 //express.static : express의 정적 파일 제공 app.use("/public", express.static(__dirname + "/public")); server.js에서..

[PyMysql] TypeError: can only concatenate str (not "NoneType") to str
내가 만난 에러들 2021. 11. 20. 23:10

뜻 그대로이다. string 타입에 string 타입이 아닌 변수를 concatenation 할 수 없다. 나의 경우는 w_file.write("> " + cname + ' ' + cid + ' ' + bid + ' ' + mno + ' ' + type + ' ' + rentaldate + "\n") 이 코드에서 에러가 발생했다. rentaldate의 type은 date인데, 이 앞은 string이므로 당연히 concatenate 할 수 없기 때문이다. w_file.write("> " + cname + ' ' + cid + ' ' + bid + ' ' + mno + ' ' + type + ' ' + str(rentaldate) + "\n") 이렇게 수정하여 해결했다.

[Mysql] error code: 1822. failed to add the foreign key constraint. 오류
내가 만난 에러들 2021. 11. 8. 12:48

에러메세지 error code: 1822. failed to add the foreign key constraint 참고 https://stackoverflow.com/questions/43511183/mysql-error-1822-failed-to-add-foreign-key-constraint-missing-index-for-contra MySQL Error 1822: Failed to add foreign key constraint; missing index for contraint BUT index exists I am trying to add an foreign key to my flightschedule table but it fails, but I do not really know why. ..

[C++] xcode - Invalid operands to binary expression('const' and 'const') 에러
내가 만난 에러들 2021. 10. 9. 20:45

해결 const keyword 붙이기 bool operator