java.io.IOException: Can't read [[email protected]] (Can't process class [WEB-INF/clas

执行Maven Install打包的时候,出现以下错误信息:

[proguard] ProGuard, version 4.4
 [proguard] Reading input...
 [proguard] Reading program war [F:\Workspaces\pro-test\target\pro-test-0.0.1-SNAPSHOT.war] (filtered)
 [proguard] java.io.IOException: Can‘t read [[email protected]5ef04b5] (Can‘t process class [WEB-INF/classes/pro/test/First.class] (Unsupported version number [52.0] for class format))
 [proguard]     at proguard.InputReader.readInput(InputReader.java:230)
 [proguard]     at proguard.InputReader.readInput(InputReader.java:200)
 [proguard]     at proguard.InputReader.readInput(InputReader.java:178)
 [proguard]     at proguard.InputReader.execute(InputReader.java:78)
 [proguard]     at proguard.ProGuard.readInput(ProGuard.java:195)
 [proguard]     at proguard.ProGuard.execute(ProGuard.java:78)
 [proguard]     at proguard.ProGuard.main(ProGuard.java:499)

问题分析



产生该错误的原因是因为项目使用的Java(JDK)版本比较高,而ProGuard, version 4.4支持的版本(最高到1.6),所以产生该问题。

解决方案



以问题的解决方案与“Error: Unsupported java version ‘1.8’ in line 2 of file ‘proguard.conf’”的一致:

改用com.github.wvengen的proguard-maven-plugin

repo地址为:http://repo1.maven.org/maven2/com/github/wvengen/proguard-maven-plugin/

完整示例如下:

            <plugin>
                <groupId>com.github.wvengen</groupId>
                <artifactId>proguard-maven-plugin</artifactId>
                <version>2.0.10</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>proguard</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <proguardVersion>5.2</proguardVersion>
                    <obfuscate>true</obfuscate>
                    <proguardInclude>${basedir}/proguard.conf</proguardInclude>
                    <!-- 添加依赖,这里你可以按你的需要修改 -->
                    <libs>
                        <lib>${java.home}/lib/rt.jar</lib>
                        <lib>E:/tomcat-8.0/lib/jsp-api.jar</lib>
                        <lib>E:/tomcat-8.0/lib/servlet-api.jar</lib>
                    </libs>
                    <addMavenDescriptor>false</addMavenDescriptor>
                    <injar>${project.build.finalName}.war</injar>
                    <outjar>${project.build.finalName}-pg.war</outjar>
                    <outputDirectory>${project.build.directory}</outputDirectory>
                </configuration>
                <dependencies>
                    <!-- 使用5.2版本来混淆 -->
                    <dependency>
                        <groupId>net.sf.proguard</groupId>
                        <artifactId>proguard-base</artifactId>
                        <version>5.2</version>
                        <scope>runtime</scope>
                    </dependency>
                </dependencies>
            </plugin>

java.io.IOException: Can't read [[email protected]] (Can't process class [WEB-INF/clas

时间: 2024-10-12 13:31:16

java.io.IOException: Can't read [[email protected]] (Can't process class [WEB-INF/clas的相关文章

hadoop错误Ignoring exception during close for [email&#160;protected] java.io.IOException Spill failed

1.错误    Ignoring exception during close for [email protected] java.io.IOException: Spill failed2.原因     本地磁盘空间不足非hdfs (我是在myeclipse中调试程序,本地tmp目录占满)3.解决     清理.增加空间 如果,您认为阅读这篇博客让您有些收获,不妨点击一下右下角的[推荐]. 如果,您希望更容易地发现我的新博客,不妨点击一下左下角的[关注我]. 如果,您对我的博客所讲述的内容有

sqoop1.4.5 导入 hive IOException running import job: java.io.IOException: Hive exited with status 1

sqoop 导入 hive hive.HiveImport: Exception in thread "main" java.lang.NoSuchMethodError: org.apache.thrift.EncodingUtils.setBit(BIZ)B ERROR tool.ImportTool: Encountered IOException running import job: java.io.IOException: Hive exited with status 1

hadoop异常 java.io.IOException: Job status not available

[[email protected] conf]$ hadoop jar /usr/lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar wordcount /user/lizeyi/people.txt  /user/lizeyi/wordcount7 15/06/08 18:36:16 INFO client.RMProxy: Connecting to ResourceManager at master.hadoop/10.3.4.35:80

Spakr- ERROR Shell: Failed to locate the winutils binary in the hadoop binary path java.io.IOException: Could not locate executable null\bin\winutils.exe in the Hadoop binaries.

运行 mport org.apache.log4j.{Level, Logger} import org.apache.spark.rdd.RDD import org.apache.spark.{SparkConf, SparkContext} /** * Created by Lee_Rz on 2017/8/30. */ object SparkDemo { def main(args: Array[String]) { Logger.getLogger("org.apache.spark

错误号org.apache.catalina.connector.ClientAbortException: java.io.IOException: Broken pipe

在说这个错误之前,我先介绍下背景,我们项目用的是SpringBoot框架,集成Hprose+spring+mybatis,Hprose是什么,可以参考我上篇对Hprose的一个简单介绍.当前项目业务是抓取一个网站近5年的足球篮球的赔率数据.所以这是个按照日期进行的一个大循环.介于Hprose特性,Hprose服务端的处理时间会特别长,这是个重点. 在项目上线抓取数据时,linux环境下,我们的程序出现了这样一个错误,如下: 2016-06-16 12:47:52.190 WARN 10150 -

java.io.IOException: Type mismatch in key from map:解决方法

执行MR程序的时候发生异常:java.lang.Exception: java.io.IOException: Type mismatch in key from map: expected org.apache.hadoop.io.Text, received org.apache.hadoop.io.LongWritable 日志如下: 2016-05-09 21:33:28,871 INFO [org.apache.hadoop.conf.Configuration.deprecation

HBase中此类异常解决记录org.apache.hadoop.ipc.RemoteException(java.io.IOException):

ERROR: Can't get master address from ZooKeeper; znode data == null   一定注意这只是问题的第一层表象,真的问题是: File /hbase/.tmp/hbase.version could only be replicated to 0 nodes instead of minReplica 网上很多都是叫用两种方式解决 stop/start  重启hbase 格式化 hdfs namenode -format,不能随随便便就格

关于java.io.IOException: HADOOP_HOME or hadoop.home.dir are not set.的问题

报错如下: 300 [main] DEBUG org.apache.hadoop.util.Shell - Failed to detect a valid hadoop home directory java.io.IOException: HADOOP_HOME or hadoop.home.dir are not set 解决办法一: 根据 http://blog.csdn.net/baidu_19473529/article/details/54693523 配置hadoop_home变

java.io.IOException: Cannot run program &quot;/opt/jdk1.8.0_191/bin/java&quot; (in directory &quot;/var/lib/jenkins/workspace/xinguan&quot;): error=2, No such file or directory

测试jenkins构建,报错如下 Parsing POMs Established TCP socket on 44463 [xinguan] $ /opt/jdk1.8.0_191/bin/java -cp /var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven35-agent-1.13.jar:/opt/maven-3.6/boot/plexus-classworlds-2.5.2.jar:/opt/maven-3.6/conf/log