You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by Rajesh Ravindran <ra...@gmail.com> on 2004/08/26 09:01:42 UTC

ClassCastException when deloying petstore

Hi all,

I got the following ClassCastException while trying to deploy the
petstore application. Could any of you tell me what could be the
problem.

Thanks in advance 
Rajesh

Here is the stack trace of the same:

java.lang.ClassCastException
        at org.openejb.deployment.OpenEJBModuleBuilder.addGBeans(OpenEJBModuleBuilder.java:576)
        at org.openejb.deployment.OpenEJBModuleBuilder$$FastClassByCGLIB$$11bd7b20.invoke(<generated>)
        at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:87)
        at org.apache.geronimo.gbean.jmx.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
        at org.apache.geronimo.gbean.jmx.GBeanMBeanOperation.invoke(GBeanMBeanOperation.java:142)
        at org.apache.geronimo.gbean.jmx.GBeanMBean.invoke(GBeanMBean.java:744)
        at org.apache.geronimo.gbean.jmx.RawInvoker.invoke(RawInvoker.java:89)
        at org.apache.geronimo.gbean.jmx.RawOperationInvoker.invoke(RawOperationInvoker.java:34)
        at org.apache.geronimo.gbean.jmx.CGLibMethodInterceptor.intercept(CGLibMethodInterceptor.java:111)
        at org.apache.geronimo.j2ee.deployment.ModuleBuilder$$EnhancerByCGLIB$$9e45a280.addGBeans(<generated>)
        at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:442)
        at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:346)
        at org.apache.geronimo.j2ee.deployment.EARConfigBuilder.buildConfiguration(EARConfigBuilder.java:244)
        at org.apache.geronimo.j2ee.deployment.EARConfigBuilder$$FastClassByCGLIB$$38e56ec6.invoke(<generated>)
        at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:87)
        at org.apache.geronimo.gbean.jmx.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
        at org.apache.geronimo.gbean.jmx.GBeanMBeanOperation.invoke(GBeanMBeanOperation.java:142)
        at org.apache.geronimo.gbean.jmx.GBeanMBean.invoke(GBeanMBean.java:744)
        at org.apache.geronimo.gbean.jmx.RawInvoker.invoke(RawInvoker.java:89)
        at org.apache.geronimo.gbean.jmx.RawOperationInvoker.invoke(RawOperationInvoker.java:34)
        at org.apache.geronimo.gbean.jmx.CGLibMethodInterceptor.intercept(CGLibMethodInterceptor.java:111)
        at org.apache.geronimo.deployment.ConfigurationBuilder$$EnhancerByCGLIB$$7a1ca0ae.buildConfiguration(<generated>)
        at org.apache.geronimo.deployment.Deployer.deploy(Deployer.java:198)
        at org.apache.geronimo.deployment.Deployer$$FastClassByCGLIB$$734a235d.invoke(<generated>)
        at net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:87)
        at org.apache.geronimo.gbean.jmx.FastMethodInvoker.invoke(FastMethodInvoker.java:38)
        at org.apache.geronimo.gbean.jmx.GBeanMBeanOperation.invoke(GBeanMBeanOperation.java:142)
        at org.apache.geronimo.gbean.jmx.GBeanMBean.invoke(GBeanMBean.java:765)
        at mx4j.server.interceptor.InvokerMBeanServerInterceptor.invoke(InvokerMBeanServerInterceptor.java:218)
        at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:121)
        at mx4j.server.interceptor.SecurityMBeanServerInterceptor.invoke(SecurityMBeanServerInterceptor.java:86)
        at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:121)
        at mx4j.server.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:121)
        at mx4j.server.interceptor.ContextClassLoaderMBeanServerInterceptor.invoke(ContextClassLoaderMBeanServerInterceptor.java:205)
        at mx4j.server.MX4JMBeanServer.invoke(MX4JMBeanServer.java:1079)
        at org.apache.geronimo.kernel.Kernel.invoke(Kernel.java:231)
        at org.apache.geronimo.system.main.CommandLine.main(CommandLine.java:93)

Re: ClassCastException when deloying petstore

Posted by Rajesh Ravindran <ra...@gmail.com>.
Hi Jacek,

Thanks for replying. 

In my attempts at trying to deploy the petstore application, i first
created the geronimo-jetty.xml in the war & corresponding
openejb-jar.xml's in their jars. Put it all in petstore.ear. Initially
i was getting some deployment exceptions, which i solved by adding
some missing classes to the required jars. That is when i encountered
this exception.

So to debug it, i got the openejb code from the CVS repository & built
it. Now i want to know how i can integrate my changes in openejb to
geronimo. As of now I am having a little trouble with the deploy
command of openejb. So I have to work around that.

Well this does not necessarily mean that I am way ahead of u, maybe i
am on a totally different and wrong way :). So please help me get on
track.


Thanks
Rajesh

Re: ClassCastException when deloying petstore

Posted by Rajesh Ravindran <ra...@gmail.com>.
Hi Jacek,

Thanks for replying. 

In my attempts at trying to deploy the petstore application, i first
created the geronimo-jetty.xml in the war & corresponding
openejb-jar.xml's in their jars. Put it all in petstore.ear. Initially
i was getting some deployment exceptions, which i solved by adding
some missing classes to the required jars. That is when i encountered
this exception.

