Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Library classes in jar are thrown out during instrumentation #15

Open
Lms24 opened this issue Nov 5, 2021 · 2 comments
Open

Library classes in jar are thrown out during instrumentation #15

Lms24 opened this issue Nov 5, 2021 · 2 comments

Comments

@Lms24
Copy link

Lms24 commented Nov 5, 2021

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!

@khaled-e-a
Copy link
Collaborator

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

@Lms24
Copy link
Author

Lms24 commented Nov 5, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants