-
1. Re: Empty Reports
tomjenkinson Jun 28, 2011 9:03 AM (in response to atc)Hi,
We are in the process of re-engineering the Mass tool so unfortunately I am not sure if you will get a great answer to this question.
That said, I am more than happy to try to help you with this question.
Firstly, looking at the example config.xml, it appears you are missing the server configuration. I have attached an example configuration file to show this. The running server is used to query MBeans, if you are not requiring output from that then you probably don't need that.
I presume you are wanting to see output like the dependencies etc. From looking at the groovy scripts (find <MASS_SRC_DIR> -name \*.groovy) I can see DependenciesScript.groovy is the one that does this. It looks like it does this by executing a different script called ./tools/depfinder/bin/ClassMetrics[.bat]
Presumably this is for some reason not triggering. If it was it looks like you would expect a file called Test.ClassMetrics to have been created in the directory $MAT_HOME/data/
Thinking about it now, it looks like you checked the $MAT_HOME/reports folder for output, did you check $MAT_HOME/data?
Perhaps you can send us the complete output from running the Mass tool? Can you let us see the generated index.html too please?
On reflection also, you say you have a DependencyGraph.html can you tell us which report in particular you are wanting to see and I will check the code again.
Sorry, I couldn't be more helpful, as I say we are in the ongoing process of re-architecting this so it would be great to get some feedback on missing features etc. You are welcome to Jira issues over at: https://jira.jboss.org/jira/browse/MASS
Tom
-
2. Re: Empty Reports
atc Jun 28, 2011 10:16 AM (in response to tomjenkinson)Hi Tom, thanks for taking the time to reply.
Firstly the obvious stuff; here's my server's config:
<servers> <server id="weblogic10.3"> <protocol>t3</protocol> <host>localhost</host> <port>7001</port> <!--admin/password--> <username>weblogic</username> <password>welcome1</password> <weblogic-version>10.3</weblogic-version> <mbeans> <mbean type="Domain" label="Domains"/> <mbean type="Server" label="Servers"/> <mbean type="Cluster" label="Clusters"/> <mbean type="JDBCConnectionPool" label="JDBC Connection Pools" /> <mbean type="StartupClassConfig" label="Startup Classes" /> <mbean type="ShutdownClassConfig" label="Shutdown Classes" /> <mbean type="Domain" label="Domains"/> <mbean type="AppDeployment" label="Applications"/> <mbean type="Server" label="Servers"/> <mbean type="EJBComponent" label="EJB Components" /> <mbean type="WebAppComponent" label="Web App Components" /> </mbeans> </server> </servers> The data directory does actually contain the .ClassMetrics file, so it seems the script you were referring to did actually execute, but the HTML was not generated; there's also a Test.DependencyExtractor.xml file which is around 5 million lines long, so I think it's just the HTML generation phase that's not working.
I'm expecting to see -- naively or not -- the same level of detail that the example report demonstrates. Is that feasible or have I got the wrong end of the stick?
Can you elaborate on where the "codebase" element should point to? What about classpath definition?
Thanks again for your reply,
Alex
Message was edited by: atc - removed some XML comments to make it all easier on the eye
-
3. Re: Empty Reports
bensonfungjava Jun 28, 2011 11:32 AM (in response to atc)Hi,
codebase is pointing to the application base directory. Of course, the codebase can point to the exploded WAR directory.
classpath definition is pointing the particular dependent directory which contains all the jar file.
Benson
-
4. Re: Empty Reports
tomjenkinson Jun 28, 2011 12:01 PM (in response to atc)Hi Alex, by the same level of detail, I assume you mean a report like:
http://middlewareconnections.com/reports/reports.html
It looks to me like the command is not completing as expected. For example, you should see:
REPORTS_DIR/reports/Test/descriptor.html
Please can you send me the command line output from when you run the script to generate the report?
In terms of codebase, you are right to point it at an exploded war/ear directory. If you did point it at a war it would expand it for you automatically.
It is expecting to find META-INF/application.xml and/or WEB-INF/web.xml under there.
Looking at the code it seems like you can try to use "basedir" instead of "codebase" or maybe as well as? You could try to add:
<basedir>/home/collina8/src/java/test/dev/target/exploded</basedir>
And see what happens?
Tom
-
5. Re: Empty Reports
atc Jun 29, 2011 5:20 AM (in response to tomjenkinson)Hi Tom,
Yes, that's what I mean by same level of detail. That'd be the ideal case, as it's a good amount of metrics and a decent overview.
Thanks for clarifying the codebase element - the app should happily find the WEB-INF/web.xml file under that, so no problems there.
I've added basedir so I have both codebase and basedir elements under my application definition, but no difference in report generated - i.e. there's only the index and dependencyGraph HTML files generated under the reports/Test folder.
I then tried commenting-out the "codebase" element and was presented with "java.io.FileNotFoundException: /home/collina8/src/java/jboss/mass/data/Test.DependencyExtractor.xml (No such file or directory)", so it seems necessary.
Here is the command line output; I've also attached the "redhat.log" file for good measure.
Buildfile: /home/collina8/src/java/jboss/mass/build/build.xml
compile-scripts:
[delete] Deleting directory /home/collina8/src/java/jboss/mass/build/dist
[mkdir] Created dir: /home/collina8/src/java/jboss/mass/build/dist
[mkdir] Created dir: /home/collina8/src/java/jboss/mass/build/dist/classes
[groovyc] Compiling 7 source files to /home/collina8/src/java/jboss/mass/build/dist/classes
[jar] Building jar: /home/collina8/src/java/jboss/mass/build/dist/mat.jar
main:
BUILD SUCCESSFUL
Total time: 3 seconds
_________________________________________________________________________
Thanks to all who've replied, it's really appreciated.
-
redhat.log.zip 616 bytes
-
-
6. Re: Empty Reports
tomjenkinson Jul 4, 2011 4:37 AM (in response to atc)Hi Alex,
Sorry it took a while to respond to you. I checked the Red Hat log file and it says this:
2011-06-29 09:44:18,257 [main] INFO Utils : Running process: /home/collina8/src/java/jboss/mass/tools/depfinder/bin/DependentsToHTML -in /home/collina8/src/java/jboss/mass/data/Test.DependencyExtractor.xml
2011-06-29 09:47:28,324 [main] INFO Utils : Process exit value: 1
2011-06-29 09:47:28,324 [main] ERROR Utils : Process failed: /home/collina8/src/java/jboss/mass/tools/depfinder/bin/DependentsToHTML -in /home/collina8/src/java/jboss/mass/data/Test.DependencyExtractor.xml
2011-06-29 09:47:28,324 [main] ERROR Utils : Aborting execution.I think you are only getting the files you mentioned as the build is aborting part way through and not being reported correctly.
Could you try running that command directly and sending us the output?
/home/collina8/src/java/jboss/mass/tools/depfinder/bin/DependentsToHTML -in /home/collina8/src/java/jboss/mass/data/Test.DependencyExtractor.xml
Thanks,
Tom
-
7. Re: Empty Reports
atc Jul 4, 2011 4:45 AM (in response to tomjenkinson)Hi Tom, thanks for getting back to me.
Here's the output:
collina8@dkt915034:~/src/java/jboss/mass$ /home/collina8/src/java/jboss/mass/tools/depfinder/bin/DependentsToHTML -in /home/collina8/src/java/jboss/mass/data/Test.DependencyExtractor.xml
(Location of error unknown)XSLT Error (javax.xml.transform.TransformerException): javax.xml.transform.TransformerException: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: Connection timed out
Exception in thread "main" java.lang.RuntimeException: javax.xml.transform.TransformerException: com.sun.org.apache.xml.internal.utils.WrappedRuntimeException: Connection timed out
at com.sun.org.apache.xalan.internal.xslt.Process.doExit(Process.java:1185)
at com.sun.org.apache.xalan.internal.xslt.Process._main(Process.java:1158)
at com.jeantessier.dependencyfinder.cli.XSLTProcess.main(XSLTProcess.java:37)
collina8@dkt915034:~/src/java/jboss/mass$ echo $?
1
collina8@dkt915034:~/src/java/jboss/mass$
I wonder what it's trying to connect to? Is it attempting to resolve XSD references? I'm behind a corporate firewall & proxy, so this'll always fail.
Hope that helps!
-
8. Re: Empty Reports
tomjenkinson Jul 4, 2011 6:00 AM (in response to atc)I found this which backs up the idea that a XSL/DTD requires an online resource:
http://sourceforge.net/projects/xmlresume/forums/forum/92731/topic/1537948
I have grepped our xsl and dtd files and can't see too many imports apart from:
[tom@toms-thinkpad trunk]$ find . -name \*xsl -o -name \*dtd -o -name \*DTD | xargs grep http | grep -v "www.w3.org"
./tools/depfinder/etc/DependencyGraphToyEd.xsl: xmlns="http://graphml.graphdrawing.org/xmlns/graphml"
./tools/depfinder/etc/DependencyGraphToyEd.xsl: xmlns:y="http://www.yworks.com/xml/graphml"
./tools/depfinder/etc/DependencyGraphToyEd.xsl: xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns/graphml http://www.yworks.com/xml/schema/graphml/1.0/ygraphml.xsd">
./tools/depfinder/etc/DependencyGraphToRDF.xsl: xmlns="http://www.fi.muni.cz#"
./tools/depfinder/etc/DependencyGraphToRDF.xsl: xml:base="http://www.fi.muni.cz">
./tools/depfinder/etc/DependencyGraphToGraphML.xsl: xmlns="http://graphml.graphdrawing.org/xmlns"
./tools/depfinder/etc/DependencyGraphToGraphML.xsl: xsi:schemaLocation="http://graphml.graphdrawing.org/xmlns http://graphml.graphdrawing.org/xmlns/1.0/graphml.xsd">Other imports are for the Transform xsd from w3.org
Assuming it is not possible for you to test this on a machine that is not firewalled off, perhaps you could supply a small test war/ear to the team to check that is is definitely the issue for you? We can then work on getting a fix for this?
If you do have a test war that demonstrates the issue, you are welcome to raise a Jira for the it here: https://jira.jboss.org/jira/browse/MASS (you could raise it as a feature request, something like "Allow MAT tool to work offline")
Tom
-
9. Re: Empty Reports
atc Jul 4, 2011 6:02 AM (in response to tomjenkinson)Just a quick one before I chase the other stuff up: is there a way to provide proxy configuration, or for the XSL tool to use system-wide proxy config?
-
10. Re: Empty Reports
tomjenkinson Jul 4, 2011 6:18 AM (in response to atc)Hi Alex,
I am not promising anything here but this might help:
http://info4tech.wordpress.com/2007/05/04/java-http-proxy-settings/
Essentially it boils down to getting a -Dhttp.proxyHost=<blah> into the environment.You may also need to set:
-Dhttp.proxyPort=<blah>
-Dhttp.proxyUser=<blah>
-Dhttp.proxyPassword=<blah>It depends on how Xalan has been coded whether these will work or not though.
That caveated, as we (in this release) execute some shell scripts to wrap the Java call you will need to edit:
bin/run* to set this in the following place:
run.sh:
VMARGS="-Xms512m -Xmx1024m -Dhttp.proxyHost=<BLAH>" (you may also need port user and password - see above)
export DEPENDENCYFINDER_OPTS=$VMARGSor run.cmd:
set DEPENDENCYFINDER_OPTS=-Xms512m -Xmx1024m -Dhttp.proxy=<BLAH> (you may also need port user and password - see above)
You can also test this by doing the following (I am assuming you are on *nix):
export DEPENDENCYFINDER_OPTS="-Xms512m -Xmx1024m -Dhttp.proxyHost=<BLAH>" (you may also need port user and password - see above)
/home/collina8/src/java/jboss/mass/tools/depfinder/bin/DependentsToHTML -in /home/collina8/src/java/jboss/mass/data/Test.DependencyExtractor.xml
Tom