메뉴 건너뛰기

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



번호 제목 날짜 조회 수
541 SASL configuration failed: javax.security.auth.login.LoginException: java.lang.NullPointerException 오류 해결방법 2015.04.02 798
540 우분투에서 패키지 설치시 E: Sub-process /usr/bin/dpkg returned an error code 발생시 조치 2017.05.02 794
539 hortonworks에서 제공하는 메모리 설정값 계산기 사용법 file 2015.06.14 785
538 hue.desktop_document2의 type의 종류 2020.02.10 776
537 lateral view 예제 2014.09.18 773
536 solr 인스턴스 기동후 shard에 서버가 정상적으로 할당되지 않는 경우 해결책 2016.04.29 769
535 [Sentry]HDFS의 ACL을 Sentry와 연동후 테스트 2020.06.02 761
534 sendmail전송시 421 4.3.0 collect: Cannot write ./dfv5BA2EBS010579 (bfcommit, uid=0, gid=114): No such file or directory 발생시 조치사항 2017.06.11 755
533 서버 5대에 solr 5.5.0 설치하고 index data를 HDFS에 저장/search하도록 설치/설정하는 방법(SolrCloud) 2016.04.08 747
532 CentOS 7.x에 Jupyter설치 2018.04.18 745
531 fuseki용 config-examples.ttl 예시 내용 2017.05.17 745
530 java.lang.OutOfMemoryError: unable to create new native thread오류 발생지 조치사항 2016.10.17 742
529 znode /hbase recursive하게 지우기 2015.05.06 739
528 Halyard - RDF4J와 Apache HBase를 이용하여 구현된 TripleStore이며 SPARQL 1.1쿼리를 지원한다. 2016.12.29 733
» [SBT] assembly시 "[error] deduplicate: different file contents found in the following:"오류 발생시 조치사항 2016.08.04 730
526 solr에서 한글사용시 주의점 2014.09.26 728
525 springframework를 이용한 war를 생성하는 build.gradle파일(참고용) 2016.08.19 727
524 Spark 1.6.1 설치후 HA구성 2016.05.24 725
523 Flume을 이용한 데이타 수집시 HBase write 성능 튜닝 file 2016.10.31 724
522 lubuntu 호스트 네임변경 2014.08.03 721
위로