cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fernando Rodrigues" <f-rodrig...@criticalsoftware.com>
Subject Re: excalibur+cocoon2.0+ClassCastException
Date Tue, 14 Sep 2004 16:56:29 GMT
You´re right, now it works!!
Tks Rui :)

----- Original Message -----
From: "Rui Alberto L. Gonçalves" <rui-l-goncalves@ptinovacao.pt>
To: <users@cocoon.apache.org>
Sent: Tuesday, September 14, 2004 5:46 PM
Subject: Re: excalibur+cocoon2.0+ClassCastException


> Not sure, but try implementing interface
> org.apache.avalon.framework.component.Component also.
>
> hope this helps.
>
> Rui
> On Tue, 2004-09-14 at 17:03, Fernando Rodrigues wrote:
> >
> > 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.f
ramework.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(E
xcaliburComponentManager.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.
> --
> Rui Alberto L. Gonçalves <rui-l-goncalves@ptinovacao.pt>
> PT Inovação
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>




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 disseminate 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.




Mime
View raw message