Copy link to clipboard
Copied
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.
Cheers,
Tony
Copy link to clipboard
Copied
Hi Tony,
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
Copy link to clipboard
Copied
Hi Xavi,
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...
Cheers,
Tony
Copy link to clipboard
Copied
mmm it sounds like it's messing around with your old preferences... Could you open the preferenes panel for FlexPmd, make a dummy change and save them just to override any wrong value?
Xavi
Copy link to clipboard
Copied
Hi Xavi,
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.
Tony
Copy link to clipboard
Copied
Can you open the "Error Log" view on eclipse and see if there's any message there from FlexPMD? I guess that the popup error you see is truncated...
Xavi
Copy link to clipboard
Copied
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\pmd.xml (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:106)
at com.adobe.ac.pmd.eclipse.flexpmd.cmd.FlexPMDResultsParser.parse(FlexPMDResultsParser.java:112)
at com.adobe.ac.pmd.eclipse.flexpmd.cmd.FlexPMD.processResultsFile(FlexPMD.java:180)
at com.adobe.ac.pmd.eclipse.flexpmd.cmd.FlexPMD.process(FlexPMD.java:68)
at com.adobe.ac.pmd.eclipse.flexpmd.cmd.FlexPMD.process(FlexPMD.java:1)
at com.adobe.ac.pmd.eclipse.flexpmd.actions.RunFlexPMDJob.run(RunFlexPMDJob.java:83)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
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(RunFlexPmdAction.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
Cheers,
Tony
Copy link to clipboard
Copied
what OS are you in? do you have admin rights?
Copy link to clipboard
Copied
Hi Xavi,
Sorry for the delay in replying. The OS is Windows 7 and I do have Admin rights on this workstation.
Cheers,
Tony
Copy link to clipboard
Copied
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/flexpmd6167148067338996286dir/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.
Copy link to clipboard
Copied
Finally got it to work, seems like there was some problem with preferences after I updated from 1.0 to 1.1. The solution was to "restore defaults" from FlexPMDs preference panel.
Copy link to clipboard
Copied
The only issue which i found was Flex PMD is not compatible with java version 7.
Uninstall the java 7 and try with java 6 it works...
Copy link to clipboard
Copied
Hi,
I had a similar problem. I resolved it by installing the update into FB 4.5. However, while I get a PMD view, I do not get any CPD view. I am on Mac OSX
Copy link to clipboard
Copied
I have encountered this same problem. I am on Win7, have admin privs, am running Flash Builder 4.
Is there any way to fix this without updating to Flash Builder 4.5?
Copy link to clipboard
Copied
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.
Thoughts?
I'm using FDT on a Mac running 10.6
Copy link to clipboard
Copied
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.