Exception in thread “main” java.lang.SecurityException: Invalid signature file digest for Manifest main attributes

前端 未结 6 1877
忘掉有多难
忘掉有多难 2020-12-17 16:17
Exception in thread \"main\" java.lang.SecurityException: Invalid signature file d                    igest for Manifest main attributes
        at sun.security.util         


        
6条回答
  •  囚心锁ツ
    2020-12-17 17:08

    I was trying to create an uber jar with maven and ran in to this problem and I was able to solve the issue as follows.

    Here is how I configured the shade plugin to include twitter4j to my uber jar.

    
    org.apache.maven.plugins
    maven-shade-plugin
    2.4.2
    
        
            package
            
                shade
            
            
    
                
                    
                        spark-streaming-twitter_2.10:spark-streaming-twitter_2.10
                        
                            **
                        
                    
                    
                        twitter4j-stream:twitter4j-stream
                        
                            **
                        
                    
                    
                        *:*
                        
                            META-INF/*.SF
                            META-INF/*.DSA
                            META-INF/*.RSA
                        
                    
                
            
        
    
    
    

    Hope this helps.

提交回复
热议问题