Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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/flexPmdRuntime//flex-pmd-command-line-1.1.jar,
-s,
C:\workspace\BlissClient\src\com\othenos\bliss\business\DocumentDelegate.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
Copy link to clipboard
Copied
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-file-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\DocumentDelegate.as
-o .
If this is the case, we will see what we can do.
Cheers,
Xavier
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Hi,
I also have the same issue with it not being able to make the temp. file. I moved my temp folders around, still won't work. I'm using eclipse 3.4.1 w/ Flexbuilder 3. Any ideas?
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
I think the file you posted is corrupt. I put it in the dropins folder but eclipse hasn't added flex PMD to preferences. The file is only 1..2 K in size which seems way too small.
Copy link to clipboard
Copied
@jerela use it as an update site not as a file to in the dropins folder
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
@jerela I'm not sure what exact problem are you having. You can reset your configuration from Eclipse > Preferences > FlexPMD
Copy link to clipboard
Copied
The problem was what to reset it to. I was able to install on a different machine and figured out that "java" shouldn't be one of the java arguments .
That fixed it.
Copy link to clipboard
Copied
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(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:55)
Copy link to clipboard
Copied
Hi cnojima2,
can you open the errors log view in eclipse and check the messages in there?
Also there should be an entry printing the command line executed. Could you try to execute it directly from cmd and see what happens?
Copy link to clipboard
Copied
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(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:55)
The directory is created successfully, but it's completely empty (no pmd.xml file exists)
Copy link to clipboard
Copied
@cenojima2 are you on win7? Can you try relaunching Eclipse as admin (right click on Eclipse > Run as administrator) and see if it works
Copy link to clipboard
Copied
Hi,
I'm on a Windows Server 2003 x64 sp2 box. I can't run as admin on this box actually so i can't test but the folder is created correctly (so i have rights) but the file isn't there. Running the command line works fine also.
Copy link to clipboard
Copied
My eclipse is 3.5.1 and it runs on windows7. I have the same problem. But running flexbuilder as administrator makes the problem go away.
But I don't like having to startup 'as administrator', so please is there another workaround?
Thanks