resess / Slicer4J

Slicer4J is an accurate, low-overhead dynamic slicer for Java programs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Library classes in jar are thrown out during instrumentation

Lms24 opened this issue · comments

Hello,

I am currently trying to create dynamic slices from the test cases of this project. The project depends on the following libraries:

<dependencies>
  <dependency>
    <groupId>javax.servlet</groupId>
    <artifactId>servlet-api</artifactId>
    <version>2.5</version>
  </dependency> 
  <dependency>
    <groupId>junit</groupId>
    <artifactId>junit</artifactId>
    <version>4.11</version>
    <scope>test</scope>
  </dependency>
</dependencies>

I've created a fat jar containing the compiled source and test classes, as well as the classes of all libraries.

After instrumenting the jar with SLice4J (mode i), the classes from javax.servlet are all missing in the resulting *_i.jar file! This is a problem as I get exceptions like this one for obvious reasons when I want to trace the execution:

Exception in thread "main" java.lang.NoClassDefFoundError: javax/servlet/http/HttpServletRequest

Is there something I can do as a user of Slicer4J to fix this or is this a problem/bug in the implementation or one of its libraries (soot?)?

Thanks and have a nice day!

It seems like a bug. Can you please attach the fat jar?

Thanks for the quick response.

This is my original fat jar (packed as zip)
cors-filter-1.0.2-SNAPSHOT-fat-tests.zip

And just in case you need it, here's the instrumented version from Slicer4J:
cors-filter-1.0.2-SNAPSHOT-fat-tests_i.zip