Have you ever found yourself frustrated with a ClassNotFoundException? Would you like to know what libraries are in your project and what they depend on? Would you like to get a full report on this stuff every time you run your ant build? If so you need to take a look at the new JBoss Tattletale project!
JBoss Tattletale is a tool that can help you get an overview of the project you are working on or a product that you depend on.
The tool will provide you with reports that can help you
- Identify dependencies between JAR files
- Find missing classes from the classpath
- Spot if a class is located in multiple JAR files
- Spot if the same JAR file is located in multiple locations
- Identify JAR file versions
- With a list of what each JAR file requires and provides
- Verify the SerialVersionUID of a class
JBoss Tattletale will recursive scan a directory for JAR files and generate linked and formatted HTML reports.
JBoss Tattletale is licensed under GNU Lesser General Public License (LGPL) version 2.1 or later.
We hope that JBoss Tattletale will help you in your development tasks !
:) Thank you.
Can this be used to create OSGi based manifest.mf or jboss-classloading.xml?
Good ideas - file them as JIRAs. I'm currently looking at making the tool know more about classloading structures in AS 4.x/5.x (and EAP).
I think a more common cause of ClassNotFoundExceptions is when using multiple deployment units/modules in a runtime with multiple classloaders hierarchies.
I am not sure that not having the class packaged in a jar whilst having references to it constitutes an error as this is the case for some of Seams extensions which we have found whilst instrumenting the code at load-time.
We have actually a (JVM)Insight extension to help with ClassNotFound and ClassCastExceptions. I published an blog entry nearly two years back on this.
@William Louth : you are correct without being able to have classloader scoping you can still have problems, especially in multi-tiered runtimes like EE5 containers We wanted to keep this tool as a standalone utility and not a runtime analyzer. In order to still provide feedback on classloader problems we are working on classloader schemes that can be configured and plugged in. So there could be a JBoss 5 classloader, or a WebLogic Classloader scheme. The idea being that TattleTale could them tell you what classed don't have visibility to dependencies.
@Julien Viet : Not atm - but put in a JIRA ;-) It would be a good addition.
Is there a maven plugin for it? How does it compare to the maven dependency tree reports?
Hi guys, this looks like a really nice tool, so I wanted to give it a try, but when running it on a project folder, I get this exception:
Scan: null java.lang.NullPointerException at org.jboss.tattletale.analyzers.ArchiveScanner.scan(ArchiveScanner.java:137) at org.jboss.tattletale.Main.main(Main.java:194) null
I have searched jira for this issue, and found a patch for this issue in a difference file. Can you please tell me if this is already included in some binary build, or do I have to get the code from SVN and apply it myself?
Thanks, Mihai
I would like to see a maven plugin for this, and more than just for reporting. I would like to see junit, or testng integration and rules so that you could set thresholds that if triggered will cause a test failure. For maven this could include validation of pom.xml to the real life package.
The different with the dependency report is that shows you what Maven has resolved for deps, not always reality ;-) Tattletale will actually scan the file system for what ends up where.
Any ideas please post on the forums, or create a jira and we can go from there.
-Jay
I would recommend just downloading the source and building it. It takes no time at all. We'll do a beta2 at some point in the future.
Hi Jay,
Thanks for the tip, I'll give it a try.
Cheers, Mihai
I first misread the name as Battlesnake ;)
I have done what you suggested, and it worked this time. Thanks again, the tool is really nice and gets you a good overview of dependencies.
Cheers, Mihai