geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Manu George" <manu.t.geo...@gmail.com>
Subject Re: ClassCastException when using a self written TypeConverter
Date Thu, 05 Jul 2007 13:29:22 GMT
I remember facing a similar issue and I think that there is a bug with
the TypeConverter stuff in OpenEJB. I would second Gianny's advice to
use Geronimo 2.0 and OEJB 3.0 and get back if there are issues there.

Regards
Manu

On 7/5/07, Gianny Damour <gianny.damour@optusnet.com.au> wrote:
> On 05/07/2007, at 10:34 PM, MoleSon wrote:
>
> > Could not deploy module
> > org.apache.geronimo.common.DeploymentException: Could not deploy
> > module
> >       ...
> > Caused by: org.apache.geronimo.common.DeploymentException: Cannot
> > create
> > type converter mypackage.MyTypeConverter
> >       at
> > org.openejb.deployment.SchemataBuilder.processEnterpriseBeans
> > (SchemataBuilder.java:436)
> >       ... 32 more
> > Caused by: java.lang.ClassCastException: mypackage.MyTypeConverter
> >       at
> > org.openejb.deployment.SchemataBuilder.processEnterpriseBeans
> > (SchemataBuilder.java:434)
> >       ... 33 more
> >
> > I had a look at the geronimo source code and notices that the
> > Exception is
> > thrown at these lines in the ScemataBuilder:
> > try
> > {
> >       Class typeConverterClass = cl.loadClass(mapping.getTypeConverter
> > ().trim());
> >       typeConverter = (TypeConverter)typeConverterClass.newInstance();
> > }
> > catch(Exception e)
> > {
> >       throw new DeploymentException("Cannot create type converter " +
> > mapping.getTypeConverter(), e);
> > }
>
> It is hard to diagnostic. Could you please put a breakpoint after
> cl.loadClass and tell us what the value of MultiParentClassLoader.id
> is? Also, I strongly recommend you to migrate to the latest version
> of Geronimo/OpenEJB, which uses OpenJPA as the underlying persistence
> framework for CMPs. This migration should be "effortless" as you do
> not need to change your OpenEJB deployment descriptors. Furthermore,
> you will also be able to leverage the simplified programming model of
> EJB3.
>
> Thanks,
> Gianny
>
>
>

Mime
View raw message