메뉴 건너뛰기

Cloudera, BigData, Semantic IoT, Hadoop, NoSQL

Cloudera CDH/CDP 및 Hadoop EcoSystem, Semantic IoT등의 개발/운영 기술을 정리합니다. gooper@gooper.com로 문의 주세요.


1. assembly에 전체 jar를 포함하지 않도록 하는 경우

가. 메세지 내용

[error] deduplicate: different file contents found in the following:

[error] 

C:Usersgooper.ivy2cacheorg.springframeworkspring-webjarsspring-web-4.0.5.RELEASE.jar:org/springframework/web/multipart/support/DefaultMultipartHttpServletRequest.class

[error] C:Usersgooper.ivy2cacheorg.springframeworkspring-webmvcjarsspring-webmvc-2.5.4.jar:org/springframework/web/multipart/support/DefaultMultipartHttpServletRequest.class


나. 조치사항

libraryDependencies에서 "provided"를 지정해서 assembly에 포함되지 않도록 함


"org.springframework" % "spring-web" % "4.0.5.RELEASE" % "provided" ,

"org.springframework" % "spring-webmvc" % "4.0.5.RELEASE" % "provided",


2. provided를 지정해서 assembly에서 제외할 수는 없고 일부 jar파일만 제외해야 하는 상황

가. 메세지 내용

java.lang.RuntimeException: deduplicate: different file contents found in the following:

C:Usersgooper.ivy2cachestaxstax-apijarsstax-api-1.0.1.jar:javax/xml/XMLConstants.class

C:Usersgooper.ivy2cachexml-apisxml-apisjarsxml-apis-1.4.01.jar:javax/xml/XMLConstants.class

deduplicate: different file contents found in the following:

C:Usersgooper.ivy2cachestaxstax-apijarsstax-api-1.0.1.jar:javax/xml/namespace/NamespaceContext.class

C:Usersgooper.ivy2cachexml-apisxml-apisjarsxml-apis-1.4.01.jar:javax/xml/namespace/NamespaceContext.class

deduplicate: different file contents found in the following:

C:Usersgooper.ivy2cachestaxstax-apijarsstax-api-1.0.1.jar:javax/xml/namespace/QName.class

C:Usersgooper.ivy2cachexml-apisxml-apisjarsxml-apis-1.4.01.jar:javax/xml/namespace/QName.class

....

나. 조치사항

: 포함되는 jar를 찾아서 exclude를 지정한다.

libraryDependencies에서 ("org.apache.jena" % "jena-core" % "3.1.0").exclude("stax", "stax-apis").exclude("xml-apis", "xml-apis")를 지정해준다.


*참고 : https://mvnrepository.com에서 "stax-api"를 검색하며 해당 jar의 groupId와 artifactId를 확인해서 

exclude(groupId, artifactId)를 지정해주면된다.

*어떤 jar가 문제되는 jar를 포함하고 있는지 확인하기가 힘든데.. provided로 지정되지 않은 jar에 exclude를 지정해서 "sbt assembly"를 

수행해서 정상적으로 assembly되는 케이스를 반복해서 찾아야함.



번호 제목 날짜 조회 수
510 spark-submit으로 spark application실행하는 다양한 방법 2016.05.25 4408
509 Windows7 64bit 환경에서 Apache Spark 2.2.0 설치하기 2017.07.26 4404
508 [Kudu]Schema별 혹은 테이블별 사용량(Replica포함) 구하는 방법 2022.07.14 4403
507 VirtualBox에 ubuntu 설치 하기 (12.10) file 2013.03.04 4403
506 kudu hms check 사용법(예시) 2021.10.22 4399
505 [Solr in Cloudera]Solr Data Directory변경 방법/절차 2023.04.21 4393
504 Cloudera의 CMS각 컴포넌트의 역할 2020.02.10 4390
503 lagom-linux용 build.sbt파일 내용 2017.10.12 4385
502 [Hadoop Encryption] Encryption Zone 생성/설정시 User:hadoop not allowed to do 'DECRYPT_EEK' ON 'testkey' 오류 발생 조치 사항 2023.06.28 4377
501 Kafka Offset Monitor로 kafka 상태 모니터링 하기 file 2016.11.08 4374
500 mongodb에서 큰데이타 sort시 오류발생에 대한 해결방법 2015.12.22 4373
499 RHEL 7.4에 zeppelin 0.7.4 설치 2018.07.31 4372
498 [TLS]TLS용 사설 인증서 변경 혹은 신규 지정시 No trusted certificate found 오류 발생시 확인및 조치사항 2022.03.15 4370
497 scala application 샘플소스(SparkSession이용) 2018.03.07 4364
496 통계자료 구할수 있는 곳 2014.04.16 4361
495 동일서버에서 LA와 LC동시에 기동하여 테스트 2014.04.01 4360
494 No broker partitions consumed by consumer thread오류 발생시 확인/조치할 사항 2016.09.02 4353
493 Hadoop 완벽 가이드 정리된 링크 2016.04.19 4349
492 [Magento]php7에 Composer를 이용하여 Magento 2.1.3 설치 file 2017.01.30 4348
491 centsOS vsftpd설치하기 2013.12.17 4348
위로