users@glassfish.java.net

Deploy problem on Glassfish v3 ("This bundle has no bean of name")

From: <glassfish_at_javadesktop.org>
Date: Thu, 08 Apr 2010 02:14:15 PDT

Hi everybody,

I'm trying to port our application from Glassfish v2 to v3 and I have this issue I cannot deal with.

I have a MessageDriven bean class, annotated like this :

[i]@MessageDriven(name="[b]StandardHL7MessageListenerBean[/b] ", messageListenerInterface=HL7MessageListener.class
)
public class [b]StandardHL7MessageListenerBean[/b] extends AbstractHL7MessageListener {.....}[/i]
and :

[i]public abstract class AbstractHL7MessageListener implements HL7MessageListener { ...... }[/i]

and my sun-ejb-jar.xml :
[i]<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD GlassFish Application Server 3.0 EJB 3.1//EN"
"http://www.sun.com/software/appserver/dtds/sun-ejb-jar_3_1-0.dtd">
<sun-ejb-jar>
        <enterprise-beans>

        <ejb>
                <ejb-name>[b]StandardHL7MessageListenerBean[/b]</ejb-name>
                <mdb-connection-factory>
        <jndi-name>ra/hl7ra</jndi-name>
    </mdb-connection-factory>
                <mdb-resource-adapter>
                        <resource-adapter-mid>Hexalis-EJB#hl7ra</resource-adapter-mid>
                        <activation-config>
                                <activation-config-property>
                                        <activation-config-property-name>port</activation-config-property-name>
                                        <activation-config-property-value>@ra.port@</activation-config-property-value>
                                </activation-config-property>
                                
                                <activation-config-property>
                                        <activation-config-property-name>isSecure</activation-config-property-name>
                                        <activation-config-property-value>false</activation-config-property-value>
                                </activation-config-property>
                                
                                
                        </activation-config>
                </mdb-resource-adapter>
        </ejb>
        
        </enterprise-beans>
        
</sun-ejb-jar>[/i]

These are included in a jar file which is also included in an ear file.
While I'm trying to deploy this on v3 (works fine in v2) I'm getting this stack :
[i][#|2010-04-07T18:23:41.514+0200|SEVERE|glassfishv3.0|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=28;_ThreadName=Thread-1;|Exception while deploying the app
java.lang.IllegalArgumentException: Referencing error: This bundle has no bean of name [StandardHL7MessageListenerBean]
        at com.sun.enterprise.deployment.EjbBundleDescriptor.getEjbByName(EjbBundleDescriptor.java:279)
        at com.sun.enterprise.deployment.EjbBundleDescriptor.getEjbByName(EjbBundleDescriptor.java:263)
        at com.sun.enterprise.deployment.node.runtime.EjbNode.setElementValue(EjbNode.java:121)
        at com.sun.enterprise.deployment.node.SaxParserHandler.endElement(SaxParserHandler.java:444)
        at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:601)
        at com.sun.org.apache.xerces.internal.impl.dtd.XMLNSDTDValidator.endNamespaceScope(XMLNSDTDValidator.java:263)
.[/i].....
I have no ejb-jar.xml file, but the doc says it's ok since I've annotated my class.

I don't figure out what's wrong, I don't see any changes between v2 and v3 that can explain this.

Any idea will be welcomed.
[Message sent by forum member 'rjuncu']

http://forums.java.net/jive/thread.jspa?messageID=395852