[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openejb-user
Subject:    Re: Unknown error in Assembler for MessageDriven bean
From:       Zog <jogoussard () gmail ! com>
Date:       2008-10-08 20:17:28
Message-ID: 19886737.post () talk ! nabble ! com
[Download RAW message or body]


That's a very complete and clear explanation - as a
newbie in the EJB world, I was not aware of those subtleties.
Thank you very much for the help.
         Zog

David Blevins wrote:
> 
> 
> On Oct 3, 2008, at 8:01 AM, Zog wrote:
> 
> > 
> > Hi
> > Unfortunately I cant' post the code - but I solved the issue by just  
> > adding
> > a
> > <messaging-type>javax.jms.MessageListener</messaging-type>
> > in ejb-jar.xml for all my MDBs.
> > One thing to note though is that my MDBs do not directly imlpement  
> > this
> > interface, they extend a class that does - could it be possible that  
> > you're
> > using Class.getDeclaredClasses() instead of getClasses() to  
> > introspect the
> > class ?
> 
> That's definitely what we are doing.  Couple notes on that.
> 
> For EJb 2.1 and prior the <messaging-type> is a required xml element  
> -- autodiscovery via introspection is an EJB 3.0 feature.  If you were  
> to grab an old version of weblogic, the bean would likely not deploy  
> without the <messaging-type> declared.  Something to keep in mind if  
> you intend your app to be an EJB 2.1 compliant app.
> 
> In EJB 3.0 there are some things that the vendor must look into the  
> superclasses for such as @PostConstruct, @PreDestroy, @Resource, and  
> @EJB.  But others like @Stateless, @MessageDriven, @Stateful, @Local,  
> @Remote as well as business interfaces (including message listener  
> interfaces) are only supported in the bean class itself, not the super  
> class.  Some vendors may support searching in super classes for  
> business interfaces, but this is not a compliant behavior and other  
> platforms are not guaranteed to do the same.  A very special note here  
> is that apps that rely on non-compliant auto-discovery of business  
> interfaces in the super class may actually *break* as in EJB 3.1 any  
> ejb that doesn't declare any business interfaces in the bean class  
> itself will be considered a no-interface bean.  This won't affect  
> MDBs, but is something to be aware of.
> 
> 
> -David
> 
> 
> > Dain Sundstrom wrote:
> > > 
> > > Can you post the code for you message driven bean or at the very  
> > > least
> > > the class declaration with any extends clause, implements clause and
> > > class annotations?
> > > 
> > > My guess is the MDB class is not-spec-compliant and Weblogic has some
> > > special logic to guess the proper message listener interface.  Or, we
> > > have a bug :)
> > > 
> > > -dain
> > > 
> > > On Sep 30, 2008, at 10:34 AM, Jacques-Olivier Goussard wrote:
> > > 
> > > > Hi,
> > > > 
> > > > I'm trying to deploy a bunch of MDBs on openejb and encounter this
> > > > error:
> > > > 
> > > > 2008-09-30 15:52:51,328 - ERROR - FATAL ERROR: Unknown error in
> > > > Assembler.
> > > > Plea
> > > > 
> > > > se send the following stack trace and this message to
> > > > user@openejb.org :
> > > > 
> > > > java.lang.IllegalStateException: When annotating a bean class as
> > > > @MessageDriven
> > > > 
> > > > without declaring messageListenerInterface, the bean must implement
> > > > exactly
> > > > one
> > > > 
> > > > interface, no more and no less.
> > > > beanClass=com.oz.shared.transcoding.sti.protoco
> > > > 
> > > > l.ejb.TranscodingProviderMessageListenerBean interfaces=
> > > > 
> > > > at
> > > > org.apache.openejb.config.AnnotationDeployer 
> > > > $ProcessAnnotatedBeans.de
> > > > 
> > > > ploy(AnnotationDeployer.java:854)
> > > > 
> > > > (see full stack below)
> > > > 
> > > > Those EJB were deployed successfully in weblogic, and I didn't yet
> > > > properly
> > > > create the corresponding
> > > > 
> > > > Deployment descriptors for openejb – but this error seems an
> > > > internal one
> > > > and given
> > > > 
> > > > My EJB are 2.0 (no annotations), I find it strange it complains
> > > > about this
> > > > annotation.
> > > > 
> > > > Any ideas someone ?
> > > > 
> > > > /jog
> > > > 
> > > > 
> > > > 
> > > > 2008-09-30 15:52:51,328 - ERROR - FATAL ERROR: Unknown error in
> > > > Assembler.
> > > > Plea
> > > > 
> > > > se send the following stack trace and this message to
> > > > user@openejb.org :
> > > > 
> > > > java.lang.IllegalStateException: When annotating a bean class as
> > > > @MessageDriven
> > > > 
> > > > without declaring messageListenerInterface, the bean must implement
> > > > exactly
> > > > one
> > > > 
> > > > interface, no more and no less.
> > > > beanClass=com.oz.shared.transcoding.sti.protoco
> > > > 
> > > > l.ejb.TranscodingProviderMessageListenerBean interfaces=
> > > > 
> > > > at
> > > > org.apache.openejb.config.AnnotationDeployer 
> > > > $ProcessAnnotatedBeans.de
> > > > 
> > > > ploy(AnnotationDeployer.java:854)
> > > > 
> > > > at
> > > > org.apache.openejb.config.AnnotationDeployer 
> > > > $ProcessAnnotatedBeans.de
> > > > 
> > > > ploy(AnnotationDeployer.java:489)
> > > > 
> > > > at
> > > > org 
> > > > .apache.openejb.config.AnnotationDeployer.deploy(AnnotationDeploye
> > > > 
> > > > r.java:169)
> > > > 
> > > > at
> > > > org.apache.openejb.config.ConfigurationFactory 
> > > > $Chain.deploy(Configura
> > > > 
> > > > tionFactory.java:148)
> > > > 
> > > > at
> > > > org 
> > > > .apache.openejb.config.ConfigurationFactory.configureApplication(C
> > > > 
> > > > onfigurationFactory.java:440)
> > > > 
> > > > at
> > > > org 
> > > > .apache.openejb.config.ConfigurationFactory.configureApplication(C
> > > > 
> > > > onfigurationFactory.java:391)
> > > > 
> > > > at
> > > > org 
> > > > .apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguratio
> > > > 
> > > > n(ConfigurationFactory.java:309)
> > > > 
> > > > at
> > > > org 
> > > > .apache.openejb.assembler.classic.Assembler.build(Assembler.java:2
> > > > 
> > > > 49)
> > > > 
> > > > at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java: 
> > > > 149)
> > > > 
> > > > at org.apache.openejb.OpenEJB.init(OpenEJB.java:288)
> > > > 
> > > > at org.apache.openejb.server.Server.init(Server.java:63)
> > > > 
> > > > at org.apache.openejb.server.Main.initServer(Main.java:155)
> > > > 
> > > > at org.apache.openejb.server.Main.main(Main.java:128)
> > > > 
> > > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > > > 
> > > > at
> > > > sun 
> > > > .reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> > > > 
> > > > java:39)
> > > > 
> > > > at
> > > > sun 
> > > > .reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> > > > 
> > > > sorImpl.java:25)
> > > > 
> > > > at java.lang.reflect.Method.invoke(Method.java:585)
> > > > 
> > > > at org.apache.openejb.cli.MainImpl.main(MainImpl.java:151)
> > > > 
> > > > at org.apache.openejb.cli.Bootstrap.main(Bootstrap.java:103)
> > > > 
> > > > 
> > > > 
> > > > 2008-09-30 15:52:51,331 - FATAL - OpenEJB has encountered a fatal
> > > > error and
> > > > cann
> > > > 
> > > > ot be started: Assembler failed to build the container system.
> > > > 
> > > > org.apache.openejb.OpenEJBException:
> > > > java.lang.IllegalStateException: When
> > > > annot
> > > > 
> > > > ating a bean class as @MessageDriven without declaring
> > > > messageListenerInterface,
> > > > 
> > > > the bean must implement exactly one interface, no more and no less.
> > > > beanClass=c
> > > > 
> > > > om
> > > > .oz
> > > > .shared
> > > > .transcoding.sti.protocol.ejb.TranscodingProviderMessageListenerBean
> > > > 
> > > > interfaces=: When annotating a bean class as @MessageDriven without
> > > > declaring m
> > > > 
> > > > essageListenerInterface, the bean must implement exactly one
> > > > interface, no
> > > > more
> > > > 
> > > > and no less.
> > > > beanClass=com.oz.shared.transcoding.sti.protocol.ejb.TranscodingPro
> > > > 
> > > > viderMessageListenerBean interfaces=
> > > > 
> > > > at
> > > > org 
> > > > .apache.openejb.assembler.classic.Assembler.build(Assembler.java:2
> > > > 
> > > > 63)
> > > > 
> > > > at org.apache.openejb.OpenEJB$Instance.<init>(OpenEJB.java: 
> > > > 149)
> > > > 
> > > > at org.apache.openejb.OpenEJB.init(OpenEJB.java:288)
> > > > 
> > > > at org.apache.openejb.server.Server.init(Server.java:63)
> > > > 
> > > > at org.apache.openejb.server.Main.initServer(Main.java:155)
> > > > 
> > > > at org.apache.openejb.server.Main.main(Main.java:128)
> > > > 
> > > > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > > > 
> > > > at
> > > > sun 
> > > > .reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
> > > > 
> > > > java:39)
> > > > 
> > > > at
> > > > sun 
> > > > .reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
> > > > 
> > > > sorImpl.java:25)
> > > > 
> > > > at java.lang.reflect.Method.invoke(Method.java:585)
> > > > 
> > > > at org.apache.openejb.cli.MainImpl.main(MainImpl.java:151)
> > > > 
> > > > at org.apache.openejb.cli.Bootstrap.main(Bootstrap.java:103)
> > > > 
> > > > Caused by: java.lang.IllegalStateException: When annotating a bean
> > > > class as
> > > > @Mes
> > > > 
> > > > sageDriven without declaring messageListenerInterface, the bean must
> > > > implement e
> > > > 
> > > > xactly one interface, no more and no less.
> > > > beanClass=com.oz.shared.transcoding.s
> > > > 
> > > > ti.protocol.ejb.TranscodingProviderMessageListenerBean interfaces=
> > > > 
> > > > at
> > > > org.apache.openejb.config.AnnotationDeployer 
> > > > $ProcessAnnotatedBeans.de
> > > > 
> > > > ploy(AnnotationDeployer.java:854)
> > > > 
> > > > at
> > > > org.apache.openejb.config.AnnotationDeployer 
> > > > $ProcessAnnotatedBeans.de
> > > > 
> > > > ploy(AnnotationDeployer.java:489)
> > > > 
> > > > at
> > > > org 
> > > > .apache.openejb.config.AnnotationDeployer.deploy(AnnotationDeploye
> > > > 
> > > > r.java:169)
> > > > 
> > > > at
> > > > org.apache.openejb.config.ConfigurationFactory 
> > > > $Chain.deploy(Configura
> > > > 
> > > > tionFactory.java:148)
> > > > 
> > > > at
> > > > org 
> > > > .apache.openejb.config.ConfigurationFactory.configureApplication(C
> > > > 
> > > > onfigurationFactory.java:440)
> > > > 
> > > > at
> > > > org 
> > > > .apache.openejb.config.ConfigurationFactory.configureApplication(C
> > > > 
> > > > onfigurationFactory.java:391)
> > > > 
> > > > at
> > > > org 
> > > > .apache.openejb.config.ConfigurationFactory.getOpenEjbConfiguratio
> > > > 
> > > > n(ConfigurationFactory.java:309)
> > > > 
> > > > at
> > > > org 
> > > > .apache.openejb.assembler.classic.Assembler.build(Assembler.java:2
> > > > 
> > > > 49)
> > > > 
> > > > ... 11 more
> > > 
> > > 
> > > 
> > 
> > -- 
> > View this message in context:
> > http://www.nabble.com/Unknown-error-in-Assembler-for-MessageDriven-bean-tp19747907p19797287.html
> >  Sent from the OpenEJB User mailing list archive at Nabble.com.
> > 
> > 
> 
> 
> 

-- 
View this message in context: \
http://www.nabble.com/Unknown-error-in-Assembler-for-MessageDriven-bean-tp19747907p19886737.html
 Sent from the OpenEJB User mailing list archive at Nabble.com.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic