Spring ์คํ๋ง java.lang.classnotfoundexception: com.sun.xml.internal.bind.v2.contextfactory ์๋ฌ ํด๊ฒฐ ๋ฐฉ๋ฒ
2021. 12. 1. 13:26ใSpring
728x90
์ฐ์ ์๋ฐ11์์๋ ํธํ์ฑ์ ๋ฌธ์ ๋ก ๋ผ์ด๋ธ๋ฌ๋ฆฌ๊ฐ ๊ฝค ๋ง์ด ์ญ์ ๋์๋ค๊ณ ํ๋ค.
๊ทธ๋์ JAXB๋ฅผ ์ฌ์ฉํ๋ ค๋๋ฐ classnotfoundexception์๋ฌ๊ฐ ๋๋ฉด์ ์ฌ์ฉํ ์ ์์๋ค..!!
์ด๋ ๊ฒ ์ธ๊ฐ์ dependency๋ฅผ ์ฐธ์กฐํด์ฃผ์๋๋ @XmlRootElement ์ด๋ ธํ ์ด์ ๋ ์ ์๊ธฐ๊ณ , ์๋ฌ ๋ํ ๋ฐ์ํ์ง ์์๋ค.
1๏ธโฃ JAXB API
https://mvnrepository.com/artifact/javax.xml.bind/jaxb-api
<!-- https://mvnrepository.com/artifact/javax.xml.bind/jaxb-api --> <dependency> <groupId>javax.xml.bind</groupId> <artifactId>jaxb-api</artifactId> <version>2.3.1</version> </dependency>
2๏ธโฃ JAXB Core
https://mvnrepository.com/artifact/org.glassfish.jaxb/jaxb-core
<!-- https://mvnrepository.com/artifact/org.glassfish.jaxb/jaxb-core -->
<dependency> <groupId>org.glassfish.jaxb</groupId> <artifactId>jaxb-core</artifactId> <version>2.3.0.1</version> </dependency>
3๏ธโฃ JAXB-impl
https://mvnrepository.com/artifact/com.sun.xml.bind/jaxb-impl
<!-- https://mvnrepository.com/artifact/com.sun.xml.bind/jaxb-impl --> <dependency> <groupId>com.sun.xml.bind</groupId> <artifactId>jaxb-impl</artifactId> <version>2.3.1</version> </dependency>
728x90
'Spring' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
Spring Transaction ๊ฐ๋จํ ํฐ์ผ ๊ตฌ๋งค ์๋น์ค ์์ (0) | 2021.12.01 |
---|---|
Spring RESTful ์ฌ์ฉ์ ๊ด๋ฆฌ ๊ฒ์ํ XML.ver (JAXB) (0) | 2021.12.01 |
Spring MVC ๊ฐ๋จํ ๊ฒ์ํ ๋ง๋ค๊ธฐ (+ ํผ ๋ฐ์ดํฐ ์ ํจ์ฑ ๊ฒ์ฆํ๊ธฐ Validator) (0) | 2021.12.01 |
Spring RESTful ์ฌ์ฉ์ ๊ด๋ฆฌ ๊ฒ์ํ (0) | 2021.11.30 |
Spring Ajax, jQuery (0) | 2021.11.30 |