Hi.
I�m using cocoon 2.0 and configured a simple component in cocoon.xconf :
 
 
<cocoon version="2.0">
    <component role="com.tha.test" class="com.tha.test">
    (..)
 
 
 
The class is the most basic one:
 
 
public class test implements HttpConnector, Startable, Configurable, ThreadSafe, Initializable, Composable{
 
    public static String ROLE = "com.tha.test";
  
   
    /* (non-Javadoc)
  * @see org.apache.avalon.framework.activity.Initializable#initialize()
  */
 public void initialize() throws Exception {
    // TODO Auto-generated method stub
 
 }
 
 /* (non-Javadoc)
  * @see org.apache.avalon.framework.activity.Startable#start()
  */
 public void start() throws Exception {
   // TODO Auto-generated method stub
 
 }
 
 /* (non-Javadoc)
  * @see org.apache.avalon.framework.component.Composable#compose(org.apache.avalon.framework.component.ComponentManager)
  */
 public void compose(ComponentManager componentManager) throws ComponentException {
 
  }
 
 /* (non-Javadoc)
  * @see org.apache.avalon.framework.configuration.Configurable#configure(org.apache.avalon.framework.configuration.Configuration)
  */
 public void configure(Configuration arg0) throws ConfigurationException {
    // TODO Auto-generated method stub
 
 }
 
 /* (non-Javadoc)
  * @see org.apache.avalon.framework.activity.Startable#stop()
  */
 public void stop() throws Exception {
    // TODO Auto-generated method stub
 
 }
 
 
When i deploy and if i put logs in each method, all is going fine with all outputs, so the component is correctly initialized . But in the error.log i get:
 
ERROR   (2004-09-14) 16:59.24:324   [core.manager] (Unknown-URI) Unknown-thread/ExcaliburComponentManager: Caught an exception trying to initialize the component handler.
java.lang.ClassCastException
 at org.apache.avalon.excalibur.component.ThreadSafeComponentHandler.initialize(ThreadSafeComponentHandler.java:98)
 at org.apache.avalon.excalibur.component.ExcaliburComponentManager.initialize(ExcaliburComponentManager.java:513)
 at org.apache.cocoon.Cocoon.initialize(Cocoon.java:270)
 at org.apache.cocoon.servlet.CocoonServlet.createCocoon(CocoonServlet.java:1276)
 at org.apache.cocoon.servlet.CocoonServlet.init(CocoonServlet.java:485)
 
 
This is my first time i�m using components and i�ve already did a search in google but nothing. I don�t like programming with this kind of errors.. any ideas?.
 
Tks in advance
 

   


DISCLAIMER: This message may contain confidential information or privileged material and is intended only for the individual(s) named. If you are not a named addressee and mistakenly received this message you should not copy or otherwise dissimenate it: please delete this e-mail from your system and notify the sender immediately. E-mail transmissions are not guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. Therefore, the sender does not accept liability for any errors or omissions in the contents of this message that arise as a result of e-mail transmissions. Please request a hard-copy version if verification is required. Critical Software.

Reply via email to