Hi,

i would like to use my own components to be plugged in and loaded dynamically but i get everytime the same exception. The error eccoured when the Servlet executes.
I have no idea where the Problem is.


I am happy about every tip.
Thanxx
Greets Jens


################################## The Exception:

javax.servlet.ServletException: Servlet.init() for servlet action threw exception
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:963)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:668)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:601)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:534)
----- Root Cause -----
java.lang.AbstractMethodError: control.plugin.WatchdogPlugin.init(Lorg/apache/struts/action/ActionServlet;Lorg/apache/struts/config/ApplicationConfig;)V
at org.apache.struts.action.ActionServlet.initApplicationPlugIns(ActionServlet.java:991)
at org.apache.struts.action.ActionServlet.init(ActionServlet.java:458)
at javax.servlet.GenericServlet.init(GenericServlet.java:256)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:935)
at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:668)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:210)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2416)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:601)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
at java.lang.Thread.run(Thread.java:534)




##################################
The struts-config:

<?xml version="1.0" encoding="ISO-8859-1" ?>
<!DOCTYPE struts-config PUBLIC
         "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN"
         "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd";>


<struts-config> <!-- ================== Form Bean Definitions -->

<form-beans>
<!-- loginForm -->
<form-bean
name="loginForm"
type="control.LoginForm"/>
<!-- Language -->
<form-bean
name="languageForm"
type="control.LanguageForm"/>
<!-- Shop Catalog -->
<form-bean
name="shopCatalogForm"
type="control.ShopCatalogForm"/>
<!-- Shop Category --> <form-bean
name="shopCategoryForm"
type="control.ShopCategoryForm"/>
<!-- Shop Product --> <form-bean
name="shopProductForm"
type="control.ShopProductForm"/>
<!-- Shop Product --> <form-bean
name="changeProductStatusForm"
type="control.ChangeProductStatusForm"/> <!-- Shop ShoppingCard --> <form-bean name="shopAddProduct2ShoppingCartForm"
type="control.ShopAddProduct2ShoppingCartForm"/>
<!-- Shop Order-View -->
<form-bean name="changeOrderItemStatusForm"
type="control.ChangeOrderItemStatusForm"/>
<!-- change the Order View -->
<form-bean name="changeObserveDeviceForm"
type="control.ChangeObserveDeviceForm"/> <!-- Delete a Message of the Mailbox -->
<form-bean name="deleteMessageForm"
type="control.DeleteMessageForm"/> <!-- Debug --> <form-bean
name="debugForm"
type="control.debugForm"/>


   </form-beans>

<!-- =================== Global Exception Definitions -->
  <global-exceptions>
       <!-- sample exception handler
           <exception
               key="expired.password"
               type="app.ExpiredPasswordException"
               path="/changePassword.jsp"/>
       end sample -->
   </global-exceptions>

<!-- ==================== Global Forward Definitions -->

<global-forwards>
<forward
name="passengerCall"
path="/pax/passengerCall.jsp"/> <forward
name="shop"
path="/pax/shop.jsp"/> <forward
name="language"
path="/pax/language.jsp"/>
<forward
name="debug"
path="/pax/debug.jsp"/>
<forward
name="SO"
path="/pax/simulator/passengerOrder.jsp"/> </global-forwards>


<!-- ==================== Action Mapping Definitions -->
<action-mappings>
<action
path = "/Login"
type = "control.LoginAction"
scope = "request"
name = "loginForm"
validate = "true"
input = "/login.jsp">
<forward name = "SuccessPassenger"
path="/pax/language.jsp"/>
<forward name = "SuccessGalley"
path="/pax/galley/galley.jsp"/>
<forward name = "SuccessTrolley"
path="/pax/trolley/trolley.jsp"/>


<forward name = "Failure"
path="/login.jsp"/>
</action>
<!-- Language -->
<action path = "/ViewLanguageSettings"
type = "control.ViewLanguageSettingsAction"
input = "/login.jsp"
scope = "request">
<forward name = "Failure"
path = "/login.jsp"/>
<forward
name = "SuccessPassenger"
path = "/pax/language.jsp"/>
<forward
name = "SuccessGalley"
path = "/pax/galley/language.jsp"/> <forward
name = "SuccessTrolley"
path = "/pax/trolley/language.jsp"/> </action>
<action path = "/SavePassengerLanguageSettings"
type = "control.SaveLanguageSettingsAction"
name = "languageForm"
scope = "request"
validate = "true"
input = "/language.jsp">
<forward name = "Failure"
path = "/login.jsp"/>
<forward
name = "Success"
path = "/pax/language.jsp"/>
</action>
<action path = "/SaveGalleyLanguageSettings"
type = "control.SaveLanguageSettingsAction"
name = "languageForm"
scope = "request"
validate = "true"
input = "/language.jsp">
<forward name = "Failure"
path = "/login.jsp"/>
<forward
name = "Success"
path = "/pax/galley/language.jsp"/>
</action>
<action path = "/SaveTrolleyLanguageSettings"
type = "control.SaveLanguageSettingsAction"
name = "languageForm"
scope = "request"
validate = "true"
input = "/language.jsp">


