Hi, I'm probably missing something simple here but Flex PMD (using the eclipse plugin) isn't working for me: Nothing gets populated in either the Flex PMD view or the CPD view but the views do open when I run Flex PMD.
My configuration is:
FlexPMD command line installation: C:\Software\FlexPmdAll\flex-pmd-command-line-1.2.jar
FlexPMD custom ruleset: C:\Software\FlexPmdAll\pmd.xml
Java command line: java -Xms512m -Xmx512m
FlexCPD command line installation: C:\Software\FlexPmdAll\flex-pmd-cpd-command-line-1.2.jar
There are no spaces in my workspace path, it is simply: C:\Views\ProjectNameHere\
Using these settings I get a pop-up error message saying: 'add markers job' has encountered a problem.
Expanding on this error gives me: An internal error occurred during: "add markers job". Index: 0, Size: 0
If I change the Java command line (a tip found on the web) to: java -Xms512m -Xmx512m -Djava.io.tmpdir=C:\Users\NameGoesHere\AppData\Local\Temp
I get the same error.
If I remove the custom ruleset value no error message shows when I run Flex PMD but nothing happens either.
If you have any idea what's wrong let me know. The open source website is offline and I can't find any reference sites that don't link to it for an answer.
we're planning a new release of the plugin really soon. could you give a try to install a newer temp version from this update site? http://www.rialvalue.com/flexPmd/updateSite/ and let me know if the problem still persist?
this update site comes with FlexPMD 1.1 bundled but from the preferences you'll be able to point to whatever version you have locally
please let me know if the problems persist
Thanks for your quick reply.
I uninstalled the FlexPMD plugin I had and installed the one in your link.
I changed no settings. I am using the bundled runtime and the Java arguments line is java -Xms512m -Xmx512m. I am not using a custom ruleset.
When I try to run FlexPMD and error message pops up saying:
!java.lang.NoClassDefFoundError: java -Xms512m -Xmx512m
Caused by: java.lang.ClassNotFoundException: java -Xms512m -Xmx512m
Some stack trace
Could not find the main class: java -Xms512m -Xmx512m. Program will exit.
Exception in thread "main"
It doesn't seem to like the Java arguments...
I changed the preferences panel to point to my local installation directory but I still get the same error.
I then restarted eclipse but it still happens.
Finally, I also reduced the Xms and Xmx values to 128 but with no joy.
When I remove the Java arguments values altogether (leave it blank), I do not get the pop-up error message and I see a green progress bar briefly in the bottom right corner saying FlexPMD.running but then it disappears and nothing happens.
Thanks for your help so far, by the way.
Looks like you were right, I see a File Not Found Exception for a pmd.xml file:
java.io.FileNotFoundException: C:\Users\NameHere\AppData\Local\Temp\flexpmd2207206954593694710dir\pm d.xml (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at com.adobe.ac.pmd.eclipse.flexpmd.cmd.FlexPMDResultsParser.parse(FlexP MDResultsParser.java:112)
at com.adobe.ac.pmd.eclipse.flexpmd.cmd.FlexPMD.processResultsFile(FlexP MD.java:180)
at com.adobe.ac.pmd.eclipse.flexpmd.actions.RunFlexPMDJob.run(RunFlexPMD Job.java:83)
Followed by what looks to be an eclipse-specific Unhandled event loop exception caused by a NPE at com.adobe.ac.pmd.eclipse.flexpmd.actions.RunFlexPmdAction$2.run(RunFl exPmdAction.java:145)
I wonder why it is looking for a pmd.xml file in a temp directory? Note that these errors are when FLexPMD is run withoit any Java arguments specified. When I run FlexPMD with the Java arguments specified I get a third error message the same as the one mentioned above (Class Not Found).
Also, if I include a custom ruleset, it still throws the FileNotFoundException and lists another temp folder in AppData\Local\Temp
I've just gotten the "add markers job" error when trying to analyze various individual files in my project, but I don't get it when I analyze the whole folder.
Based on this, plus some details about the classes themselves, I have a hunch that maybe the error is happening when there aren't any errors to report.
I'm using FDT on a Mac running 10.6
Based on the last two posts here : http://forums.adobe.com/message/3872559#3872559 the problem might spaces in the workspace path. The default is something like 'c:\Documents and Settings...' so it may well be http://bugs.adobe.com/jira/browse/FLEXPMD-127
I don't get any output, or any errors, Builder 4.5, Flex 4.1 SDK, Windows XP.
Hopefully the next release will fix all this, because it's a really common use case that really should Just Work.
Did you ever get FlexPMD running? I'm getting the exact same error that you got -
26.06.12 07:50:50,755 [0x0-0x175b75a].org.eclipse.eclipse: !MESSAGE Error running
FlexPMD/var/folders/l2/q0y9p12d1419gczk1j_gtbdc0000gn/T/flexpmd6167148 067338996286dir/pmd.xml (No such file or directory)
This is with OS X, Flash Builder 4.6 and the FlexPMD 1.2 from the link in the start of the thread.
Europe, Middle East and Africa