geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <>
Subject Re: ClassCastException during EJB deployment
Date Fri, 03 Aug 2007 16:35:07 GMT
The first thing that comes to mind is that perhaps you are trying to  
use incompatible openejb client and server jars?  IIUC geronimo 1.1.1  
needs openejb2 client jars and geronimo 2 needs openejb3 client jars  
and they are not interoperable.  However I am not the most expert on  
this subject.  Knowing exactly which openejb jar versions are in your  
client classpath  would definitely be helpful though.

david jencks

On Aug 3, 2007, at 9:00 AM, Oleg Nitz wrote:

> Thank you for your answer, David. You are right, I already had  
> EJBNetworkService and have installed the second one. The idea to do  
> this came to me when I got the following exception during JNDI  
> lookup of my bean from standalone client app:
> Cannot deternmine server protocol version: Received null/0.0;  
> nested exception is:
> Unable to read protocol version.   
> Reached the end of the stream.
>         at org.openejb.client.JNDIContext.authenticate 
> (
>         at org.openejb.client.JNDIContext.getInitialContext 
> (
>         at javax.naming.spi.NamingManager.getInitialContext 
> (
>         at javax.naming.InitialContext.getDefaultInitCtx 
> (
>         at javax.naming.InitialContext.init(
>         at javax.naming.InitialContext.<init>(
>         at  
> ua.odessa.ibis.core.user.registry.UserRegistryClient.<init> 
> (
> Then I found this message
> but didn't understand where to put "allowHosts" and decided to add  
> a new EJBNetworkService for that :-/
> Okay, now I've got it: I've added
>      <attribute name="allowHosts"></attribute>
> to EJBNetworkService gbean in config.xml, now it looks this way:
>   <module name="geronimo/openejb/1.1.1/car">
>     <gbean name="EJBNetworkService">
>       <attribute name="host"></attribute>
>       <attribute name="port">4201</attribute>
>       <attribute name="allowHosts"></attribute>
>     </gbean>
>   </module>
> But nothing changes, I get the same exception during lookup().
> Please, advise me the next step.
> Thank you for your help,
> Oleg
> David Jencks wrote:
>> I don't understand what you are saying about needing to deploy the  
>> EJBNetworkService... I can see needing to change the port or host  
>> but there's one already started out of the box.
>> Your error is caused by having 2 classloaders that load the  
>> openejb classes independently.  There should be only one such  
>> classloader per jvm, the one from the openejb config (module).   
>> Can you figure out what the other one is?  If you really need  
>> another listener you should be sure that the openejb configuration  
>> (car) is a parent (dependency) of the configuration you put it  
>> in.  Openejb is extremely unlikely to work if you have more than  
>> one ContainerIndex running since most references to it are through  
>> a static variable.
>> hope this helps
>> david jencks
>> On Aug 3, 2007, at 5:35 AM, Oleg Nitz wrote:
>>> Hello all,
>>> First I have successfully deployed my EJB, but couldn't connect  
>>> to it from standalone application. Then I found that I also need  
>>> to deploy EJBNetworkService/EJBServer stuff. Okay, did that and got
>>> java.lang.ClassCastException: org.openejb.GenericEJBContainer
>>>         at org.openejb.EJBContainer$$EnhancerByCGLIB$ 
>>> $964163d7.getUnmanagedReference(<generated>)
>>>         at org.openejb.ContainerIndex.doStart( 
>>> 123)
>>> Then I undeployed my EJB and successfully deployed  
>>> EJBNetworkService. Now deployment of the EJB causes the same error.
>>> I've found such error in the mail archives:
>>> 200605.mbox/% 
>>> but that message left unanswered.
>>> Did anyone have such problems?
>>> Any guidelines for me on what to do next?
>>> Thanks in advance,
>>> Oleg
>>> P.S. Geronimo 1.1.1 (actually, WAS CE)

View raw message