-
Notifications
You must be signed in to change notification settings - Fork 10
Eclipse Luna throws Error: Plug-in "ch.acanda.eclipse.pmd.core" was unable to instantiate class "ch.acanda.eclipse.pmd.builder.PMDBuilder". #20
Comments
I tried to reproduce this issue but was unsuccessful so far. You could help me identify the cause by telling me which Eclipse version and Java runtime version you are using and on which OS your are running Eclipse. Please open the dialog "Eclipse Installation Details": Help (menu) > About Eclipse (menu) > Installation Details (button) > Configuration (tab). Then search the following system properties and let me know their values:
In the mean time you could also just try and uninstall the plug-in and then install it again.This would solve the problem if there was anything going wrong during the installation. |
I am seeing something similar on my installation:
Problem is reported in a dialogue box during Eclipse initialisation: Problem Occured: 'Building workspace' has encountered a problem. Errors occured during the build. Error instantiating builder 'ch.acanda.eclipse.pmd.builder.PMDBuilder'. Plug-in "ch.acanda.eclipse.pmd.core" was unable to instantiate class "ch.acanda.eclipse.pmd.builder.PMDBuilder". java.lang.ExceptionInInitializerError Configuration:
...and:
|
@LarsWH do you happen to have the stack trace of that ExceptionInInitializerError that is thrown during the Eclipse initialization? |
The log file is attached below (not sure how get a stack trace). FYI: if I replace "Eclipse PMD 1.4" (Market place) with "PMD Eclipse" (http://sourceforge.net/projects/pmd/files/pmd-eclipse/update-site/) the problem goes away. This could perhaps be caused by the fact that the name space indicated within my pmd.xml file is
|
@LarsWH Thank you, this helps a lot! Now I know where to look for the problem. "PMD Eclipse" from sourceforge.net doesn't have this issue because it is an entirely different PMD plugin. The |
@PrabakaranSK In your case the problem is the rule set with the type "Workspace" and the location ".settings/PA_PMD_Coding_Rules.xml". Rule set locations relative to the workspace have always the name of a project as the first segment. Please disable this invalid configuration in all your projects. This should then remove it all together. Did you create the invalid configuration with the "Add rule set" wizard or did you manually edit the .eclipse-pmd file? @LarsWH Do you have a similar workspace relative configuration where the first segment of the location is not a project name? |
@acanda Yes, I do indeed have It seems that switching to |
The workspace relative paths are meant to be used if several projects in your workspace use the same PMD rule set. This way you only have to maintain one PMD rule set file which can be used by several projects. E.g. if you store the PMD rule set in project The project relative paths are meant to be used if your Eclipse projects contain their own (but different) PMD rule sets at the same location within the project. E.g both So to answer your question: yes, switching to |
@acanda I have my rule set under revision control within the project tree, so I am probably going for the |
@acanda After following your instructions, the problem is solved now. Thanks. Background: |
I'm reopening the issue as it still needs to be fixed. To fix this issue the following things need to be done:
I'm already working on this and it will most likely be part of the upcoming 1.5.0 release. |
This is the first part of resolving issue #20.
Invalid configurations are marked with a warning icon (when they are not activated) or an error icon (when they are activated). A tool tip shows the actual absolute path of the configuration to help the user resolve the problem. This is the second part of resolving issue #20.
I released eclipse-pmd 1.5 which fails gracefully when the .eclipse-pmd file contains an invalid configuration and marks it in the PMD property page with an error icon. |
I've just installed PMD for the first time, and on launching Eclipse am immediately presented with: Errors occurred during the build. I'm running Mars on Win2k8 |
@rsandidfc Did you rename a project or manually edit the .eclipse-pmd file? |
@rsandidfc I could reproduce your problem. I opened a new issue for this since it is not the same problem as this issue. Please see issue #36. |
I'm closing this issue as the following bugs have been fixed:
For the remaining enhancement i opened a issue #41:
|
Using Eclipse Marketplace, the "eclipse-pmd" plugin is installed.
The PMD is activated in a project however it throws an exception like below:
The text was updated successfully, but these errors were encountered: