Question

I'm trying to obfuscate some jar files with yGuard.

The shrink task seems to work fine, but the first rename throws an exception.

Obfuscating Jar C:\work\jars\yguard_temp_8318169257227053930.jar to base_obf.jar [rename] An error ('No mapping found for: Class java.util.Deque') occured during the remapping! See the log!)

BUILD FAILED C:\rms\Setup_FlashAbsicherungsTool_3.4.X_ALPHA2\build.xml:32: yGuard encountered an IO problem!

The log brings no help either:

<!-- An exception has occured.
com.yworks.yguard.obf.NoSuchMappingException: No mapping found for: Class java.util.Deque
com.yworks.yguard.obf.NoSuchMappingException: No mapping found for: Class java.util.Deque
    at com.yworks.yguard.obf.ClassTree.mapMethod(Unknown Source)
    at com.yworks.yguard.obf.classfile.ClassFile.remap(Unknown Source)
    at com.yworks.yguard.obf.GuardDB.remapTo(Unknown Source)
    at com.yworks.yguard.ObfuscatorTask.execute(Unknown Source)
    at com.yworks.yguard.YGuardTask.execute(Unknown Source)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:592)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:435)
    at org.apache.tools.ant.Target.performTasks(Target.java:456)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1364)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1248)
    at org.apache.tools.ant.Main.runBuild(Main.java:851)
    at org.apache.tools.ant.Main.startAnt(Main.java:235)
    at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280)
    at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
-->

Any help highly appreciated. Cannot figure out the reason for that.

Was it helpful?

Solution

Seems the problem arises when you include some class using externalclasses nested element while it also happens to be inside the jar (and it's likely that it also has to be accessible from points specified in shrink element).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top