Two Laptop Bag*
The moose likes EJB and other Java EE Technologies and the fly likes MDB problem in Sun one Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "MDB problem in Sun one " Watch "MDB problem in Sun one " New topic
Author

MDB problem in Sun one

Suneesh Raman
Ranch Hand

Joined: Jun 13, 2002
Posts: 42
Hi

I have created the connection factory as jms/ConnectionFactory and physical destination as PhysicalQueue and queue as jms/Queue as per
http://java.sun.com/j2ee/1.4/docs/tutorial/doc/MDB5.html#wp79772
&
http://java.sun.com/j2ee/1.4/docs/tutorial/doc/MDB6.html

But I am getting the following exception


[#|2005-03-10T13:36:52.970+0530|SEVERE|sun-appserver-pe8.0.0_01|javax.enterpris e.system.core.classloading|_ThreadID=11;|LDR5004: UnExpected error occured while creating ejb container
javax.naming.NamingException: Message Destination Reference java:comp/env/jms/Queue has not been linked to a Message Destination
at com.sun.enterprise.naming.NamingManagerImpl.bindObjects(NamingManagerImpl.java: 450)
at com.sun.ejb.containers.BaseContainer.setupEnvironment(BaseContainer.java:1759)
at com.sun.ejb.containers.BaseContainer.<init>(BaseContainer.java:376)
at com.sun.ejb.containers.MessageBeanContainer.<init>(MessageBeanContainer.j ava:118)
at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImp l.java:196)
at com.sun.enterprise.server.AbstractLoader.loadEjbs(AbstractLoader.java:477)
at com.sun.enterprise.server.ApplicationLoader.load(ApplicationLoader.java:125)
at com.sun.enterprise.server.TomcatApplicationLoader.load(TomcatApplicationLoader. java:96)
at com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationMan ager.java:205)
at com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationMan ager.java:156)
at com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationMan ager.java:480)
at com.sun.enterprise.admin.event.AdminEventMulticaster.invokeApplicationDeployEve ntListener(AdminEventMulticaster.java:448)
at com.sun.enterprise.admin.event.AdminEventMulticaster.handleApplicationDeployEve nt(AdminEventMulticaster.java:432)
at com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMul ticaster.java:299)
at com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventM ulticaster.java:107)
at com.sun.enterprise.admin.server.core.mbean.config.ManagedServerInstance.multica stEvent(ManagedServerInstance.java:3880)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja va:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.sun.enterprise.admin.server.core.jmx.Introspector.invokeMethodOn(Introspect or.java:181)
at com.sun.enterprise.admin.server.core.mbean.config.AdminBase.invoke(AdminBase.ja va:86)
at com.sun.enterprise.admin.server.core.mbean.config.ConfigMBeanBase.invoke(Config MBeanBase.java:680)
at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:221 )
at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:228)
at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServer Interceptor.java:

My ejb-jar.xml is as below


<?xml version='1.0' encoding='UTF-8'?>
<ejb-jar
xmlns="http://java.sun.com/xml/ns/j2ee"
version="2.1"
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"
>
<display-name>RegJAR</display-name>
<enterprise-beans>
<message-driven>
<ejb-name>RegistrationMDBean</ejb-name>
<ejb-class>com.registration.ejb.RegistrationMDBean</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>PhysicalQueue</message-destination-link>
<message-destination-ref>
<message-destination-ref-name>jms/Queue</message-destination-ref-name& gt;
<message-destination-type>javax.jms.Queue</message-destination-type> ;
<message-destination-usage>Consumes</message-destination-usage>
<message-destination-link>PhysicalQueue</message-destination-link>
</message-destination-ref>
</message-driven>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>RegistrationMDBean</ejb-name>
<method-name>onMessage</method-name>
<method-params>
<method-param>javax.jms.Message</method-param>
</method-params>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>

Thanks
Suneesh
Suneesh Raman
Ranch Hand

Joined: Jun 13, 2002
Posts: 42
In stead of selecting the message destination I have selected the Message Dest Ref tab .But when I selected the message destination tab of JAR file I am getting the following error

[#|2005-03-10T15:51:22.263+0530|INFO|sun-appserver-pe8.0.0_01|javax.enterprise. system.tools.admin|_ThreadID=12;|ADM1041:Sent the event to instance:[ApplicationDeployEvent -- enable MDBEg]|#]

[#|2005-03-10T15:51:22.283+0530|SEVERE|sun-appserver-pe8.0.0_01|javax.enterpris e.system.container.ejb.mdb|_ThreadID=12;|MDB00017: [RegistrationMDBean]: Exception in creating message-driven bean container: [com.sun.enterprise.connectors.ConnectorRuntimeException: JMS resource not created : ]|#]

[#|2005-03-10T15:51:22.283+0530|SEVERE|sun-appserver-pe8.0.0_01|javax.enterpris e.system.container.ejb.mdb|_ThreadID=12;|com.sun.enterprise.connectors.Connector RuntimeException
com.sun.enterprise.connectors.ConnectorRuntimeException: JMS resource not created :
at com.sun.enterprise.connectors.system.ActiveJmsResourceAdapter.getPhysicalDestin ationFromConfiguration(ActiveJmsResourceAdapter.java:296)
at com.sun.enterprise.connectors.system.ActiveJmsResourceAdapter.updateMDBRuntimeI nfo(ActiveJmsResourceAdapter.java:232)
at com.sun.enterprise.connectors.inflow.ConnectorMessageBeanClient.setup(Connector MessageBeanClient.java:139)
at com.sun.ejb.containers.MessageBeanContainer.<init>(MessageBeanContainer.j ava:189)
at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImp l.java:196)
at com.sun.enterprise.server.AbstractLoader.loadEjbs(AbstractLoader.java:477)
at com.sun.enterprise.server.ApplicationLoader.load(ApplicationLoader.java:125)
at com.sun.enterprise.server.TomcatApplicationLoader.load(TomcatApplicationLoader. java:96)
at com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationMan ager.java:205)
at com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationMan ager.java:156)
at com.sun.enterprise.server.ApplicationManager.applicationEnabled(ApplicationMana ger.java:590)
at com.sun.enterprise.admin.event.AdminEventMulticaster.invokeApplicationDeployEve ntListener(AdminEventMulticaster.java:454)
at com.sun.enterprise.admin.event.AdminEventMulticaster.handleApplicationDeployEve nt(AdminEventMulticaster.java:432)
at com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMul ticaster.java:299)
at com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventM ulticaster.java:107)
at com.sun.enterprise.admin.server.core.mbean.config.ManagedServerInstance.multica stEvent(ManagedServerInstance.java:3880)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.ja va:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.sun.enterprise.admin.server.core.jmx.Introspector.invokeMethodOn(Introspect or.java:181)
at com.sun.enterprise.admin.server.core.mbean.config.AdminBase.invoke(AdminBase.ja va:86)
at com.sun.enterprise.admin.server.core.mbean.config.ConfigMBeanBase.invoke(Config MBeanBase.java:68

Thanks
Suneesh
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: MDB problem in Sun one