<forward name = "Failure"
path = "/login.jsp"/>
<forward
name = "Success"
path = "/pax/trolley/language.jsp"/>
</action>
<!-- PAX-ShopCatalog -->
<action
path = "/ViewShop"
type = "control.ShopCatalogAction"
scope = "request"
input = "/login.jsp">
<forward name = "Failure"
path = "/login.jsp"/>
<forward
name = "Success"
path = "/pax/shop.jsp"/>
</action>
<!-- PAX-ShopCategory --> <action
path = "/ViewShopCategory"
type = "control.ShopCategoryAction"
name = "shopCategoryForm"
scope = "request"
validate = "true"
input = "/login.jsp">
<forward name = "Failure"
path = "/login.jsp"/>
<forward
name = "Success"
path = "/pax/shop.jsp"/>
</action>
<!-- PAX-ShopProduct --> <action
path = "/ViewShopProduct"
type = "control.ShopProductAction"
name = "shopProductForm"
scope = "request"
validate = "true"
input = "/login.jsp">
<forward name = "Failure"
path = "/login.jsp"/>
<forward
name = "Success"
path = "/pax/shop.jsp"/>
</action>
<!-- PAX-ShopProductStatus --> <action
path = "/ChangeProductStatus"
type = "control.ChangeProductStatusAction"
name = "changeProductStatusForm"
scope = "request"
validate = "true"
input = "/login.jsp">
<forward name = "Login"
path = "/login.jsp"/>
<forward
name = "Success"
path = "/pax/getOrder.jsp"/>
</action>
<!-- PAX-/ Product to ShoppingCart --> <action
path = "/ShopAddProduct2ShoppingCart"
type = "control.ShopAddProduct2ShoppingCartAction"
name = "shopAddProduct2ShoppingCartForm"
scope = "request"
validate = "true"
input = "/login.jsp">
<forward name = "Failure"
path = "/login.jsp"/>
<forward
name = "Success"
path = "/pax/shop.jsp"/>
</action>
<!-- PAX-/ Product to ShoppingCart --> <action
path = "/ViewShopShoppingCart"
type = "control.ShopShoppingCartAction"
scope = "request"
input = "/pax/shop.jsp">
<forward name = "Failure"
path = "/login.jsp"/>
<forward
name = "Success"
path = "/pax/shop.jsp"/>
</action>
<!-- PAX-/ ShopOrder --> <action
path = "/ShopOrder"
type = "control.ShopOrderAction"
scope = "request"
input = "/login.jsp">
<forward name = "Failure"
path = "/login.jsp"/>
<forward
name = "Success"
path = "/pax/shop.jsp"/>
</action>


<!-- PAX-/ get the Order-View --> <action
path = "/GetOrder"
type = "control.GetOrderAction"
scope = "request">
<forward name = "Failure"
path = "/login.jsp"/> <forward
name = "SuccessPassenger"
path = "/pax/getOrder.jsp"/>
<forward
name = "SuccessGalley"
path = "/pax/galley/getOrder.jsp"/> <forward
name = "SuccessTrolley"
path = "/pax/trolley/getOrder.jsp"/> </action> <!-- PAX-/ change the Order-Item-Status --> <action
path = "/ChangeOrderItemStatus"
type = "control.ChangeOrderItemStatusAction"
name = "changeOrderItemStatusForm"
scope = "request"
validate = "true"
input = "/login.jsp">
<forward name = "Failure"
path = "/login.jsp"/> </action>
<!-- PAX-/ view all Catalog s to change Productstatus etc. --> <action
path = "/CatalogOptions"
type = "control.CatalogOptionsAction"
scope = "request">
<forward name = "Failure"
path = "/login.jsp"/> <forward
name = "SuccessGalley"
path = "/pax/galley/catalogOptions.jsp"/> <forward
name = "SuccessTrolley"
path = "/pax/trolley/catalogOptions.jsp"/> </action> <!-- PAX-/ change Productstatus etc. --> <action
path = "/ProductOptions"
type = "control.ProductOptionsAction"
name = "shopCatalogForm"
validate = "true"
scope = "request"
input = "/login.jsp">
<forward name = "Failure"
path = "/login.jsp"/> <forward
name = "SuccessGalley"
path = "/pax/galley/productOptions.jsp"/> <forward
name = "SuccessTrolley"
path = "/pax/trolley/productOptions.jsp"/> </action>
<!-- PAX-/ change the Preferences View of Order etc. --> <action
path = "/Preferences"
type = "control.DevicePreferenceAction"
scope = "request">
<forward name = "Failure"
path = "/login.jsp"/> <forward
name = "SuccessGalley"
path = "/pax/galley/preferences.jsp"/> <forward
name = "SuccessTrolley"
path = "/pax/trolley/preferences.jsp"/> </action>
<!-- PAX-/ change Productstatus etc. --> <action
path = "/ChangeViewOfOrder"
type = "control.ChangeObserveDeviceAction"
name = "changeObserveDeviceForm"
validate = "true"
scope = "request"
input = "/login.jsp">
<forward name = "Failure"
path = "/login.jsp"/> <forward
name = "SuccessGalley"
path = "/pax/galley/productOptions.jsp"/> <forward
name = "SuccessTrolley"
path = "/pax/trolley/productOptions.jsp"/> </action> <!-- PAX-/ Mailbox --> <action
path = "/Mailbox"
type = "control.MailboxAction"
scope = "request"
input = "/login.jsp">
<forward name = "Failure"
path = "/login.jsp"/> <forward
name = "SuccessGalley"
path = "/pax/galley/mailbox.jsp"/> <forward
name = "SuccessTrolley"
path = "/pax/trolley/mailbox.jsp"/> </action>


