5 Replies Latest reply on Apr 2, 2012 1:09 PM by jbooth

    Invalid Plugin Class

      After using "mvn package" to package up my code and then upload the JAR file in the admin console I get this error:


      Error uploading plugin: Invalid plugin class defined in plugin.xml: HelloCDAWidget


      HelloCDAWidget.java is the name of the java file with the class, which has in it:


      public class HelloCDAWidget extends BaseWidget {


      Is my plugin.xml supposed to be defined differently? Here is my plugin.xml file:


      <plugin xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          <name>Hello CDA</name>
          <description>Greets the user</description>
        <!-- you will want to change your class name here! -->
        • Re: Invalid Plugin Class

          That was a copy & paste error. The last two lines can be ignored (30 & 31).

            • Re: Invalid Plugin Class

              Hi Shawn,

                   Is the class HelloCDAWidget in a default package? If not, I believe adding the complete package might help:




                • Re: Invalid Plugin Class

                  Thank Mandar. That raises two questions. It's a small project with only one class and only one Java file in the entire project. I've not defined any package in my code. I used:

                  mvn archetype:create -e -DarchetypeGroupId=com.jivesoftware.maven -DarchetypeArtifactId=maven-jive-archetype -DarchetypeVersion=5.0.x-SNAPSHOT -DgroupId=com.jivesoftware.adl-canada -DartifactId=helloCDA

                  To create the project. Would that imply I should use com.jivesoftware.adl-canada.helloCDA ? I noticed that I didn't use "helloCDAWidget" and I wonder if that might be part of the problem. Would the fact that the DartifactId is different than the actual class cause that problem?