Failed to deploy a MDB

I got the following error when I deploy a message-driven bean into AS8.1 server.

The queue is the AS8.1 built-in queue. The queue is working fine as I have some JSP's using it to send and receive messages without any problem.

Please Help. Many thanks

SKC

[#|2006-07-12T16:21:41.362+0800|FINE|sun-appserver-pe8.1_02|javax.enterprise.system.container.ejb.mdb|_ThreadID=28;|Using com.sun.enterprise.connectors.inflow.ConnectorMessageBeanClientFactoryfor message bean client factory in NIStatistics:NIStatsQueueBean|#]

[#|2006-07-12T16:21:41.362+0800|FINE|sun-appserver-pe8.1_02|javax.enterprise.system.container.ejb.mdb|_ThreadID=28;|NIStatistics:NIStatsQueueBean: Setting message-driven bean pool max-pool-size=32, steady-pool-size=0, pool-resize-quantity=8, idle-timeout-in-seconds=600|#]

[#|2006-07-12T16:21:41.362+0800|FINE|sun-appserver-pe8.1_02|javax.enterprise.system.container.ejb|_ThreadID=28;|[Pool-NIStatistics:NIStatsQueueBean]: Added PoolResizeTimerTask...|#]

[#|2006-07-12T16:21:41.409+0800|FINE|sun-appserver-pe8.1_02|javax.enterprise.system.container.ejb|_ThreadID=28;|[MonitoringMediator] registered pool statsfornull; C__Program_Files_Sun_jstudio_ent8_AppServ8_1UR2_domains_domain1_applications_j2ee-modules_NIStatistics; NIStatsQueueBean|#]

[#|2006-07-12T16:21:41.409+0800|SEVERE|sun-appserver-pe8.1_02|javax.enterprise.system.container.ejb.mdb|_ThreadID=28;|MDB00017: [NIStatsQueueBean]: Exception in creating message-driven bean container: [com.sun.enterprise.connectors.ConnectorRuntimeException: JMS resource not created : ejb/NIStatsQueueBean]|#]

[#|2006-07-12T16:21:41.409+0800|SEVERE|sun-appserver-pe8.1_02|javax.enterprise.system.container.ejb.mdb|_ThreadID=28;|com.sun.enterprise.connectors.ConnectorRuntimeException

com.sun.enterprise.connectors.ConnectorRuntimeException: JMS resource not created : ejb/NIStatsQueueBean

at com.sun.enterprise.connectors.system.ActiveJmsResourceAdapter.getPhysicalDestinationFromConfiguration(ActiveJmsResourceAdapter.java:560)

at com.sun.enterprise.connectors.system.ActiveJmsResourceAdapter.updateMDBRuntimeInfo(ActiveJmsResourceAdapter.java:444)

at com.sun.enterprise.connectors.inflow.ConnectorMessageBeanClient.setup(ConnectorMessageBeanClient.java:139)

at com.sun.ejb.containers.MessageBeanContainer.<init>(MessageBeanContainer.java:187)

at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:221)

at com.sun.enterprise.server.AbstractLoader.loadEjbs(AbstractLoader.java:477)

at com.sun.enterprise.server.EJBModuleLoader.load(EJBModuleLoader.java:93)

......

This is my DD:

<?xml version="1.0" encoding="UTF-8"?>

<ejb-jar version="2.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/ejb-jar_2_1.xsd">

...

<message-driven>

<display-name>NIStatsQueueMDB</display-name>

<ejb-name>NIStatsQueueBean</ejb-name>

<ejb-class>com.ni.stats.ejb.NIStatsQueueBean</ejb-class>

<messaging-type>javax.jms.MessageListener</messaging-type>

<transaction-type>Container</transaction-type>

<message-destination-type>javax.jms.Queue</message-destination-type>

<message-destination-link>NIStatsQueue</message-destination-link>

<ejb-local-ref>

<ejb-ref-name>ejb/NISessionLogBean</ejb-ref-name>

<ejb-ref-type>Entity</ejb-ref-type>

<local-home>com.ni.stats.ejb.NISessionLogLocalHome</local-home>

<local>com.ni.stats.ejb.NISessionLogLocal</local>

<ejb-link>NISessionLogBean</ejb-link>

</ejb-local-ref>

<resource-ref>

<res-ref-name>jms/QueueConnFactory</res-ref-name>

<res-type>javax.jms.QueueConnectionFactory</res-type>

<res-auth>Container</res-auth>

<res-sharing-scope>Shareable</res-sharing-scope>

</resource-ref>

</message-driven>

...

<assembly-descriptor>

...

<message-destination>

<display-name>Destinationfor NIStatsQueue</display-name>

<message-destination-name>NIStatsQueue</message-destination-name>

</message-destination>

</assembly-descriptor>

This is the sun-ejb-jar DD :

...

<ejb>

<ejb-name>NIStatsQueueBean</ejb-name>

<jndi-name>ejb/NIStatsQueueBean</jndi-name>

<resource-ref>

<res-ref-name>jms/QueueConnFactory</res-ref-name>

<jndi-name>jms/QueueConnFactory</jndi-name>

</resource-ref>

<mdb-connection-factory>

<jndi-name>jms/QueueConnFactory</jndi-name>

<default-resource-principal>

<name>guest</name>

<password>guest</password>

</default-resource-principal>

</mdb-connection-factory>

</ejb>

...

<message-destination>

<message-destination-name>NIStatsQueue</message-destination-name>

<jndi-name>jms/NIStatsQueue</jndi-name>

</message-destination>

Message was edited by:

SKC

[5808 byte] By [ConnectorRuntimeException] at [2007-11-26 8:39:32]
# 1
I can deploy the mdb now because the sun-ejb-jar is incorrectly set.The <jndi-name> of <ejb> is for the Queue or Topic and it should be:<jndi-name>jms/NIStatsQueue</jndi-name>Thanks
ConnectorRuntimeException at 2007-7-6 22:14:55 > top of Java-index,Application & Integration Servers,Application Servers...