Return to Jive Software

This Question is Answered

1 "correct" answer available (4 pts) 2 "helpful" answers available (2 pts)
2,718 Views 6 Replies Last post: Jan 24, 2009 12:31 PM by Alistair Lenhard RSS
Alistair Lenhard Novice 37 posts since
Nov 22, 2008
Currently Being Moderated

Jan 10, 2009 4:09 AM

Problems with simple plugin

Hello All,


I have an issue with a simple Plugin. It does not seem to find the action class. At least this is what the exception indicates. Maybe one of the pros could have a look at this and give me a hint where to look?

 

Stacktrace:

 

SCHWERWIEGEND: Servlet.service() for servlet default threw exception
Action class [com.SimpleAction] not found - action - file:///C:/jiveHome/cache/plugins/SimpleExamples/struts.xml:6:58
    at com.jivesoftware.base.plugin.PluginConfigurationProvider.verifyAction(PluginConfigurationProvider.java:414)

I checked the struts.xml, but did not find that the paths would be incorrect. Maybe there is something simple that I overlooked?


Here my struts.xml:

<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
"http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
    <package name="example-actions" namespace="" extends="community-actions">
        <!-- Map the action name, sayhello, to the action class, SimpleAction. -->
        <action name="sayhello" class="com.SimpleAction">
            <!-- Specify the FTL file that should be used to present the data in the case of
                 a "success" result (the default for an action class). -->
            <result name="success">/resources/Greetings.ftl</result>
        </action>
    </package>
</struts>

 

My Action class:

package com;

 

import com.jivesoftware.community.action.JiveActionSupport;

 


public class SimpleAction extends JiveActionSupport {

    private static final long serialVersionUID = 1L;

    private String message = "Hello World";

 
    public String getMessage() {
        return message;
    }
 
    public void setMessage(String message) {
        this.message = message;
    }
}

 

and my plugin.xml:

<plugin xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="http://www.jivesoftware.com/schemas/clearspace/2_5/plugin.xsd">
    <name>SimpleExamples</name>
    <description>Simple macro and plugin examples.</description>
    <author>Me</author>
    <version>1.0.0</version>
    <minServerVersion>1.3</minServerVersion>

 

   <components>
        <component id="user-bar">
            <tab id="jiveUserMenu5">
                <item id="sayhello" name="Say Hello">
                    <url><![CDATA[<@ww.url action="sayhello" />]]></url>                
                </item>
            </tab>
        </component>
    </components>
</plugin>

Stewart Wachs Jive Employee 3,666 posts since
Apr 14, 2008
Currently Being Moderated
Jan 10, 2009 9:34 AM in response to: Alistair Lenhard
Re: Problems with simple plugin

A couple of things to check:

 

 

1.  Do you see your plugins under admin console -> system -> plugins?

2.  Does your class live in /com/ SimpleAction.class ?

Attachments:
Stewart Wachs Jive Employee 3,666 posts since
Apr 14, 2008
Currently Being Moderated
Jan 10, 2009 11:50 AM in response to: Alistair Lenhard
Re: Problems with simple plugin

Alistair - It looks like your plugin packing is a little off. For Clearspace plugins, compiled classes must live in <plugin root>/classes. Check out this doc more details: Building Plugins

More Like This

  • Retrieving data ...

Bookmarked By (0)