Comments (2)
Update:
I was able to resolve this.
Now I am facing another issue while deserialization
I just want to obfuscate one package and want to keep rest of my classes as it is, still I guess proguard is modifying the byte code of the class I added as Keep in the pro rules.
java.lang.IllegalStateException: unread block data
at java.base/java.io.ObjectInputStream$BlockDataInputStream.setBlockDataMode(ObjectInputStream.java:3033)
at java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1722)
at java.base/java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2496)
at java.base/java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2390)
at java.base/java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2228)
at java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1687)
at java.base/java.io.ObjectInputStream.readObject(ObjectInputStream.java:489)
at java.base/java.io.ObjectInputStream.readObject(ObjectInputStream.java:447)
at org.apache.spark.serializer.JavaDeserializationStream.readObject(JavaSerializer.scala:87)
at org.apache.spark.serializer.JavaSerializerInstance.deserialize(JavaSerializer.scala:129)
at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:507)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
sample.pro
-keep class java.** { ; }
-keep class kotlin.* { ; }
-keep class groovy.* { *; }
-keep interface java.** { ; }
-keep interface kotlin.* { ; }
-keep interface groovy.* { *; }
#-dontnote kotlin.**
#-dontnote kotlinx.**
#-dontnote com.google.gson.**
-keep class com.datametica.eagle.service.* {
*;
}
-keep class com.datametica.eagle.input.* {
;
}
-keep class com.datametica.eaglecore.enrichstatement.result.* {
*;
}
-keep class com.datametica.eaglecore.enrichstatement.domain.entity.** {
;
}
-keep class com.datametica.eaglecore.relationshipextraction.services. {
;
}
-keep class com.datametica.eagle.schema. {
;
}
-keep class com.datametica.eagle.sql.dictionary. {
;
}
-keep class com.datametica.eagle.extensions. {
;
}
-keep class com.datametica.eaglecore.relationshipextraction.domain. {
*;
}
-keep interface com.datametica.eaglecore.relationshipextraction.domain.* {
*;
}
-keep interface com.datametica.eaglecore.relationshipextraction.services.* {
;
}
-keep,includedescriptorclasses,includecode class com.datametica.eagle.serialization.kryo.* {
*;
}
-keep enum ** {
*;
}
-keepclassmembers class ** {
static java.lang.String *;
}
-keepclassmembers class ** {
synthetic ;
synthetic ;
}
-keepparameternames
-keep class com.datametica.eaglecore.commons.dictionary.* {
;
}
-keep class com.datametica.eagle.provider.querylogprovider. {
;
}
-keep class com.datametica.eaglecore.enrichstatement.builder.domain. {
;
}
-keep class com.datametica.eaglecore.enrichstatement.expression. {
;
}
-keep interface com.datametica.eaglecore.enrichstatement.expression. {
;
}
-keep public class com.datametica.eaglecore.definitionExtraction.helper. {
;
}
-keep public class com.datametica.eaglecore.definitionExtraction.domain. {
;
}
-keep public class com.datametica.eaglecore.definitionExtraction.core. {
;
}
-keep public class com.datametica.eaglecore.calcite.* {
*;
}
#Testing purpose
-keepattributes Signature
-keepattributes SourceFile,ConstantValue,LineNumberTable,RuntimeVisibleAnnotations,RuntimeInvisibleAnnotations,RuntimeVisibleParameterAnnotations,RuntimeInvisibleParameterAnnotations,StackMapTable,EnclosingMethod
-keepnames class **
-keepnames interface **
-keeppackagenames
-dontshrink
-dontoptimize
-ignorewarnings
-dontpreverify
-dontskipnonpubliclibraryclasses
-dontskipnonpubliclibraryclassmembers
-dontusemixedcaseclassnames
-printconfiguration config-output.txt
-verbose
-forceprocessing
#-dontobfuscate
#-target 11
-printmapping proguard.map
Thanks in advance
from proguard.
If you're running code on the JVM then you must preverify the classes: so you should remove -dontpreverify
from the configuration.
If you enable any of shrinking, optimization or obfuscation, then the stackmap frames are removed at the beginning of ProGuard here.
The preverification is then executed at the end of ProGuard to recompute the stackmap frames after any modifications that ProGuard would have made due to shrinking, optimization or obfuscation here.
It's not clear how your problem is related to your configuration though. Can you provide a reproducible sample?
from proguard.
Related Issues (20)
- How to find root issue relate "It appears you are missing some classes resulting in an incomplete class hierarchy" HOT 1
- Generics from interfaces are removed HOT 7
- When I use Spring Framework 6.x, I can mix up packaging normally, but the controller reports an error after running it HOT 1
- Annotation with parameters
- `code/simplification/object` optimisation causing `NullPointerException`
- application-kotlin example doesn't support using Kotlin imports HOT 2
- Method of lambda expression passed as an instance of an interface defined in obfuscated library is not obfuscated correclty
- kotlin 2 support HOT 1
- How to skip some jars in multi jars
- Feature request: Support for Intellji IDE Plugin
- AbstractMethodError When Using Kotlin Extension Functions (reified, inline, and crossinline keywords) with Java Swing Components that Use ActionEvent HOT 4
- Poor performance when overrunning a large obfuscation dictionary HOT 1
- Reproducible output jar
- java.lang.VerifyError: Bad type on operand stack for Kotlin 2.0 and KotlinX Serialization HOT 1
- Obfuscate HOT 2
- How to obfuscate war HOT 1
- jar in tomcat HOT 1
- Feature request: Override the logging level for proguard() Gradle task action
- Proguard (obfuscator) for J2ME Wireless Toolkit 2.2 (2005) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from proguard.