메뉴 건너뛰기

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되는 케이스를 반복해서 찾아야함.



번호 제목 날짜 조회 수
321 Cloudera Manager에서 "Mismatched CDH versions: host has NONE but role expects 5 Suppress..."와 같이 오류 발생시 확인사항 2018.06.06 454
320 우분투 16.04LTS에 Zeppelin 0.7.3설치 2018.04.18 454
319 solr명령 실행시 "Session 0x0 for server null, unexpected error, closing socket connection and attempting reconnect" 오류발생 2017.06.30 454
318 build할때 unmappable character for encoding MS949 에러 발생시 조치사항 2016.08.03 454
317 [sap] Error: java.io.IOException: SQLException in nextKeyValue 오류 발생 2020.06.08 453
316 [shell script] 파일을 한줄씩 읽어서 파일내용으로 명령문 만들고 실행하는 shell script예제 2017.02.21 453
315 특정 단계의 commit상태로 만들기(이렇게 하면 중간에 반영된 모든 commit를 history가 삭제된다) 2016.11.17 453
314 원격에 있는 git를 받은후 기존repository삭제후 새로운 리포지토리에 연결하여 소스 등록 2019.07.13 450
313 권한회수 및 권한부여 명령 몇가지 2017.11.16 450
312 모두를 위한 머신러닝과 딥러닝의 강의 file 2016.09.27 450
311 [oozie] oozie shell action에서 shellscript수행결과의 2개 변수를 decision 액션에서 사용하기 2020.06.05 449
310 hadoop nfs gateway설정 (Cloudera 6.3.4, CentOS 7.4 환경에서) 2022.01.07 448
309 maven을 이용하여 Hello world 서비스 자동 생성시 HelloServiceImpl.java에서 사용하는 getMessage() 와 getName() 이 정의되지 않은 오류가 발생시 조치방법 2018.01.19 448
308 프로세스를 확인해서 프로세스를 삭제하는 shell script예제(cryptonight) 2018.02.02 446
307 git설명 한글판 2015.12.09 446
306 cloudera서비스 중지및 기동순서 2020.02.14 445
305 [shellscript] 함수에 배열을 인자로 주어서 처리하는 방법 2019.07.16 442
304 No broker partitions consumed by consumer thread오류 발생시 확인/조치할 사항 2016.09.02 441
303 MapReduce2.0(YARN)기반의 CDH5 설치시 생성되는 사용자및 권한 부여 2018.05.30 440
302 python3.5에서 numpy버젼에 따른 문제점을 조치하는 방법및 pymysql import할때 오류 발생시 조치사항 2017.09.28 440
위로