<!-- PAX-/ Mailbox --> <action
path = "/DeleteMessage"
type = "control.DeleteMessageAction"
name = "deleteMessageForm"
validate = "true"
scope = "request"
input = "/login.jsp">
<forward name = "Login"
path = "/login.jsp"/> <forward
name = "SuccessGalley"
path = "/pax/galley/mailbox.jsp"/> <forward
name = "SuccessTrolley"
path = "/pax/trolley/mailbox.jsp"/> </action>



<!-- PAX-Simulator to Order Products --> <action
path = "/SimulatorOrder"
type = "control.SimulatorPassengerAction"
scope = "request"
input = "/login.jsp">
<forward name = "Failure"
path = "/login.jsp"/> <forward
name = "Success"
path = "/pax/simulator/passengerOrder.jsp"/> </action>
<!-- PAX-Simulator to deliver orders --> <action
path = "/SimulatorStaff"
type = "control.SimulatorStaffAction"
scope = "request"
input = "/login.jsp">
<forward name = "Failure"
path = "/login.jsp"/> <forward
name = "Success"
path = "/pax/simulator/staffOrder.jsp"/> </action> <!-- PAX-Debug -->
<action
path = "/Debug"
type = "control.DebugAction"
name = "debugForm"
scope = "request"
validate = "true"
input = "/pax/debug.jsp">
<forward name = "Login"
path = "/login.jsp"/> <forward
name = "success"
path = "/pax/shop.jsp"/>
</action>
</action-mappings>


<!-- ===================================== Controller Configuration -->

   <controller
       processorClass="org.apache.struts.tiles.TilesRequestProcessor"/>

<!-- ================================ Message Resources Definitions -->

    <message-resources parameter="resources.application" />


<!-- ======================================= Plug Ins Configuration -->



<!-- ========== Tiles plugin =================== -->
<!-- -->
<!--
This plugin initialize Tiles definition factory. This later can takes some
parameters explained here after. The plugin first read parameters from web.xml, then
overload them with parameters defined here. All parameters are optional.
The plugin should be declared in each struts-config file.
- definitions-config: (optional)
Specify configuration file names. There can be several comma
separated file names (default: ?? )
- moduleAware: (optional - struts1.1)
Specify if the Tiles definition factory is module aware. If true (default),
there will be one factory for each Struts module.
If false, there will be one common factory for all module. In this later case,
it is still needed to declare one plugin per module. The factory will be
initialized with parameters found in the first initialized plugin (generally the
one associated with the default module).
true : One factory per module. (default)
false : one single shared factory for all modules
- definitions-parser-validate: (optional)
Specify if xml parser should validate the Tiles configuration file.
true : validate. DTD should be specified in file header. (default)
false : no validation
Paths found in Tiles definitions are relative to the main context.
-->
<!-- comment following if struts1.0.x -->


<!--
<plug-in className="org.apache.struts.tiles.TilesPlugin" >
   <set-property property="definitions-config"
                    value="/WEB-INF/tiles-defs.xml" />
   <set-property property="moduleAware" value="true" />
   <set-property property="definitions-parser-validate" value="true" />
 </plug-in>
-->

 <!-- end comment if struts1.0.x -->
<!--
<plug-in className="org.apache.struts.validator.ValidatorPlugIn">
   <set-property
       property="pathnames"
       value="/WEB-INF/validator-rules.xml,/WEB-INF/validation.xml"/>
 </plug-in>
-->

 <!-- Start the Watchdog to obesrve the staff-devices -->
 <plug-in className="control.plugin.WatchdogPlugin"/>

</struts-config>


################################## The simple Plugin:

package control.plugin;

import org.apache.struts.action.ActionServlet;
import org.apache.struts.config.ModuleConfig;
import org.apache.struts.action.PlugIn;
import javax.servlet.ServletException;
import org.apache.log4j.Logger;

//import service.watchdog.Watchdog;

public class WatchdogPlugin implements PlugIn {
private static Logger logger = Logger.getLogger( WatchdogPlugin.class );
public WatchdogPlugin() {
super();
}
public void init(ActionServlet servlet, ModuleConfig config)
throws ServletException {
logger.debug("Enter WatchdogPlugin() ");
// Watchdog.startWatchdog();
}
public void destroy() {
// Watchdog.stoppWatchdog();
}


}


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to