So to debug it, i got the openejb code from the CVS repository & built
it. Now i want to know how i can integrate my changes in openejb to
geronimo. As of now I am having a little trouble with the deploy
command of openejb. So I have to work around that.

Well this does not necessarily mean that I am way ahead of u, maybe i
am on a totally different and wrong way :). So please help me get on
track.


Thanks
Rajesh

Re: ClassCastException when deloying petstore

Posted by Rajesh Ravindran <ra...@gmail.com>.
Thanks Gianny, I got the latest version from the CVS. Now it works fine. 

Thanks,
Rajesh

Re: ClassCastException when deloying petstore

Posted by Gianny Damour <gi...@optusnet.com.au>.
On 27/08/2004 8:55 PM, Rajesh Ravindran wrote:

>So I put <env-entry-type> before <env-entry-value>. After doing this I
>was able to manage without the error while delploying. But now when I
>try to start the server for this application. It gives me an error
>saying that the order has to be different, i.e  <env-entry-type>
>should come after <env-entry-value>.
>
>Can u suggest how to get around this problem. If this is a bug, has it
>been repaired?
>  
>
This bug has been fixed. Could you please give it another try with the 
very last version in CVS?

I assume that the problem was the following one: upon deployment, old DD 
are "updraded" to be compliant with their corresponding XSD file. During 
this process, <env-entry> children were not sorted and hence the 
deployment was failing. Now, if one sorts them in order to pass the 
deployment, the old DD is no more compliant with its DTD. As DTDs are 
verified only at runtime (this seems wrong), the server will not be able 
to start properly.

Thanks,
Gianny

Re: ClassCastException when deloying petstore

Posted by Rajesh Ravindran <ra...@gmail.com>.
As Gianny mentioned, I was having problems while trying to deploy
petstore with the <env-entry> elements, as their order was not being
accepted.

So I put <env-entry-type> before <env-entry-value>. After doing this I
was able to manage without the error while delploying. But now when I
try to start the server for this application. It gives me an error
saying that the order has to be different, i.e  <env-entry-type>
should come after <env-entry-value>.

Can u suggest how to get around this problem. If this is a bug, has it
been repaired?

Thanks

Rajesh

Re: ClassCastException when deloying petstore

Posted by Jacek Laskowski <jl...@apache.org>.
Gianny Damour wrote:

> Jacek, I do have a favor to ask you: could you please have a look to 
> this OpenEJB patch http://jira.codehaus.org/browse/OPENEJB-8. It enables 
> OpenEJBModuleBuilder to use the alternate spec and vendor specific DD. 
> This way, it is possible to unpack the PetStore EAR and specific 
> alternate DD for all the defined EJBs without having to open them (this 
> is quite handy).

Will certainly do.

> Gianny

Best,
Jacek


Re: ClassCastException when deloying petstore

Posted by Gianny Damour <gi...@optusnet.com.au>.
On 26/08/2004 9:27 PM, Jacek Laskowski wrote:

> Rajesh Ravindran wrote:
>
>> Hi all,
>>
>> I got the following ClassCastException while trying to deploy the
>> petstore application. Could any of you tell me what could be the
>> problem.
>>
>> Thanks in advance Rajesh
>>
>> Here is the stack trace of the same:
>>
>> java.lang.ClassCastException
>>         at 
>> org.openejb.deployment.OpenEJBModuleBuilder.addGBeans(OpenEJBModuleBuilder.java:576) 
>>
>
>
> Would you describe what you had done till the exception occured? I'm 
> really interested in your findings on deploying PetStore onto 
> Geronimo. Is there anything not included in 
> http://wiki.apache.org/geronimo/PetStore? I don't remember the 
> exception so you're a way ahead of me, grrr... :)

Rajesh thanks for your help!

At this very moment, I am giving a try to petstore 1.1.2. I have just 
improved the deployment descriptor convertion such that the <env-entry> 
elements are also sorted (this was a previous problem reported by Rajesh 
and I thought that he was deploying his own Web app).

I have just been able to reproduce this ClassCastException and I will 
debug this issue.

Jacek, I do have a favor to ask you: could you please have a look to 
this OpenEJB patch http://jira.codehaus.org/browse/OPENEJB-8. It enables 
OpenEJBModuleBuilder to use the alternate spec and vendor specific DD. 
This way, it is possible to unpack the PetStore EAR and specific 
alternate DD for all the defined EJBs without having to open them (this 
is quite handy).

Thanks,
Gianny

Re: ClassCastException when deloying petstore

Posted by Jacek Laskowski <jl...@apache.org>.
Rajesh Ravindran wrote:

> Hi all,
> 
> I got the following ClassCastException while trying to deploy the
> petstore application. Could any of you tell me what could be the
> problem.
> 
> Thanks in advance 
> Rajesh
> 
> Here is the stack trace of the same:
> 
> java.lang.ClassCastException
>         at org.openejb.deployment.OpenEJBModuleBuilder.addGBeans(OpenEJBModuleBuilder.java:576)

Would you describe what you had done till the exception occured? I'm 
really interested in your findings on deploying PetStore onto Geronimo. 
Is there anything not included in 
http://wiki.apache.org/geronimo/PetStore? I don't remember the exception 
so you're a way ahead of me, grrr... :)

Best,
Jacek