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

Standalone Tomcat's instrumenting fails to load at obfuscated classes #44

Closed
Altaflux opened this issue Dec 6, 2015 · 4 comments
Closed
Assignees
Labels

Comments

@Altaflux
Copy link

Altaflux commented Dec 6, 2015

Without exact information about the reasons it looks like some obfuscated classes when being loaded by the QuasarWebAppClassLoader fail to be parsed, not because Quasar cannot instrument them, but because their names are not parse-able correctly and fail with StringIndexOutOfBoundsException which fully stops the web application from starting.

On line 72 of QuasarWebAppClassLoader :
if (entry != null && path.endsWith(".class") && entry.binaryContent != null) {
String className = name.substring(0, name.length() - ".class".length());

This are the parameters used.
name=d.a
path=d/a.class
manifestRequiere=true

The condition checks if the path contains the ".class" word but the name does not contains it.
As this condition is outside the try catch block it stops the startup of the application as the exception propagates.

@circlespainter
Copy link
Member

Sorry for the delay, thanks, I'll have a look at it soon.

@circlespainter circlespainter self-assigned this Jan 15, 2016
@Altaflux
Copy link
Author

Thanks for taking a look,
unluckily I cannot send you the library we are using that triggers the problem as it is third party proprietary but I can help testing it to see if it resolves the issue.

@circlespainter
Copy link
Member

Can you check if it still happens with the tip of the fix-44 branch? There's also a 0.7.0-SNAPSHOT published on SonaType that includes this robustnesess (tentative) fix.

@Altaflux
Copy link
Author

@circlespainter
Hi, Snaphot 0.7.0-Snapshot did the trick and now it can load the obfuscated classes correctly.

Thanks a lot!

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

No branches or pull requests

2 participants