Skip to main content
Participant
October 28, 2009
Question

Large code base failure - java.util.concurrent.CancellationException

  • October 28, 2009
  • 2 replies
  • 919 views

I'm getting the following error when  trying to run Flex PMD against our codebase:

Buildfile: /Users/simon/Documents/vw/mt/site/scripts/ant/flexpmd.xml

flexPmdWithCustomRuleset:
  [flexPmd] 28-Oct-2009 13:33:00 com.adobe.ac.pmd.engines.AbstractFlexPmdEngine loadRuleset
  [flexPmd] INFO: Ruleset: /Users/simon/Documents/vw/mt/site/scripts/config/vw-pmd-ruleset.xml
  [flexPmd] 28-Oct-2009 13:33:00 com.adobe.ac.pmd.engines.AbstractFlexPmdEngine loadRuleset
  [flexPmd] INFO: Rules number in the ruleSet: 2
  [flexPmd] 28-Oct-2009 13:33:03 de.bokelberg.flex.parser.AS3Scanner$XMLVerifier verify
  [flexPmd] WARNING: Open quote is expected for attribute "id" associated with an  element type  "node". at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
  [flexPmd] org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
  [flexPmd] org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
BUILD FAILED /Users/simon/Documents/vw/mt/site/scripts/ant/flexpmd.xml:45: java.util.concurrent.CancellationException Total time: 26 seconds

It looks as though its the volume of files that's causing the issue as I've been through and successfully run the task against all the individual packages in our src. I also tried reducing the number of tests in the ruleset to see if it had a bearing and it didn't.

Does anyone have any other suggestions for a way round it?

I'm running OS X Snow Leopard, with default java install, FlexPMD is RC4.

Thanks,

Simon

This topic has been closed for replies.

2 replies

Adobe Employee
November 19, 2009

The CancellationException issue has been fixed against trunk.

The fix will be released against 1.0.RC5

Thanks

Xavier

Participant
October 29, 2009

After some experimentation I was able to get things working by using the command line version of the tool and give it some more memory to work with.

<exec executable="java">

<arg line="-Xmx768m" />

<arg line="-jar ${flexpmd.dir}/flex-pmd-command-line-1.0.Rc4.jar" />

<arg line="-s ${src.dir}" />

<arg line="-o ${flex.pmd.report.dir}" />

</exec>

Is there a way to do this with the ant task?

Cheers,

Simon

ledroff
Adobe Employee
Adobe Employee
October 29, 2009

Sure you may also pass to ant jvm parameters.

One way to do it is to use the ANT_OPTS variable and to assign it -Xmx768m as a value.

Cf. http://wiki.apache.org/ant/TheElementsOfAntStyle

Cheers,

François