메뉴 건너뛰기

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



번호 제목 날짜 조회 수
550 [shellscript]엑셀파일에서 여러줄에 존재하는 단어를 한줄의 문자열로 합치는 방법(comma로 구분) 2019.07.15 4475
549 우분투 root 패스워드 설정하기 2013.03.04 4474
548 DataNode를 기동할때 "Block pool ID needed, but service not yet registered with NN" 오류 발생에 따른 조치사항 2018.05.28 4468
547 secureCRT에서 backspace키가 작동하지 않는 경우 해결방법 2015.05.11 4466
546 cloudera(python 2.7.5)에서 anaconda3로 설치한 외부 python(3.6.6)을 이용하여 pyspark를 사용하는 설정 2018.09.14 4463
545 apt-get install mysql-server수행시 "404 Not Found" 오류발생시 조치방법 2014.09.10 4462
544 ubuntu에 hadoop 2.0.5설치하기 2013.12.16 4459
543 kudu 테이블 metadata강제 삭제시 발생하는 오류 메세지 2022.01.12 4457
542 Error: IO_ERROR : java.io.IOException: Error while connecting Oozie server 2022.05.02 4453
541 Cannot create /var/run/oozie/oozie.pid: Directory nonexistent오류 2014.06.03 4450
540 Error: Could not find or load main class nodemnager 가 발생할때 해결하는 방법 2015.06.05 4448
539 unique한 값 생성 2014.04.25 4448
538 Hadoop Clsuter에 이미 포함된 host의 hostname변경시 처리 절차 2023.03.24 4445
537 [CDP7.1.7]EncryptionZone에 table생성및 권한 테스트 2023.09.26 4444
536 source의 type을 spooldir로 하는 경우 해당 경로에 파일이 들어오면 파일단위로 전송함 2014.05.20 4442
535 Spark 1.6.1 설치후 HA구성 2016.05.24 4439
534 HBase 0.98.12(1.2.5) for hadoop2 설치-5대에 완전분산모드 (HDFS HA상테) 2015.04.29 4434
533 Cloudera Manager의 Java Heap Size변경하는 방법 2022.06.27 4433
532 zookeeper 3.4.6 설치(3대) 2015.04.28 4433
531 Mybatis foreach 문법정리(상황에 따른 사용법) 2015.11.10 4430
위로