Below are the relevant software installations. FlexPMD is configured as defined in the documentation.
When running FlexPMD, it appears to be churning away, however, there are no results that appear in the FlexPMD View window. Is this an issue only with Eclipse 3.6???
** Software versions ***
FlexPMD 1.0.0.v200912091712
flex-pmd-all-in-one-bundle-1.2
Eclipse 3.6
FlashBuilder 4.0.1
*** Eclipse Log File Entries ***
!ENTRY org.eclipse.ui 2 0 2011-02-27 10:49:20.167
!MESSAGE Warnings while parsing the key bindings from the 'org.eclipse.ui.commands' extension point
!SUBENTRY 1 org.eclipse.ui 2 0 2011-02-27 10:49:20.167
!MESSAGE Cannot bind to an undefined command: plug-in='com.adobe.ac.pmd.eclipse', id='com.adobe.ac.pmd.eclipse.flexpmd.runCommand.category'
!ENTRY org.eclipse.ui 4 4 2011-02-27 10:49:20.707
!MESSAGE Unable to create menu item "com.adobe.ac.pmd.eclipse.toolbar.runCommand", command "com.adobe.ac.pmd.eclipse.flexpmd.runCommand.category" not defined
Can you try uninstalling the version you have and try installing from this temp update site? http://www.rialvalue.com/flexPmd/updateSite/ This is a version to be released
Thanks, I removed the old version and installed the new one using the url
provided. Initially, the same results. When I looked at the log, I could see
there was a permissions error when FlexPMD tries to access one of its temp
directories (see below)
!ENTRY com.adobe.ac.pmd.eclipse 1 0 2011-02-28 08:42:17.003
!MESSAGE [java, -Xmx256m, -jar,
C:/eclipse/configuration/org.eclipse.osgi/bundles/874/1/.cp/flexPmdRun time//flex-pmd-command-line-1.1.jar,
-s,
C:\workspace\BlissClient\src\com\othenos\bliss\business\DocumentDelega te.as,
-o, C:\Users\Mike\AppData\Local\Temp\flexpmd5980952838914453410dir]
!ENTRY com.adobe.ac.pmd.eclipse 1 0 2011-02-28 08:42:22.112
!MESSAGE Feb 28, 2011 8:42:22 AM
com.adobe.ac.pmd.engines.AbstractFlexPmdEngine
WARNING: Access is denied at
java.io.WinNTFileSystem.createFileExclusively(Native Method)
java.io.File.checkAndCreate(Unknown Source)
java.io.File.createTempFile(Unknown Source)
So, I quite eclipse and ran it as administrator. This time there FlexPMD
was able to perform the operations and display the results.
I do not know if this problem is related to something I have done regarding
installation of eclipse or if it has something to do with the way FlexPMD is
installed. Normally, I do not have to run eclipse as administrator to get
plugins to work. I suspect it has to do with the FlexPMD's creation of the
temp directory. If there is anything else I can do to help you with this
issue please let me know.
Thanks for the fix. I am looking forward to using the capabilities of
FlexPMD.
-Mike Robinson
Any chance you are running on Windows 7?
It looks like it is actually not related to Eclipse 3.6:
http://www.javaprogrammingforums.com/file-i-o-other-i-o-streams/5230-f ile-c
reatetempfile-throws-exception-win7.html
Can you try to run this command line:
Java -Xmx256m -jar
C:/eclipse/configuration/org.eclipse.osgi/bundles/874/1/.cp/flexPmdRun
time/flex-pmd-command-line-1.1.jar -s
C:\workspace\BlissClient\src\com\othenos\bliss\business\DocumentDelega te.as
-o .
If this is the case, we will see what we can do.
Cheers,
Xavier
Yes, running Windows 7.
Here are the results of the command line:
Feb 28, 2011 9:30:32 AM com.adobe.ac.pmd.engines.AbstractFlexPmdEngine
loadRuleset
INFO: Ruleset:
C:\Users\Mike\AppData\Local\Temp\default_flex1810577837337907182.xml
Feb 28, 2011 9:30:32 AM com.adobe.ac.pmd.engines.AbstractFlexPmdEngine
loadRuleset
INFO: Rules number in the ruleSet: 90
Feb 28, 2011 9:30:32 AM com.adobe.ac.pmd.engines.AbstractFlexPmdEngine
computeViolations
INFO: It took 117ms to compute violations
Feb 28, 2011 9:30:32 AM com.adobe.ac.pmd.engines.AbstractFlexPmdEngine
computeViolationNumber
INFO: Violations number found: 1
Feb 28, 2011 9:30:32 AM com.adobe.ac.pmd.engines.FlexPmdXmlEngine
writeReport
INFO: Creating report in <C:\Users\Mike\.\pmd.xml>
Feb 28, 2011 9:30:32 AM com.adobe.ac.pmd.engines.AbstractFlexPmdEngine
writeAnyReport
INFO: It took 11ms to write the Xml report
I am also having a problem w/ FlexPMD not displaying any results in eclipse. I am on Windows XP however. I am using FlashBuilder standalone Burrito I6. I tried adding a flag to point to a temp directory, using one that existed on my machine, but that didn't change anything. PMD had been working on this machine w/ previous FlashBuilder versions. CPD still works. I've tried Versions 1.1 and 1.2 with identical results.
Hi,
please can you unsintall your current FlexPMD eclipse plugin and install this yet-not-released version http://www.rialvalue.com/flexPmd/updateSite
This new version should fix this problem for you along with several improvements.
Xavi
Hi,
Thanks for the update. Sadly this still isn't working. I uninstalled and updated using the site you posted. I get this same stack trace
java.io.FileNotFoundException: C:\cnojima1\temp\4\flexpmd2731671333939586734dir\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(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.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(RunFlexPMD Job.java:83)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Yup, this works totally fine. I just transformed the [java -Xmx256m -jar ...etc]
into the raw
java -Xmx256m -jar ...
and it worked fine.
So 3 things happen in the event log:
1) the command runs
2) i get a warnings:
null
Info
Wed Mar 30 19:09:59 PKT 2011
Mar 30, 2011 10:09:59 AM com.adobe.ac.pmd.engines.AbstractFlexPmdEngine <init>WARNING: Access is denied at java.io.WinNTFileSystem.createFileExclusively(Native Method)
java.io.File.checkAndCreate(Unknown Source)
java.io.File.createTempFile(Unknown Source)
3) I get an error
null
Error
Wed Mar 30 19:09:59 PKT 2011
Error running FlexPMDC:\VENDEV~1\cnojima1\temp\4\flexpmd6740339094822211326dir\pmd. xml (The system cannot find the file specified)
java.io.FileNotFoundException: C:\VENDEV~1\cnojima1\temp\4\flexpmd6740339094822211326dir\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(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.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(RunFlexPMD Job.java:83)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
The directory is created successfully, but it's completely empty (no pmd.xml file exists)
Ok I got it installed but get and error when I run pmd or cpd.
java.lang.NoClassFoundError: java -Xmx256m -Djava/io/tmpdir=C:/temp
Could not find the main class
since it still new where my custom ruleset was it may have some of the config left from the old version.
The java arguments are set to java -Xmx256m -Djava/io/tmpdir=C:/temp
which seems to be what the error is complaining about.
North America
Europe, Middle East and Africa
Asia Pacific