• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
Locked
0

StringIndexOutOfBoundsException - both cmd and ant error

New Here ,
Dec 23, 2009 Dec 23, 2009

Copy link to clipboard

Copied

Hi there, having the following pblm. Using pmd 1.0 (latest available version, archived named 1.0.1 something)

BUILD FAILED
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
        at java.lang.String.substring(String.java:1938)
        at com.adobe.ac.pmd.nodes.impl.MetaDataNode.compute(MetaDataNode.java:54)
        at com.adobe.ac.pmd.nodes.impl.NodeFactory.createMetaData(NodeFactory.java:41)
        at com.adobe.ac.pmd.nodes.utils.MetaDataUtils.computeMetaDataList(MetaDataUtils.java:46)
        at com.adobe.ac.pmd.nodes.impl.FunctionNode.compute(FunctionNode.java:120)
        at com.adobe.ac.pmd.nodes.impl.ClassNode.detectFunction(ClassNode.java:306)
        at com.adobe.ac.pmd.nodes.impl.ClassNode.computeClassContent(ClassNode.java:262)
        at com.adobe.ac.pmd.nodes.impl.ClassNode.compute(ClassNode.java:103)
        at com.adobe.ac.pmd.nodes.impl.PackageNode.compute(PackageNode.java:73)
        at com.adobe.ac.pmd.nodes.impl.NodeFactory.createPackage(NodeFactory.java:46)
        at com.adobe.ac.pmd.files.FileSetUtils.computeAsts(FileSetUtils.java:101)
        at com.adobe.ac.pmd.FlexPmdViolations.computeAsts(FlexPmdViolations.java:118)
        at com.adobe.ac.pmd.FlexPmdViolations.computeViolations(FlexPmdViolations.java:96)
        at com.adobe.ac.pmd.engines.AbstractFlexPmdEngine.computeViolations(AbstractFlexPmdEngine.java:156)
        at com.adobe.ac.pmd.engines.AbstractFlexPmdEngine.executeReport(AbstractFlexPmdEngine.java:138)
        at com.adobe.ac.pmd.ant.FlexPmdAntTask.execute(FlexPmdAntTask.java:64)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
        at org.apache.tools.ant.Main.runBuild(Main.java:758)
        at org.apache.tools.ant.Main.startAnt(Main.java:217)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)

Total time: 0 seconds

could you advise what can be the problem?

TOPICS
FlexPMD

Views

706

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Dec 23, 2009 Dec 23, 2009

Copy link to clipboard

Copied

I commented on this issue: http://bugs.adobe.com/jira/browse/FLEXPMD-140

It should be working.

Let me know.

Xavier

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 26, 2009 Dec 26, 2009

Copy link to clipboard

Copied

Thanks for the post.

This JIRA link needs some signup. When I am trying to sign up, it does not send me activation to the email (tried 2 different e-mails) Do not know, if it is because of holidays. Could you post this solution here?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Dec 27, 2009 Dec 27, 2009

Copy link to clipboard

Copied

Here you go.

Xavier

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 28, 2009 Dec 28, 2009

Copy link to clipboard

Copied

Thanks for help, the first problem was removed, however I have another one (after start using attached file)

BUILD FAILED
java.lang.NoSuchMethodError: com.adobe.ac.pmd.files.impl.FileUtils.computeFilesList(Ljava/io/File;Ljava/lang/String;)Ljava/util/Ma
p;
        at com.adobe.ac.pmd.FlexPmdViolations.computeFiles(FlexPmdViolations.java:131)
        at com.adobe.ac.pmd.FlexPmdViolations.computeViolations(FlexPmdViolations.java:94)
        at com.adobe.ac.pmd.engines.AbstractFlexPmdEngine.computeViolations(AbstractFlexPmdEngine.java:156)
        at com.adobe.ac.pmd.engines.AbstractFlexPmdEngine.executeReport(AbstractFlexPmdEngine.java:138)
        at com.adobe.ac.pmd.ant.FlexPmdAntTask.execute(FlexPmdAntTask.java:64)
        at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
        at org.apache.tools.ant.Task.perform(Task.java:348)
        at org.apache.tools.ant.Target.execute(Target.java:357)
        at org.apache.tools.ant.Target.performTasks(Target.java:385)
        at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
        at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
        at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
        at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
        at org.apache.tools.ant.Main.runBuild(Main.java:758)
        at org.apache.tools.ant.Main.startAnt(Main.java:217)
        at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
        at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Dec 28, 2009 Dec 28, 2009

Copy link to clipboard

Copied

LATEST

Please, use that file:

http://opensource.adobe.com/svn/opensource/flexpmd/maven-repository/snapshot/com/adobe/ac/flex-pmd-core/1.1-SNAPSHOT/flex-pmd-core-1.1-20091229.030128-3.jar

Xavier

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines