WLS10 - message-driven bean init-suspended / max-suspended params
I have a message-driven bean deployed with my app. I also have a custom start-up class that binds an Oracle AQ to Weblogic's JNDI tree that this message-driven bean connects to. If our DBAs perform database maintanance over the weekend and bring the db down for a period of time, WebLogic 'suspends' the message-driven bean when the db becomes unresponsive.
This is fine if once the db comes back up, WebLogic would resume the message-driven bean, but it doesn't. Via the admin console, I've tried re-initializing the bean, and I've tried resuming the bean...neither work...both result in a success status but the bean remains with a status of suspended.
Upon digging, I learned there are two parameters you can set for MDBs in the descriptor file or EJBGen annotations called initSuspendSeconds and maxSuspendSeconds...setting masSuspedSeconds to 0, according to the docs, say the bean will never suspend. I use the EJB annotation methodology and added these to my @MessageDriven annotation block. WebLogic Workshop will not generate these parameters in the resultant descriptor, nor will the build I perform to our development application server.
I then went to the admin console and manually updated these fields...help docs from the admin console say the default is 0...online docs and my installation on both windows and linux result in a default of 5 for initSuspendSeconds and 60 for maxSuspendSeconds. Ok...so I override these manually from the admin console once I've deployed my application...only thing it does is it requiresthe creation of a deployment plan now and asks for a directory in which to store this deployment plan. Fine...but honestly...what is the deal with these fields that they're being ignored by EJBGen, their defaults do not follow the docs and changing them via the admin console requires a deployment plan?
Anyone know anything about these params? I'm using WLS10MP1, btw, not 10.3. Not sure if that makes a difference...but just thought I'd include that tidbit.
Any help is greatly appreciated.
Thanks,
Edited by: rlb3778 on Feb 20, 2009 11:56 AM
So if you add the following annotations to the top of your MDB, EJBGen creates the suspended parameters in the descriptor?
@MessageDriven(ejbName = "MyBean",
destinationJndiName = "SOME_QUEUE",
destinationType = "javax.jms.Queue",
transTimeoutSeconds = "3600",
maxBeansInFreePool = "1",
initialBeansInFreePool = "1",
initSuspendSeconds = 0,
maxSuspendSeconds = 0)
If I sent them to anything BUT 0 they're generated in the descriptor files but it ignores them if they're 0 and I WANT them to be 0 so the beans are never suspended. Oh well. I have a ticket open with support and they've confirmed that when they're et to 0 they're not generated and they claim because that's the default value which according to the spec, isn't...so I'm still waiting to hear back.
As for the JDBC connection, MDB resumeing upon reconnectiong of DB...our environments are very different...we do not have a JMS server running and maintained by Weblogic...we have a custom start-up class that binds our OracleAQ to Weblogic's JNDI tree and our MDB listens to the queue in the database. So i'm guessing because of that complex setup something is not working when the db queue disconnects. I will investigate our custom start-up class. Thanks for your help.
Similar Messages
-
Exception in setting up message-driven bean container: [MQJMS1010: not impl
Problem
=======
We are trying to configure and deploy a Message Driven
Bean to listen on a WebSphere MQ queue, using LDAP to
share knowledge of the Queue & Connection Factory.
But when we start the Sun One domain we get an exception:
javax.jms.JMSException: MQJMS1010: not implemented
(see log file at the end of this email)
Can anybody help please ?
The configuration of the various components are listed
below:
WebSphere MQ Configuration
==========================
Version 5.3
Queue Manager
QM_Test
Queues
PATH_MFP.Case.Request
Queue Type: Local
Channels
Channel_Test
Channel Type: Server Connection
Protocol Type: TCP/IP
LDAP configuration
==================
ldap://localhost/o=mqtest
cn=MFP_LOCAL_Factory
javaFactory=com.ibm.mq.jms.MQQueueConnectionFactoryFactory
javaClassName=com.ibm.mq.jms.MQQueueConnectionFactory
javaReferenceAddress=#3#QMGR#QM_Test
javaReferenceAddress=#6#CHAN#Channel_Test
javaReferenceAddress=#14#TM#SYSTEM.DEFAULT.MODEL.QUEUE
cn=MFP_LOCAL_Case_Request_Queue
javaFactory=com.ibm.mq.jms.MQQueueFactory
javaClassName=com.ibm.mq.jms.MQQueue
javaReferenceAddress=#9#QU#PATH_MFP.Case.Request
javaReferenceAddress=#10#QMGR#QM_Test
EJB configuration
=================
ejb-jar.xml
<message-driven>
<display-name>ServerMessageDrivenBean</display-name>
<ejb-name>ServerMessageDrivenBean</ejb-name>
<ejb-class>nz.co.acc.emi.server.connector.mdb.ServerMessageDrivenBean</ejb-class>
<transaction-type>Container</transaction-type>
<message-driven-destination>
<destination-type>javax.jms.Queue</destination-type>
</message-driven-destination>
</message-driven>
sun-ejb-jar.xml
<ejb>
<ejb-name>ServerMessageDrivenBean</ejb-name>
<jndi-name>MFP_LOCAL_Case_Request_Queue</jndi-name>
<mdb-connection-factory>
<jndi-name>MFP_LOCAL_Factory</jndi-name>
</mdb-connection-factory>
</ejb>
Sun One configuration
=====================
MFPProcessing: JNDI: External Resources
MFP_LOCAL_Factory Enabled javax.jms.QueueConnectionFactory
JNDI Name: MFP_LOCAL_Factory
Resource Type: javax.jms.QueueConnectionFactory
JNDI Lookup: cn=MFP_LOCAL_Factory
Factoryclass: com.sun.jndi.ldap.LdapCtxFactory
Properties:
java.naming.provider.url ldap://localhost:389/o=mqtest
java.naming.security.authentication none
MFP_LOCAL_Case_Request_Queue Enabled javax.jms.Queue
JNDI Name: MFP_LOCAL_Case_Request_Queue
Resource Type: javax.jms.Queue
JNDI Lookup: cn=MFP_LOCAL_Case_Request_Queue
Factoryclass: com.sun.jndi.ldap.LdapCtxFactory
Properties:
java.naming.provider.url ldap://localhost:389/o=mqtest
server.xml
<mdb-container steady-pool-size="10" pool-resize-quantity="2" max-pool-size="60" idle-timeout-in-seconds="600" monitoring-enabled="true" log-level="FINEST" />
<jms-service port="1240" admin-user-name="admin" admin-password="admin" init-timeout-in-seconds="30" enabled="true" log-level="FINE" />
Sun One log file
================
server.log
[01/Mar/2004:10:06:48] INFO ( 657): CORE1116: Sun ONE Application Server 7.0.0_01
[01/Mar/2004:10:06:51] INFO ( 657): CORE5076: Using [Java HotSpot(TM) Server VM, Version 1.4.2_01] from [Sun Microsystems Inc.]
[01/Mar/2004:10:07:09] INFO ( 657): JMS5023: JMS service successfully started. Instance Name = domain1_MFPProcessing, Home = [C:/Sun/AppServer7/imq/bin].
[01/Mar/2004:10:07:13] INFO ( 657): JTS5014: Recoverable JTS instance, serverId = [100]
[01/Mar/2004:10:07:14] INFO ( 657): RAR5060: Install JDBC Datasources ...
[01/Mar/2004:10:07:14] INFO ( 657): RAR5059: Binding [JDBC DataSource Name: jdbc/MfsDataSourceJConn, Pool Name: MFSConnectionPool]
[01/Mar/2004:10:07:15] INFO ( 657): JMS5015: Install JMS resources ...
[01/Mar/2004:10:07:47] WARNING ( 657): [EntityContainer] Created EntityContainer....
[01/Mar/2004:10:07:49] INFO ( 657): LDR5010: All ejb(s) of [mfs] loaded successfully!
[01/Mar/2004:10:07:52] INFO ( 657): MDB00044: Deploying message-driven bean [emi:ServerMessageDrivenBean], consuming from [MFP_LOCAL_Case_Request_Queue]
[01/Mar/2004:10:07:52] FINE ( 657): Messages delivery is part of a container-managed tx
[01/Mar/2004:10:07:52] FINE ( 657): emi:ServerMessageDrivenBean:reconnect-delay-in-seconds=60, reconnect-max-retries=60, reconnect-enabled=true
[01/Mar/2004:10:07:53] INFO ( 657): MDB00028: [emi:ServerMessageDrivenBean]: Message-driven bean container using external connection factory object: [com.ibm.mq.jms.MQQueueConnectionFactory]
[01/Mar/2004:10:07:55] FINE ( 657): emi:ServerMessageDrivenBean: Setting message-driven bean pool max-pool-size=60, steady-pool-size=10, pool-resize-quantity=2, idle-timeout-in-seconds=600
[01/Mar/2004:10:07:55] FINE ( 657): Initializing server session factory
[01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@11576d7
[01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@2d5534
[01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@34d75f
[01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@127d15e
[01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@12297d7
[01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@1ecfeb
[01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@11576d7
[01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@2d5534
[01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@34d75f
[01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@127d15e
[01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@12297d7
[01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@1ecfeb
[01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@e4776b
[01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@15c458c
[01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@da1515
[01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@19e3e24
[01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@e4776b
[01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@15c458c
[01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@da1515
[01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@19e3e24
[01/Mar/2004:10:07:55] INFO ( 657): MDB0001: Create message-driven bean pool with maximum pool size [60], bean idle timeout [600] seconds
[01/Mar/2004:10:07:55] SEVERE ( 657): MDB00030: [emi:ServerMessageDrivenBean]: Exception in setting up message-driven bean container: [MQJMS1010: not implemented]
[01/Mar/2004:10:07:55] FINE ( 657): MDB00018: [emi:ServerMessageDrivenBean]: Closing message-driven bean container connection
[01/Mar/2004:10:07:55] WARNING ( 657): [AbstractPool]: Cancelled pool timer task at: Mon Mar 01 10:07:55 NZDT 2004
[01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@11576d7
[01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@11576d7
[01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@2d5534
[01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@2d5534
[01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@2d5534
[01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@34d75f
[01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@34d75f
[01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@127d15e
[01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@127d15e
[01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@127d15e
[01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@11576d7
[01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@34d75f
[01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@12297d7
[01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@12297d7
[01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@1ecfeb
[01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@1ecfeb
[01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@e4776b
[01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@e4776b
[01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@12297d7
[01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@e4776b
[01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@15c458c
[01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@15c458c
[01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@da1515
[01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@da1515
[01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@1ecfeb
[01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@15c458c
[01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@da1515
[01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@19e3e24
[01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@19e3e24
[01/Mar/2004:10:07:55] SEVERE ( 657): MDB00017: [ServerMessageDrivenBean]: Exception in creating message-driven bean container: [javax.jms.JMSException: MQJMS1010: not implemented]
[01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@19e3e24
[01/Mar/2004:10:07:55] SEVERE ( 657): javax.jms.JMSException
javax.jms.JMSException: MQJMS1010: not implemented
at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:418)
at com.ibm.mq.jms.MQQueueConnection.createConnectionConsumer(MQQueueConnection.java:602)
at com.sun.enterprise.jms.ConnectionWrapperBase.createConnectionConsumer(ConnectionWrapperBase.java:151)
at com.sun.ejb.containers.MessageBeanHelperQueueImpl.doSetup(MessageBeanHelperQueueImpl.java:67)
at com.sun.ejb.containers.MessageBeanHelperBase.setup(MessageBeanHelperBase.java:419)
at com.sun.ejb.containers.MessageBeanContainer.<init>(MessageBeanContainer.java:206)
at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:173)
at com.iplanet.ias.server.AbstractLoader.loadEjbs(AbstractLoader.java:345)
at com.iplanet.ias.server.ApplicationLoader.load(ApplicationLoader.java:81)
at com.iplanet.ias.server.AbstractManager.load(AbstractManager.java:134)
at com.iplanet.ias.server.ApplicationLifecycle.onStartup(ApplicationLifecycle.java:168)
at com.iplanet.ias.server.ApplicationServer.onStartup(ApplicationServer.java:269)
at com.iplanet.ias.server.J2EERunner.confPostInit(J2EERunner.java:162)
[01/Mar/2004:10:07:55] SEVERE ( 657): EJB5090: Exception in creating EJB container [javax.jms.JMSException: MQJMS1010: not implemented]
[01/Mar/2004:10:07:55] SEVERE ( 657): appId=emi moduleName=emiEjb_jar ejbName=ServerMessageDrivenBean
[01/Mar/2004:10:07:55] SEVERE ( 657): LDR5004: UnExpected error occured while creating ejb container
javax.jms.JMSException: MQJMS1010: not implemented
at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:418)
at com.ibm.mq.jms.MQQueueConnection.createConnectionConsumer(MQQueueConnection.java:602)
at com.sun.enterprise.jms.ConnectionWrapperBase.createConnectionConsumer(ConnectionWrapperBase.java:151)
at com.sun.ejb.containers.MessageBeanHelperQueueImpl.doSetup(MessageBeanHelperQueueImpl.java:67)
at com.sun.ejb.containers.MessageBeanHelperBase.setup(MessageBeanHelperBase.java:419)
at com.sun.ejb.containers.MessageBeanContainer.<init>(MessageBeanContainer.java:206)
at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:173)
at com.iplanet.ias.server.AbstractLoader.loadEjbs(AbstractLoader.java:345)
at com.iplanet.ias.server.ApplicationLoader.load(ApplicationLoader.java:81)
at com.iplanet.ias.server.AbstractManager.load(AbstractManager.java:134)
at com.iplanet.ias.server.ApplicationLifecycle.onStartup(ApplicationLifecycle.java:168)
at com.iplanet.ias.server.ApplicationServer.onStartup(ApplicationServer.java:269)
at com.iplanet.ias.server.J2EERunner.confPostInit(J2EERunner.java:162)
[01/Mar/2004:10:07:55] WARNING ( 657): CORE5021: Application NOT loaded: [emi]
[01/Mar/2004:10:07:55] INFO ( 657): WEB0100: Loading web module [mfs:mfs.war] in virtual server [MFPProcessing] at [mfs]
[01/Mar/2004:10:08:31] INFO ( 657): HTTP3072: HTTP listener http-listener-1 [http://ch042dysz0405:1080] ready to accept requests
[01/Mar/2004:10:08:31] INFO ( 657): CORE3274: successful server startup
[01/Mar/2004:10:08:33] INFO ( 657): CORE5053: Application onReady complete.Hi,
You have not created the jms destination queue object
jms/Warehouse
Your server logs says it cannot find the destination queue object.It has got nothing to do with jndi name of your bean
Create jms destination queue object using
asadmin>create-jms-resource instance <instance_name> resourcetype javax.jms.Queue --property imqDestinationName=<NAme> jms/Warehouse
Then use list-jms-resources <instance_name> to
find if jms/Warehouse destionation queue object has been created.
Get back in case of any issues -
Message driven bean: resource not created
Hi,
I'm having trouble deploying a simple test app that I've created (in App Server Platform Edition 8.0). It contains a servlet, that posts messages to a queue, and which appears to work fine. There is also a message-driven bean that receives these messages, but it will not deploy as is. I would be grateful for any assistance in working out why. Apologies if I'm missing something obvious, but the technology is quite new to me.
I get the following error in the server log -
[#|2004-07-14T14:03:49.640+0100|SEVERE|sun-appserver-pe8.0|javax.enterprise.system.container.ejb|_ThreadID=12;|EJB5090: Exception in creating EJB container [com.sun.enterprise.connectors.ConnectorRuntimeException: JMS resource not created : joeMDB]|#]
[#|2004-07-14T14:03:49.656+0100|SEVERE|sun-appserver-pe8.0|javax.enterprise.system.container.ejb|_ThreadID=12;|appId=mdbtest moduleName=ejb-jar-ic_jar ejbName=joeMDB|#]
[#|2004-07-14T14:03:49.656+0100|SEVERE|sun-appserver-pe8.0|javax.enterprise.system.core.classloading|_ThreadID=12;|LDR5004: UnExpected error occured while creating ejb container
com.sun.enterprise.connectors.ConnectorRuntimeException: JMS resource not created : joeMDB
at com.sun.enterprise.connectors.system.ActiveJmsResourceAdapter.getPhysicalDestinationFromConfiguration(ActiveJmsResourceAdapter.java:296)
at com.sun.enterprise.connectors.system.ActiveJmsResourceAdapter.updateMDBRuntimeInfo(ActiveJmsResourceAdapter.java:232)
at com.sun.enterprise.connectors.inflow.ConnectorMessageBeanClient.setup(ConnectorMessageBeanClient.java:139)
at com.sun.ejb.containers.MessageBeanContainer.<init>(MessageBeanContainer.java:189)
- which I can't find referenced in any other forum post. The relevant deployment descriptors are as follows -
ejb-jar.xml -
<?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>mdbJar</display-name>
<enterprise-beans>
<message-driven>
<ejb-name>joeMDB</ejb-name>
<ejb-class>joeMDB</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>jms/JoeDestQueue</message-destination-link>
<message-destination-ref>
<message-destination-ref-name>jmsJoeDestQueue</message-destination-ref-name>
<message-destination-type>javax.jms.Queue</message-destination-type>
<message-destination-usage>Consumes</message-destination-usage>
<message-destination-link>jms/JoeDestQueue</message-destination-link>
</message-destination-ref>
</message-driven>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>joeMDB</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>
<message-destination>
<message-destination-name>jms/JoeDestQueue</message-destination-name>
</message-destination>
</assembly-descriptor>
</ejb-jar>
sun-ejb-jar.xml -
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sun-ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 8.0 EJB 2.1//EN" "http://www.sun.com/software/appserver/dtds/sun-ejb-jar_2_1-0.dtd">
<sun-ejb-jar xmlns="http://java.sun.com/xml/ns/j2ee">
<enterprise-beans>
<unique-id>0</unique-id>
<ejb>
<ejb-name>joeMDB</ejb-name>
<jndi-name>joeMDB</jndi-name>
<pass-by-reference>false</pass-by-reference>
<mdb-connection-factory>
<jndi-name>jms/joeFactory</jndi-name>
</mdb-connection-factory>
<jms-max-messages-load>1</jms-max-messages-load>
<is-read-only-bean>false</is-read-only-bean>
<refresh-period-in-seconds>-1</refresh-period-in-seconds>
<cmt-timeout-in-seconds>0</cmt-timeout-in-seconds>
<gen-classes/>
<bean-pool>
<steady-pool-size>-1</steady-pool-size>
<resize-quantity>-1</resize-quantity>
<max-pool-size>-1</max-pool-size>
<pool-idle-timeout-in-seconds>-1</pool-idle-timeout-in-seconds>
<max-wait-time-in-millis>-1</max-wait-time-in-millis>
</bean-pool>
</ejb>
<message-destination>
<message-destination-name>jms/JoeDestQueue</message-destination-name>
<jndi-name>jms/JoeDestQueue</jndi-name>
</message-destination>
</enterprise-beans>
</sun-ejb-jar>
Thanks,
JoeHi, Joe,
The message says that
JMS resource not created : joeMDB
The command to add the missing Queue:
asadmin create-jms-resource user admin restype javax.jms.Queue JoeDestQueue
Please note:
in your sun-ejb-jar.xml, the real JNDI name for the Queue is JoeDestQueue.
Double check the namings for the Queue in both ejb-jar.xml and sun-ejb-jar.xml.
You only need two names for one Queue: one is for JNDI, one is for reference.
_Dianne -
Can you set isolation levels of message-driven bean transactions?
The problem: I have 3 different message-driven beans which each get a different type of message, except for a field that is common to all. That field is used as the primary key of an entity object. The message-driven beans configured to use a container managed transaction. Each message-driven bean, in processing the message, first does a lookup by primary key to see if the object associated with the key exists, and if it does not, it requests the entity's home object to create it. After that, they do further processing. The problem is that sometimes all the beans simultaneously get a message, resulting in each bean checking for the entity object at about the same time, and if they fail to find it (because none of them has created it yet), each creates an object, all with the same primary key. This is not caught until the beans start to complete their onMessage method, which I believe results in the container committing the transaction. One of the transactions will be committed successfully, while the other two will fail, get rolled back, and then be retried with the same message. The second time through, the other beans will find the entity object (since it has been created and committed) and they will complete correctly. In the end, they right thing occurs, except that there is a troubling exception or 2 in the log telling about the constraint violation (with the primary key) and the rollback. If it was just me, that would be fine, but our customer does not like to see exceptions in the log; that indicates to him that something is wrong.
So, I am looking for someway to make sure that the actions of the message-driven beans are serialized. One suggestion from a colleague was to set the isolation level of the transactions being used by the container in processing the message-driven beans' onMessage method. However, the documentation does not mention any way to do this for a message-driven bean. Suggestions?
Is the use of a UserTransaction a better way to do this? If I acquire a UserTransaction within the onMessage method of a message-driven bean, can I set its isolation level? How would this work? When I get a UserTransaction, does each client get a different transaction, or do they all get the same one?(1) The WebLogic JMS "unit-of-order" feature is a heavily adopted feature that was specifically designed to handle similar use cases - see the JMS developer guide for extensive documentation. In your use case, if "key" is used to define UOO, then there's no limit on the number of keys that can be processed concurrently, but messages for any particular key will be processed single-threaded in the order in which they were first submitted.
Note that if you're using distributed destinations, the UOO feature is still fully supported - but the developer and/or administrator needs to decide whether to configure the destination to use "hash" or "path service" based routing (the JMS UOO edoc outlines the trade-offs).
(2) Another alternative is to use a single MDB with max-beans-free-pool that processes all three types (as the other poster suggested). I think this assumes all MDBs run on the same JVM.
(3) Another alternative is to use multiple queues, with a single MDB on each Q. Where some sort of hash algorithm is used to determine which Q is for the key. This approach is a "hand-coded" variant of the approach in (1) with "hash" based routing enabled...
(4) If all MDBs actually do run in the same JVM, a third alternative is to use code the application to use a common lock to protect each key, eg, something like:
// assume MyLock is simply a class with a "reference counter"
// assume some global "staticHM" hash map that is all MDBs can access
onMessage() {
MyLock lock = null;
key= msg.getKey();
synchronized(staticHM) {
lock = staticHM.get();
if (lock = null) {
lock = new lock();
staticHM.put(key, new lock());
lock.incRefCount();
try {
synchronized(lock) {
// only one onMessage will be able to lock a particular key at a time
do your work;
} finally {
synchronized(staticHT) {
if (lock.defRefCount() == 0) staticHM.remove(lock);
if (lock = null) staticHM.put(key);
If multiple threads get a message with the same key, then only one thread at a time will work on the key.
Hope this helps,
Tom -
Error during deployment of Message Driven Bean
Environment: WLS 6.1SP3 on Win2K SP2, non-clustered.
I am getting some error (or perhaps warning) during deployment of Message
Driven Bean. Any one seen this before?
This error only comes on a machine with Dual Network card.
Thanks.
####<Dec 11, 2002 1:23:04 AM GMT> <Info> <EJB> <QAAPP01> <Makalu> <main>
<system> <> <010008> <EJB Deploying file: AppRuntime.jar>
####<Dec 11, 2002 1:23:04 AM GMT> <Warning> <J2EE> <QAAPP01> <Makalu> <main>
<system> <> <160007> <You are running WebLogic Server with J2EE 1.3 features
enabled. The implementation of specific J2EE 1.3 features (EJB 2.0, JSP 1.2,
Servlet 2.3, and J2EE Connector Architecture 1.0) in BEA WebLogic Server 6.1
is of a non-final version of the appropriate specification. It is subject to
change in future releases once the specification becomes finalized. This may
cause application code developed for BEA WebLogic Server 6.1 that uses the
new features of J2EE 1.3 to be incompatible with the J2EE 1.3 platform
supported in future releases of BEA WebLogic Server.>
####<Dec 11, 2002 1:23:07 AM GMT> <Warning> <EJB> <QAAPP01> <Makalu> <main>
<system> <> <010061> <The Message-Driven EJB: ASYNCMessageDrivenBean is
unable to connect to the JMS destination: CQM_MessageQueue. The EJB
container will automatically attempt to re-establish the connection with the
JMS server. This warning may occur during WebLogic Cluster start-up if the
JMS destination is located on another server. When the JMS server connection
is re-established, the Message-Driven EJB will again receive JMS messages.
The Error was:
Unable to create a JNDI InitialContext to lookup the JMS destination. The
error was:
javax.naming.CommunicationException. Root exception is
java.net.ConnectException: t3://127.0.0.1:7001: Destination unreachable;
nested exception is:
java.net.ConnectException: Connection refused: connect; No available router
to destination
at weblogic.rjvm.RJVMFinder.findOrCreate(RJVMFinder.java:155)
at weblogic.rjvm.ServerURL.findOrCreateRJVM(ServerURL.java:207)
at
weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialCon
textFactoryDelegate.java:307)
at
weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialCon
textFactoryDelegate.java:211)
at
weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFact
ory.java:149)
at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:660)
at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:241)
at javax.naming.InitialContext.init(InitialContext.java:217)
at javax.naming.InitialContext.<init>(InitialContext.java:193)
at
weblogic.ejb20.deployer.MessageDrivenBeanInfoImpl.getInitialContext(MessageD
rivenBeanInfoImpl.java:641)
at
weblogic.ejb20.internal.JMSConnectionPoller.createJMSConnection(JMSConnectio
nPoller.java:474)
at
weblogic.ejb20.internal.JMSConnectionPoller.connectToJMS(JMSConnectionPoller
.java:418)
at
weblogic.ejb20.internal.JMSConnectionPoller.startJMSConnectionPolling(JMSCon
nectionPoller.java:286)
at
weblogic.ejb20.deployer.MessageDrivenBeanInfoImpl.deploy(MessageDrivenBeanIn
foImpl.java:511)
at weblogic.ejb20.deployer.Deployer.deployDescriptor(Deployer.java:1294)
at weblogic.ejb20.deployer.Deployer.deploy(Deployer.java:996)
at weblogic.j2ee.EJBComponent.deploy(EJBComponent.java:31)
at weblogic.j2ee.Application.addComponent(Application.java:170)
at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:117)
at
weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentT
arget.java:360)
at
weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(Deployment
Target.java:285)
at
weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeployments(D
eploymentTarget.java:239)
at
weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(Deploym
entTarget.java:199)
at java.lang.reflect.Method.invoke(Native Method)
at
weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl
.java:636)
at
weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:6
21)
at
weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBea
nImpl.java:360)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1557)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1525)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
at $Proxy34.updateDeployments(Unknown Source)
at
weblogic.management.configuration.ServerMBean_CachingStub.updateDeployments(
ServerMBean_CachingStub.java:2977)
at
weblogic.management.mbeans.custom.ApplicationManager.startConfigManager(Appl
icationManager.java:372)
at
weblogic.management.mbeans.custom.ApplicationManager.start(ApplicationManage
r.java:160)
at java.lang.reflect.Method.invoke(Native Method)
at
weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl
.java:636)
at
weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:6
21)
at
weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBea
nImpl.java:360)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1557)
at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1525)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
at $Proxy49.start(Unknown Source)
at
weblogic.management.configuration.ApplicationManagerMBean_CachingStub.start(
ApplicationManagerMBean_CachingStub.java:480)
at weblogic.management.Admin.startApplicationManager(Admin.java:1234)
at weblogic.management.Admin.finish(Admin.java:644)
at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:524)
at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:207)
at weblogic.Server.main(Server.java:35)
>
####<Dec 11, 2002 1:23:07 AM GMT> <Info> <EJB> <QAAPP01> <Makalu> <main>
<system> <> <010009> <EJB Deployed EJB with JNDI name
ASYNCMessageDrivenBean.>
Hi Tom
Yes we do have an URL provided in the descriptor. It's
t3://jms.server.net:7001.
and the jms.server.net is resolved via a hosts file in Win2K
eg,
192.168.100.200 jms.server.net
You are right in saying that the loopback in a dual-net card is a problem.
But our solution
above solves the issue as long as your host file does not use 127.0.0.1 as
the IP.
We need the URL b/c depending on our client's deployment , the JMS Server
may be remote or may be local.
"Tom Barnes" <[email protected]> wrote in message
news:[email protected]...
> Hi x,
>
> Something to do with the loopback and dual-network cards is
> messin' with WLS' mind. I do not know what the problem is,
> but I can guess:
>
> You have specified an URL in the MDB descriptor when there
> is no need for one. If t3://127.0.0.1:7001 is in the same
> cluster the MDB is running in (I suspect this URL is
> actually the same WL server), then don't specify the URL.
> This URL is only useful for connecting an MDB to a JMS
> server that is outside local server and outside the cluster.
> The URL may be working on single-network card systems
> as perhaps then WL has enough info to guess that you
> actually mean the local WL server, and simply converts
> the context to a local context.
>
> Note that the URL option in the MDB descriptor is actually
> a WebLogic extension of J2EE.
>
> Tom
>
>
>
> x wrote:
> > Environment: WLS 6.1SP3 on Win2K SP2, non-clustered.
> >
> > I am getting some error (or perhaps warning) during deployment of
Message
> > Driven Bean. Any one seen this before?
> > This error only comes on a machine with Dual Network card.
> >
> > Thanks.
> >
> >
> >
> > ####<Dec 11, 2002 1:23:04 AM GMT> <Info> <EJB> <QAAPP01> <Makalu> <main>
> > <system> <> <010008> <EJB Deploying file: AppRuntime.jar>
> > ####<Dec 11, 2002 1:23:04 AM GMT> <Warning> <J2EE> <QAAPP01> <Makalu>
<main>
> > <system> <> <160007> <You are running WebLogic Server with J2EE 1.3
features
> > enabled. The implementation of specific J2EE 1.3 features (EJB 2.0, JSP
1.2,
> > Servlet 2.3, and J2EE Connector Architecture 1.0) in BEA WebLogic Server
6.1
> > is of a non-final version of the appropriate specification. It is
subject to
> > change in future releases once the specification becomes finalized. This
may
> > cause application code developed for BEA WebLogic Server 6.1 that uses
the
> > new features of J2EE 1.3 to be incompatible with the J2EE 1.3 platform
> > supported in future releases of BEA WebLogic Server.>
> > ####<Dec 11, 2002 1:23:07 AM GMT> <Warning> <EJB> <QAAPP01> <Makalu>
<main>
> > <system> <> <010061> <The Message-Driven EJB: ASYNCMessageDrivenBean is
> > unable to connect to the JMS destination: CQM_MessageQueue. The EJB
> > container will automatically attempt to re-establish the connection with
the
> > JMS server. This warning may occur during WebLogic Cluster start-up if
the
> > JMS destination is located on another server. When the JMS server
connection
> > is re-established, the Message-Driven EJB will again receive JMS
messages.
> > The Error was:
> > Unable to create a JNDI InitialContext to lookup the JMS destination.
The
> > error was:
> > javax.naming.CommunicationException. Root exception is
> > java.net.ConnectException: t3://127.0.0.1:7001: Destination unreachable;
> > nested exception is:
> > java.net.ConnectException: Connection refused: connect; No available
router
> > to destination
> > at weblogic.rjvm.RJVMFinder.findOrCreate(RJVMFinder.java:155)
> > at weblogic.rjvm.ServerURL.findOrCreateRJVM(ServerURL.java:207)
> > at
> >
weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialCon
> > textFactoryDelegate.java:307)
> > at
> >
weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLInitialCon
> > textFactoryDelegate.java:211)
> > at
> >
weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFact
> > ory.java:149)
> > at
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:660)
> > at
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:241)
> > at javax.naming.InitialContext.init(InitialContext.java:217)
> > at javax.naming.InitialContext.<init>(InitialContext.java:193)
> > at
> >
weblogic.ejb20.deployer.MessageDrivenBeanInfoImpl.getInitialContext(MessageD
> > rivenBeanInfoImpl.java:641)
> > at
> >
weblogic.ejb20.internal.JMSConnectionPoller.createJMSConnection(JMSConnectio
> > nPoller.java:474)
> > at
> >
weblogic.ejb20.internal.JMSConnectionPoller.connectToJMS(JMSConnectionPoller
> > .java:418)
> > at
> >
weblogic.ejb20.internal.JMSConnectionPoller.startJMSConnectionPolling(JMSCon
> > nectionPoller.java:286)
> > at
> >
weblogic.ejb20.deployer.MessageDrivenBeanInfoImpl.deploy(MessageDrivenBeanIn
> > foImpl.java:511)
> > at
weblogic.ejb20.deployer.Deployer.deployDescriptor(Deployer.java:1294)
> > at weblogic.ejb20.deployer.Deployer.deploy(Deployer.java:996)
> > at weblogic.j2ee.EJBComponent.deploy(EJBComponent.java:31)
> > at weblogic.j2ee.Application.addComponent(Application.java:170)
> > at weblogic.j2ee.J2EEService.addDeployment(J2EEService.java:117)
> > at
> >
weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentT
> > arget.java:360)
> > at
> >
weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(Deployment
> > Target.java:285)
> > at
> >
weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeployments(D
> > eploymentTarget.java:239)
> > at
> >
weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(Deploym
> > entTarget.java:199)
> > at java.lang.reflect.Method.invoke(Native Method)
> > at
> >
weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl
> > .java:636)
> > at
> >
weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:6
> > 21)
> > at
> >
weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBea
> > nImpl.java:360)
> > at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1557)
> > at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1525)
> > at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
> > at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
> > at $Proxy34.updateDeployments(Unknown Source)
> > at
> >
weblogic.management.configuration.ServerMBean_CachingStub.updateDeployments(
> > ServerMBean_CachingStub.java:2977)
> > at
> >
weblogic.management.mbeans.custom.ApplicationManager.startConfigManager(Appl
> > icationManager.java:372)
> > at
> >
weblogic.management.mbeans.custom.ApplicationManager.start(ApplicationManage
> > r.java:160)
> > at java.lang.reflect.Method.invoke(Native Method)
> > at
> >
weblogic.management.internal.DynamicMBeanImpl.invokeLocally(DynamicMBeanImpl
> > .java:636)
> > at
> >
weblogic.management.internal.DynamicMBeanImpl.invoke(DynamicMBeanImpl.java:6
> > 21)
> > at
> >
weblogic.management.internal.ConfigurationMBeanImpl.invoke(ConfigurationMBea
> > nImpl.java:360)
> > at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1557)
> > at
com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1525)
> > at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:468)
> > at weblogic.management.internal.MBeanProxy.invoke(MBeanProxy.java:209)
> > at $Proxy49.start(Unknown Source)
> > at
> >
weblogic.management.configuration.ApplicationManagerMBean_CachingStub.start(
> > ApplicationManagerMBean_CachingStub.java:480)
> > at weblogic.management.Admin.startApplicationManager(Admin.java:1234)
> > at weblogic.management.Admin.finish(Admin.java:644)
> > at weblogic.t3.srvr.T3Srvr.start(T3Srvr.java:524)
> > at weblogic.t3.srvr.T3Srvr.run(T3Srvr.java:207)
> > at weblogic.Server.main(Server.java:35)
> >
> > ####<Dec 11, 2002 1:23:07 AM GMT> <Info> <EJB> <QAAPP01> <Makalu> <main>
> > <system> <> <010009> <EJB Deployed EJB with JNDI name
> > ASYNCMessageDrivenBean.>
> >
> >
>
-
Exception in setting up message-driven bean container
hello,
I'm trying to deploy a single mdb and I'm getting an exception. I've tried closely following the way things are done with the mdb example in the samples AppServer7 directory. Am I missing something in one of my deployment descriptior files?
Thanks,
Robert
[17/Apr/2003:12:18:24] SEVERE ( 1832): MDB00030: [mdb2-simpleEjb:MessageProcessorBean]: Exception in setting up message-driven bean container: [[C4060]: Login failed.]
[17/Apr/2003:12:18:24] FINE ( 1832): MDB00018: [mdb2-simpleEjb:MessageProcessorBean]: Closing message-driven bean container connection
[17/Apr/2003:12:18:24] SEVERE ( 1832): MDB00017: [MessageProcessorBean]: Exception in creating message-driven bean container: [javax.jms.JMSSecurityException: [C4060]: Login failed.]
[17/Apr/2003:12:18:24] SEVERE ( 1832): javax.jms.JMSSecurityException
javax.jms.JMSSecurityException: [C4060]: Login failed.
at com.sun.messaging.jmq.jmsclient.ProtocolHandler.authenticate(ProtocolHandler.java:682)
at com.sun.messaging.jmq.jmsclient.ProtocolHandler.hello(ProtocolHandler.java:615)
at com.sun.messaging.jmq.jmsclient.ConnectionImpl.hello(ConnectionImpl.java:238)
at com.sun.messaging.jmq.jmsclient.ConnectionImpl.openConnection(ConnectionImpl.java:1512)
at com.sun.messaging.jmq.jmsclient.ConnectionImpl.init(ConnectionImpl.java:403)
at com.sun.messaging.jmq.jmsclient.ConnectionImpl.<init>(ConnectionImpl.java:234)Hi,
You have not created the jms destination queue object
jms/Warehouse
Your server logs says it cannot find the destination queue object.It has got nothing to do with jndi name of your bean
Create jms destination queue object using
asadmin>create-jms-resource instance <instance_name> resourcetype javax.jms.Queue --property imqDestinationName=<NAme> jms/Warehouse
Then use list-jms-resources <instance_name> to
find if jms/Warehouse destionation queue object has been created.
Get back in case of any issues -
Deployment of Message Driven Bean fails
Hi guys,
i use MQSeries as JMS Provider.
The Application (ear) has the following structure :
MDBApp.ear
contains
mqseries1.jar ,mqseries2.jar, mqseries3.jar , .. ( In the previous Version of NetWeaver is used a deployable Server library and referenced it from the jms-factories.xml )
mdb.jar (contains the Message Driven Bean)
Note :
the jms-resources.xml has the following content :
<?xml version="1.0" encoding="UTF-8"?>
<jms-resources xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="jms-resources.xsd">
<connection-factory>
<name>TestFactory</name>
<object-factory-type>
<object-factory-name>com.ibm.mq.jms.MQXAQueueConnectionFactoryFactory</object-factory-name>
<class-name>com.ibm.mq.jms.MQXAQueueConnectionFactory</class-name>
<property>
<config-property-name>HOST</config-property-name>
<config-property-value>anIPAdress</config-property-value>
</property>
<property>
<config-property-name>QMGR</config-property-name>
<config-property-value>aQueueManagerID</config-property-value>
</property>
<property>
<config-property-name>PORT</config-property-name>
<config-property-value>aPort</config-property-value>
</property>
<property>
<config-property-name>TRAN</config-property-name>
<config-property-value>1</config-property-value>
</property>
</object-factory-type>
</connection-factory>
<destination>
<name>RA.IBMSOLLIST.ASSOLLIST.001</name>
<type>javax.jms.Queue</type>
<external-destination-type>
<link-connection-factory>TestFactory</link-connection-factory>
</external-destination-type>
</destination>
</jms-resources>
The Message Driven Bean code :
@MessageDriven(activationConfig = {
@ActivationConfigProperty(propertyName = "destinationType",
propertyValue = "javax.jms.Queue"),
@ActivationConfigProperty(propertyName = "destination",
propertyValue = "RA.IBMSOLLIST.ASSOLLIST.001"),
@ActivationConfigProperty(propertyName =
"connectionFactoryName", propertyValue = "TestFactory")
public class VMRaTestMessageDBean implements MessageListener {
/* (non-Javadoc)
@see javax.jms.MessageListener#onMessage(javax.jms.Message)
public void onMessage(Message arg0) {
// TODO Auto-generated method stub
The SDM gets following warning/error :
Description:
1. Exception has been returned while the 'vmtubes.de/ratestmdb~ear' was starting. Warning/Exception :
[ERROR CODE DPL.DS.6193] Error while ; nested exception is:
com.sap.engine.services.deploy.exceptions.ServerDeploymentException: [ERROR CODE DPL.DS.5030] Clusterwide exception: server ID 2198950:com.sap.engine.services.deploy.container.DeploymentException: Cannot activate endpoint for message-driven bean vmtubes.de/ratestmdbear*annotation|vmtubes.deratestmdb~ejb.jar*annotation|VMRaTestMessageDBean
at com.sap.engine.services.ejb3.container.ContainerInterfaceImpl$Actions.perform(ContainerInterfaceImpl.java:893)
at com.sap.engine.services.ejb3.container.ContainerInterfaceImpl.prepareStart(ContainerInterfaceImpl.java:425)
at com.sap.engine.services.deploy.server.application.StartTransaction.prepareCommon(StartTransaction.java:219)
at com.sap.engine.services.deploy.server.application.StartTransaction.prepare(StartTransaction.java:179)
at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesOnOneServer(ApplicationTransaction.java:420)
at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhases(ApplicationTransaction.java:445)
at com.sap.engine.services.deploy.server.application.ParallelAdapter.super_MakeAllPhases(ParallelAdapter.java:337)
at com.sap.engine.services.deploy.server.application.StartTransaction.makeAllPhasesImpl(StartTransaction.java:550)
at com.sap.engine.services.deploy.server.application.ParallelAdapter.runInTheSameThread(ParallelAdapter.java:251)
at com.sap.engine.services.deploy.server.application.ParallelAdapter.makeAllPhasesAndWait(ParallelAdapter.java:392)
at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:3389)
at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:3375)
at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:3278)
at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:3251)
at com.sap.engine.services.dc.lcm.impl.J2EELCMProcessor.doStart(J2EELCMProcessor.java:99)
at com.sap.engine.services.dc.lcm.impl.LifeCycleManagerImpl.start(LifeCycleManagerImpl.java:62)
at com.sap.engine.services.dc.cm.deploy.impl.LifeCycleManagerStartVisitor.visit(LifeCycleManagerStartVisitor.java:34)
at com.sap.engine.services.dc.cm.deploy.impl.DeploymentItemImpl.accept(DeploymentItemImpl.java:83)
at com.sap.engine.services.dc.cm.deploy.impl.DefaultDeployPostProcessor.postProcessLCMDeplItem(DefaultDeployPostProcessor.java:80)
at com.sap.engine.services.dc.cm.deploy.impl.DefaultDeployPostProcessor.postProcess(DefaultDeployPostProcessor.java:56)
at com.sap.engine.services.dc.cm.deploy.impl.DeployerImpl.doPostProcessing(DeployerImpl.java:741)
at com.sap.engine.services.dc.cm.deploy.impl.DeployerImpl.performDeploy(DeployerImpl.java:732)
at com.sap.engine.services.dc.cm.deploy.impl.DeployerImpl.doDeploy(DeployerImpl.java:576)
at com.sap.engine.services.dc.cm.deploy.impl.DeployerImpl.deploy(DeployerImpl.java:270)
at com.sap.engine.services.dc.cm.deploy.impl.DeployerImpl.deploy(DeployerImpl.java:192)
at com.sap.engine.services.dc.cm.deploy.impl.DeployerImplp4_Skel.dispatch(DeployerImplp4_Skel.java:875)
at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:351)
at com.sap.engine.services.rmi_p4.server.ServerDispatchImpl.run(ServerDispatchImpl.java:70)
at com.sap.engine.services.rmi_p4.P4Message.process(P4Message.java:62)
at com.sap.engine.services.rmi_p4.P4Message.execute(P4Message.java:37)
at com.sap.engine.services.cross.fca.FCAConnectorImpl.executeRequest(FCAConnectorImpl.java:872)
at com.sap.engine.services.rmi_p4.P4Message.process(P4Message.java:53)
at com.sap.engine.services.cross.fca.MessageReader.run(MessageReader.java:58)
at com.sap.engine.core.thread.execution.Executable.run(Executable.java:108)
at com.sap.engine.core.thread.execution.CentralExecutor$SingleThread.run(CentralExecutor.java:304)
Caused by: com.sap.engine.services.ejb3.container.ActionException: Cannot activate endpoint for message-driven bean vmtubes.de/ratestmdbear*annotation|vmtubes.deratestmdb~ejb.jar*annotation|VMRaTestMessageDBean
at com.sap.engine.services.ejb3.runtime.impl.Actions_MDBEndpointActivation.perform(Actions_MDBEndpointActivation.java:94)
at com.sap.engine.services.ejb3.container.CompositeAction.perform(CompositeAction.java:81)
at com.sap.engine.services.ejb3.container.ApplicationStarter.perform(ApplicationStarter.java:59)
at com.sap.engine.services.ejb3.container.ContainerInterfaceImpl$Actions.perform(ContainerInterfaceImpl.java:887)
... 34 more
Caused by: javax.resource.NotSupportedException: javax.resource.spi.UnavailableException: The destination RA.IBMSOLLIST.ASSOLLIST.001 cannot be looked up. Last attempt performed : jms_vendor_queues_global/RA.IBMSOLLIST.ASSOLLIST.001
at com.sap.jms.resourceadapter.ResourceAdapterImpl.endpointActivation(ResourceAdapterImpl.java:113)
at com.sap.engine.services.connector.jca15.EndpointActivationImpl.activateEndpoint(EndpointActivationImpl.java:451)
at com.sap.engine.services.connector.jca15.EndpointActivationImpl.findResourceAdapterByName(EndpointActivationImpl.java:154)
at com.sap.engine.services.connector.jca15.EndpointActivationImpl.findAdapter(EndpointActivationImpl.java:85)
at com.sap.engine.services.connector.jca15.EndpointActivationImpl.activateEndpoint(EndpointActivationImpl.java:58)
at com.sap.engine.services.ejb3.runtime.impl.Actions_MDBEndpointActivation.perform(Actions_MDBEndpointActivation.java:84)
... 37 more
Caused by: javax.resource.spi.UnavailableException: The destination RA.IBMSOLLIST.ASSOLLIST.001 cannot be looked up. Last attempt performed : jms_vendor_queues_global/RA.IBMSOLLIST.ASSOLLIST.001
at com.sap.jms.resourceadapter.RaActivation.setupDestination(RaActivation.java:345)
at com.sap.jms.resourceadapter.RaActivation.activate(RaActivation.java:121)
at com.sap.jms.resourceadapter.ResourceAdapterImpl.endpointActivation(ResourceAdapterImpl.java:101)
... 42 more
Caused by: com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Object not found in lookup of RA.IBMSOLLIST.ASSOLLIST.001.
at com.sap.engine.services.jndi.implserver.ServerContextImpl.lookup(ServerContextImpl.java:584)
at com.sap.engine.services.jndi.implclient.ClientContext.lookup(ClientContext.java:343)
at com.sap.engine.services.jndi.implclient.ClientContext.lookup(ClientContext.java:637)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at com.sap.jms.resourceadapter.RaActivation.setupDestination(RaActivation.java:343)
... 44 more
I use NetWeaver CE 7.1 SP05 .
LockeHi Vladimir,
i can't find the string "JMS Connector Container Application: vmtubes.de/ratestmdb~ear destination name: RA.IBMSOLLIST.ASSOLLIST.001" in the traces.
These are all the logentries while the deployment (read the entries from top to buttom):
Starting activation of JMS resource adapter endpoint factory. ActivationSpec is : applicationName=vmtubes.de/ratestmdb~ear,connectionFactoryName : Testfactory,mAcknowledgeMode : null,maxPoolSize : 50,mClientId : null,mDestinationName : RA.IBMSOLLIST.ASSOLLIST.001,mDestinationType : javax.jms.Queue,minPoolSize : 0,mMessageSelector : null,mSubscriptionDurability : null,mSubscriptionName : null,mReconnectAttempts : 10,mSleepBetweenAttempts : 1000,mParallelConsumers : 1
Performing JNDI lookup for obtaining connectionFactory : jms_vendor_factory_local/vmtubes.de/ratestmdb~ear/Testfactory
First attempt for lookup failed. That could happen for 6.40 applpication without application name. We will continute with the fallback chain. The JNDI lookup is : jms_vendor_factory_local/vmtubes.de/ratestmdb~ear/Testfactory
Performing JNDI lookup for obtaining connectionFactory : jms_vendor_factory_global/Testfactory
Attempt for lookup without application name failed. An attempt will be performed to use the default connectionFactory instead of the one supplied during deployment. The JNDI name is : jms_vendor_factory_global/Testfactory
Performing JNDI lookup for obtaining connectionFactory : jmsfactory/default/XAQueueConnectionFactory
JMS connection created:
================================== Connection ==================================
ID 9444418335539219
Type (Generic)Connection
Mode STOPPED
isClosed NO
client = null
server = com.sap.jms.server.remote.JMSRemoteServerImpl5ec877
packetFactory = com.sap.jms.protocol.PacketFactoryImpl12e8d47
thread pool = null
isClosed = false
runFlag = true
isRunning = true
ConnectionMetaData -
JMSVersion 1.1
PorviderVersion Version 1.0
SupportedJMSXProperties JMSXGroupID, JMSXGroupSeq
================================================================================
com.sap.jms.client.connection.RemoteQueueConnection13d601c isUsed = false
Attempt for lookup without application name failed. An attempt will be performed to use the default connectionFactory instead of the one supplied during deployment. The JNDI name is : jms_vendor_factory_global/Testfactory
Attempt for lookup of destination failed. That could happen for 6.40 applications without application name.An attempt will be performed without the application name. The JNDI name is : jms_vendor_queues_local/vmtubes.de/ratestmdb~ear/RA.IBMSOLLIST.ASSOLLIST.001
java.lang.ClassCastException: class javax.naming.Reference:null incompatible with interface javax.jms.Destination:library:jmscom.sap.engine.boot.loader.ResourceMultiParentClassLoader389922alive
at com.sap.jms.resourceadapter.RaActivation.setupDestination(RaActivation.java:320)
at com.sap.jms.resourceadapter.RaActivation.activate(RaActivation.java:121)
at com.sap.jms.resourceadapter.ResourceAdapterImpl.endpointActivation(ResourceAdapterImpl.java:101)
at com.sap.engine.services.connector.jca15.EndpointActivationImpl.activateEndpoint(EndpointActivationImpl.java:451)
at com.sap.engine.services.connector.jca15.EndpointActivationImpl.findResourceAdapterByName(EndpointActivationImpl.java:154)
at com.sap.engine.services.connector.jca15.EndpointActivationImpl.findAdapter(EndpointActivationImpl.java:85)
at com.sap.engine.services.connector.jca15.EndpointActivationImpl.activateEndpoint(EndpointActivationImpl.java:58)
at com.sap.engine.services.ejb3.runtime.impl.Actions_MDBEndpointActivation.perform(Actions_MDBEndpointActivation.java:84)
at com.sap.engine.services.ejb3.container.CompositeAction.perform(CompositeAction.java:81)
at com.sap.engine.services.ejb3.container.ApplicationStarter.perform(ApplicationStarter.java:59)
at com.sap.engine.services.ejb3.container.ContainerInterfaceImpl$Actions.perform(ContainerInterfaceImpl.java:887)
at com.sap.engine.services.ejb3.container.ContainerInterfaceImpl.prepareStart(ContainerInterfaceImpl.java:425)
at com.sap.engine.services.deploy.server.application.StartTransaction.prepareCommon(StartTransaction.java:219)
at com.sap.engine.services.deploy.server.application.StartTransaction.prepare(StartTransaction.java:179)
at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesOnOneServer(ApplicationTransaction.java:420)
at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhases(ApplicationTransaction.java:445)
at com.sap.engine.services.deploy.server.application.ParallelAdapter.super_MakeAllPhases(ParallelAdapter.java:337)
at com.sap.engine.services.deploy.server.application.StartTransaction.makeAllPhasesImpl(StartTransaction.java:550)
at com.sap.engine.services.deploy.server.application.ParallelAdapter.runInTheSameThread(ParallelAdapter.java:251)
at com.sap.engine.services.deploy.server.application.ParallelAdapter.makeAllPhasesAndWait(ParallelAdapter.java:392)
at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:3389)
at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:3375)
at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:3278)
at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:3251)
at com.sap.engine.services.dc.lcm.impl.J2EELCMProcessor.doStart(J2EELCMProcessor.java:99)
at com.sap.engine.services.dc.lcm.impl.LifeCycleManagerImpl.start(LifeCycleManagerImpl.java:62)
at com.sap.engine.services.dc.cm.deploy.impl.LifeCycleManagerStartVisitor.visit(LifeCycleManagerStartVisitor.java:34)
at com.sap.engine.services.dc.cm.deploy.impl.DeploymentItemImpl.accept(DeploymentItemImpl.java:83)
at com.sap.engine.services.dc.cm.deploy.impl.DefaultDeployPostProcessor.postProcessLCMDeplItem(DefaultDeployPostProcessor.java:80)
at com.sap.engine.services.dc.cm.deploy.impl.DefaultDeployPostProcessor.postProcess(DefaultDeployPostProcessor.java:56)
at com.sap.engine.services.dc.cm.deploy.impl.DeployerImpl.doPostProcessing(DeployerImpl.java:741)
at com.sap.engine.services.dc.cm.deploy.impl.DeployerImpl.performDeploy(DeployerImpl.java:732)
at com.sap.engine.services.dc.cm.deploy.impl.DeployerImpl.doDeploy(DeployerImpl.java:576)
at com.sap.engine.services.dc.cm.deploy.impl.DeployerImpl.deploy(DeployerImpl.java:270)
at com.sap.engine.services.dc.cm.deploy.impl.DeployerImpl.deploy(DeployerImpl.java:192)
at com.sap.engine.services.dc.cm.deploy.impl.DeployerImplp4_Skel.dispatch(DeployerImplp4_Skel.java:875)
at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:351)
at com.sap.engine.services.rmi_p4.server.ServerDispatchImpl.run(ServerDispatchImpl.java:70)
at com.sap.engine.services.rmi_p4.P4Message.process(P4Message.java:62)
at com.sap.engine.services.rmi_p4.P4Message.execute(P4Message.java:37)
at com.sap.engine.services.cross.fca.FCAConnectorImpl.executeRequest(FCAConnectorImpl.java:872)
at com.sap.engine.services.rmi_p4.P4Message.process(P4Message.java:53)
at com.sap.engine.services.cross.fca.MessageReader.run(MessageReader.java:58)
at com.sap.engine.core.thread.execution.Executable.run(Executable.java:108)
at com.sap.engine.core.thread.execution.CentralExecutor$SingleThread.run(CentralExecutor.java:304)
Connection, destination and serverSession pool have been initialized correctly. Delivery of JMS messages will be started.Connection = ================================== Connection ==================================
ID 9444418335539219
Type (Generic)Connection
Mode STOPPED
isClosed NO
ExceptionListener com.sap.jms.resourceadapter.RaActivation1fe79
client = com.sap.jms.server.remote.JMSRemoteClientImpl857822
server = RMI_P4: Local Dynamic Stub for impl -> com.sap.jms.server.remote.JMSRemoteServerImpl18f254f
P4 Remote Object Info : com.sap.engine.services.rmi_p4.server.P4ServerObjectInfo100
|- broker id : -752547698
|- server id : 2198950
|- client Id : -1
|- local Id : 2198950
|- is redirectable : false
|- redir Ident :
|- factory Name : null
|- objId : null
|- server loader name : null
|- connected : false
|- supportOptimization : true
|- protocol : 76 31 v1
Remote Interfaces :
Interface : [0] = com.sap.jms.server.remote.JMSRemoteServer
Interface : [1] = com.sap.engine.services.rmi_p4.interfaces.P4Notification
=========================================
Connection profiles :
connection profile : [0] = None:195.233.66.25:50004
=========================================
packetFactory = com.sap.jms.protocol.PacketFactoryImple9cc66
thread pool = com.sap.engine.core.service630.context.core.thread.ThreadSystemImpl1b57cfa
isClosed = false
runFlag = true
isRunning = true
ConnectionMetaData -
JMSVersion 1.1
PorviderVersion Version 1.0
SupportedJMSXProperties JMSXGroupID, JMSXGroupSeq
================================================================================
com.sap.jms.client.connection.RemoteQueueConnection16a7da2 isUsed = true, destination = queue:///RA.IBMSOLLIST.ASSOLLIST.001, pool = com.sap.jms.resourceadapter.RaServerSessionPool5e2ae5, activation spec = applicationName=vmtubes.de/ratestmdb~ear,connectionFactoryName : Testfactory,mAcknowledgeMode : null,maxPoolSize : 50,mClientId : null,mDestinationName : RA.IBMSOLLIST.ASSOLLIST.001,mDestinationType : javax.jms.Queue,minPoolSize : 0,mMessageSelector : null,mSubscriptionDurability : null,mSubscriptionName : null,mReconnectAttempts : 10,mSleepBetweenAttempts : 1000,mParallelConsumers : 1
JMS session created:
=================================== Session ====================================
ID: 17
Type: (Generic)Session
ConnectionID: 9444418335539219
AcknowledgeMode: Transacted session!
================================================================================
ActivationSpec could not be deployed/started due to internal problem, clean up will be performed, the activation spec was applicationName=vmtubes.de/ratestmdb~ear,connectionFactoryName : Testfactory,mAcknowledgeMode : null,maxPoolSize : 50,mClientId : null,mDestinationName : RA.IBMSOLLIST.ASSOLLIST.001,mDestinationType : javax.jms.Queue,minPoolSize : 0,mMessageSelector : null,mSubscriptionDurability : null,mSubscriptionName : null,mReconnectAttempts : 10,mSleepBetweenAttempts : 1000,mParallelConsumers : 1
javax.resource.spi.UnavailableException: javax.jms.InvalidDestinationException: Illegal destination!
at com.sap.jms.resourceadapter.RaActivation.activate(RaActivation.java:136)
at com.sap.jms.resourceadapter.ResourceAdapterImpl.endpointActivation(ResourceAdapterImpl.java:101)
at com.sap.engine.services.connector.jca15.EndpointActivationImpl.activateEndpoint(EndpointActivationImpl.java:451)
at com.sap.engine.services.connector.jca15.EndpointActivationImpl.findResourceAdapterByName(EndpointActivationImpl.java:154)
at com.sap.engine.services.connector.jca15.EndpointActivationImpl.findAdapter(EndpointActivationImpl.java:85)
at com.sap.engine.services.connector.jca15.EndpointActivationImpl.activateEndpoint(EndpointActivationImpl.java:58)
at com.sap.engine.services.ejb3.runtime.impl.Actions_MDBEndpointActivation.perform(Actions_MDBEndpointActivation.java:84)
at com.sap.engine.services.ejb3.container.CompositeAction.perform(CompositeAction.java:81)
at com.sap.engine.services.ejb3.container.ApplicationStarter.perform(ApplicationStarter.java:59)
at com.sap.engine.services.ejb3.container.ContainerInterfaceImpl$Actions.perform(ContainerInterfaceImpl.java:887)
at com.sap.engine.services.ejb3.container.ContainerInterfaceImpl.prepareStart(ContainerInterfaceImpl.java:425)
at com.sap.engine.services.deploy.server.application.StartTransaction.prepareCommon(StartTransaction.java:219)
at com.sap.engine.services.deploy.server.application.StartTransaction.prepare(StartTransaction.java:179)
at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesOnOneServer(ApplicationTransaction.java:420)
at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhases(ApplicationTransaction.java:445)
at com.sap.engine.services.deploy.server.application.ParallelAdapter.super_MakeAllPhases(ParallelAdapter.java:337)
at com.sap.engine.services.deploy.server.application.StartTransaction.makeAllPhasesImpl(StartTransaction.java:550)
at com.sap.engine.services.deploy.server.application.ParallelAdapter.runInTheSameThread(ParallelAdapter.java:251)
at com.sap.engine.services.deploy.server.application.ParallelAdapter.makeAllPhasesAndWait(ParallelAdapter.java:392)
at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:3389)
at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:3375)
at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:3278)
at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:3251)
at com.sap.engine.services.dc.lcm.impl.J2EELCMProcessor.doStart(J2EELCMProcessor.java:99)
at com.sap.engine.services.dc.lcm.impl.LifeCycleManagerImpl.start(LifeCycleManagerImpl.java:62)
at com.sap.engine.services.dc.cm.deploy.impl.LifeCycleManagerStartVisitor.visit(LifeCycleManagerStartVisitor.java:34)
at com.sap.engine.services.dc.cm.deploy.impl.DeploymentItemImpl.accept(DeploymentItemImpl.java:83)
at com.sap.engine.services.dc.cm.deploy.impl.DefaultDeployPostProcessor.postProcessLCMDeplItem(DefaultDeployPostProcessor.java:80)
at com.sap.engine.services.dc.cm.deploy.impl.DefaultDeployPostProcessor.postProcess(DefaultDeployPostProcessor.java:56)
at com.sap.engine.services.dc.cm.deploy.impl.DeployerImpl.doPostProcessing(DeployerImpl.java:741)
at com.sap.engine.services.dc.cm.deploy.impl.DeployerImpl.performDeploy(DeployerImpl.java:732)
at com.sap.engine.services.dc.cm.deploy.impl.DeployerImpl.doDeploy(DeployerImpl.java:576)
at com.sap.engine.services.dc.cm.deploy.impl.DeployerImpl.deploy(DeployerImpl.java:270)
at com.sap.engine.services.dc.cm.deploy.impl.DeployerImpl.deploy(DeployerImpl.java:192)
at com.sap.engine.services.dc.cm.deploy.impl.DeployerImplp4_Skel.dispatch(DeployerImplp4_Skel.java:875)
at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:351)
at com.sap.engine.services.rmi_p4.server.ServerDispatchImpl.run(ServerDispatchImpl.java:70)
at com.sap.engine.services.rmi_p4.P4Message.process(P4Message.java:62)
at com.sap.engine.services.rmi_p4.P4Message.execute(P4Message.java:37)
at com.sap.engine.services.cross.fca.FCAConnectorImpl.executeRequest(FCAConnectorImpl.java:872)
at com.sap.engine.services.rmi_p4.P4Message.process(P4Message.java:53)
at com.sap.engine.services.cross.fca.MessageReader.run(MessageReader.java:58)
at com.sap.engine.core.thread.execution.Executable.run(Executable.java:108)
at com.sap.engine.core.thread.execution.CentralExecutor$SingleThread.run(CentralExecutor.java:304)
Caused by: javax.jms.InvalidDestinationException: Illegal destination!
at com.sap.jms.client.session.Session.createConsumer(Session.java:1807)
at com.sap.jms.client.session.Session.createConsumer(Session.java:1795)
at com.sap.jms.client.connection.ConnectionConsumer.<init>(ConnectionConsumer.java:124)
at com.sap.jms.client.connection.Connection.createConnectionConsumer(Connection.java:167)
at com.sap.jms.resourceadapter.RaActivation.setUpConnectionConsumer(RaActivation.java:165)
at com.sap.jms.resourceadapter.RaActivation.activate(RaActivation.java:128)
... 43 more
An attempt to stop message delivery will be performed. Activation request was applicationName=vmtubes.de/ratestmdb~ear,connectionFactoryName : Testfactory,mAcknowledgeMode : null,maxPoolSize : 50,mClientId : null,mDestinationName : RA.IBMSOLLIST.ASSOLLIST.001,mDestinationType : javax.jms.Queue,minPoolSize : 0,mMessageSelector : null,mSubscriptionDurability : null,mSubscriptionName : null,mReconnectAttempts : 10,mSleepBetweenAttempts : 1000,mParallelConsumers : 1
JMS session closed:
=================================== Session ====================================
ID: 17
Type: (Generic)Session
ConnectionID: 9444418335539219
AcknowledgeMode: Transacted session!
================================================================================
Connection context doesn't exists ! id =
Removing unreferenced connection ID =
Connection context doesn't exists ! id =
Connection closed:
================================== Connection ==================================
ID 9444418335539219
Type (Generic)Connection
Mode STOPPED
isClosed YES
client = com.sap.jms.server.remote.JMSRemoteClientImpl857822
server = RMI_P4: Local Dynamic Stub for impl -> com.sap.jms.server.remote.JMSRemoteServerImpl18f254f
P4 Remote Object Info : com.sap.engine.services.rmi_p4.server.P4ServerObjectInfo100
|- broker id : -752547698
|- server id : 2198950
|- client Id : -1
|- local Id : 2198950
|- is redirectable : false
|- redir Ident :
|- factory Name : null
|- objId : null
|- server loader name : null
|- connected : false
|- supportOptimization : true
|- protocol : 76 31 v1
Remote Interfaces :
Interface : [0] = com.sap.jms.server.remote.JMSRemoteServer
Interface : [1] = com.sap.engine.services.rmi_p4.interfaces.P4Notification
=========================================
Connection profiles :
connection profile : [0] = None:195.233.66.25:50004
=========================================
packetFactory = com.sap.jms.protocol.PacketFactoryImple9cc66
thread pool = com.sap.engine.core.service630.context.core.thread.ThreadSystemImpl1b57cfa
isClosed = true
runFlag = false
isRunning = true
ConnectionMetaData -
JMSVersion 1.1
PorviderVersion Version 1.0
SupportedJMSXProperties JMSXGroupID, JMSXGroupSeq
================================================================================
com.sap.jms.client.connection.RemoteQueueConnection16a7da2 isUsed = true
Here the Telnet output :
>lookup jms_vendor_queues_local/vmtubes.de/ratestmdb~ear/RA.IBMSOLLIST.ASSOLLIST.001
Trying to connect...
Connected.
[Shell -> LOOKUP] Location : /jms_vendor_queues_local/vmtubes.de/ratestmdb~ear
/RA.IBMSOLLIST.ASSOLLIST.001
[Shell -> LOOKUP] Contains : Reference Class Name: com.ibm.mq.jms.MQQueue
Type: VER
Content: 1
Type: EXP
Content: -2
Type: PRI
Content: -2
Type: PER
Content: -2
Type: CCS
Content: 1208
Type: TC
Content: 0
Type: ENC
Content: 273
Type: FIQ
Content: 1
Type: QU
Content: RA.IBMSOLLIST.ASSOLLIST.001
Type: QMGR
Content:
[Shell -> LOOKUP] Class name : javax.naming.Reference
>llr -all -f com/ibm/mq/jms/MQQueue.class
jar:file:/C:/usr/sap/J2E/J00/j2ee/cluster/bin/ext/MQSLibrary/com.ibm.mq.jms.jar!
/com/ibm/mq/jms/MQQueue.class
jar:file:/C:/usr/sap/J2E/J00/j2ee/cluster/apps/vmtubes.de/mq%7Ebase%7Eserver%7El
ib/app_libraries_container/com.ibm.mq.jms.jar!/com/ibm/mq/jms/MQQueue.class
Locke -
Help : Message Driven bean seeing the same message multiple times.
( We are using weblogic 8.1 on Solaris )
We have a bunch of message driven beans with the transaction type as 'Container' and the acknowledge-mode mode as auto-acknowledge. They are consuming messages from a weblogic Queue ( javax.jms.Queue ). The MBD container is also weblogic 8.1.
We have 7 instances of the bean consuming messages.
Most of the messages are picked up and processed only once as expected.
But randomly we are seeing that sometimes the same message is delivered again ( Message.getJmsRedelivered = true ) eventhough it was once picked up and processed successfully once.
We are completely lost and our production machine is in big trouble as a result of this.
( Is it possible that weblogic uses unreliable UDP for acknowledging messages. If yes where do we change this setting )
Any help will be greatly appreciated
Thanks
--sony
================ejb-jar.xml BEGIN
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
<ejb-jar>
<enterprise-beans>
<message-driven>
<description>DslUpdtDdpostPrcsrMDB</description>
<ejb-name>DslUpdtDdpostPrcsrMDB</ejb-name>
<ejb-class>
com.bellsouth.snt.idm.ejb.wfac.DslUpdtDdpostPrcsrMDB
</ejb-class>
<transaction-type>Container</transaction-type>
<message-selector>
<![CDATA[ idm_state = 'dsl_updt_dd_post' ]]>
</message-selector>
<acknowledge-mode>auto-acknowledge</acknowledge-mode>
<message-driven-destination>
<destination-type>javax.jms.Queue</destination-type>
</message-driven-destination>
<env-entry>
<env-entry-name>MDB_NAME</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>dsl_updt_dd_post</env-entry-value>
</env-entry>
<!--security-identity><use-caller-identity/></security-identity-->
<resource-ref>
<res-ref-name>jms/QueueConnectionFactory</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>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>DslUpdtDdpostPrcsrMDB</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
================ejb-jar.xml END
================weblogic-ejb-jar.xml BEGIN
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 8.1.0 EJB//EN' 'http://www.bea.com/servers/wls810/dtd/weblogic-ejb-jar.dtd'>
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>DslUpdtDdpostPrcsrMDB</ejb-name>
<message-driven-descriptor>
<pool>
<max-beans-in-free-pool>10</max-beans-in-free-pool>
<initial-beans-in-free-pool>0</initial-beans-in-free-pool>
</pool>
<destination-jndi-name>
idm.jms.clip.WfacClipResponseQueue
</destination-jndi-name>
<connection-factory-jndi-name>
idm.jms.IdmXaJmsQueueConnectionFactory
</connection-factory-jndi-name>
</message-driven-descriptor>
<transaction-descriptor>
<trans-timeout-seconds>
300
</trans-timeout-seconds>
</transaction-descriptor>
<reference-descriptor>
<resource-description>
<res-ref-name>jms/QueueConnectionFactory</res-ref-name>
<jndi-name>idm.jms.IdmXaJmsQueueConnectionFactory</jndi-name>
</resource-description>
</reference-descriptor>
<jndi-name>jms.DslUpdtDdpostPrcsrMDB</jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
================weblogic-ejb-jar.xml ENDThe transaction attribute for the MDB is set to 'Required'. Is it possible
that your application logic may process the message successfully even in
case of a transaction roll back? If the transaction rolls back, the message
will be re-delivered.
There is some docs on exactly-once processing which may help
http://e-docs.bea.com/wls/docs81/ejb/message_beans.html#1147208
--Sathish
<Sony Antony> wrote in message news:[email protected]...
( We are using weblogic 8.1 on Solaris )
We have a bunch of message driven beans with the transaction type as
'Container' and the acknowledge-mode mode as auto-acknowledge. They are
consuming messages from a weblogic Queue ( javax.jms.Queue ). The MBD
container is also weblogic 8.1.
We have 7 instances of the bean consuming messages.
Most of the messages are picked up and processed only once as expected.
But randomly we are seeing that sometimes the same message is delivered
again ( Message.getJmsRedelivered = true ) eventhough it was once picked
up and processed successfully once.
We are completely lost and our production machine is in big trouble as a
result of this.
( Is it possible that weblogic uses unreliable UDP for acknowledging
messages. If yes where do we change this setting )
Any help will be greatly appreciated
Thanks
--sony
================ejb-jar.xml BEGIN
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ejb-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise
JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>
<ejb-jar>
<enterprise-beans>
<message-driven>
<description>DslUpdtDdpostPrcsrMDB</description>
<ejb-name>DslUpdtDdpostPrcsrMDB</ejb-name>
<ejb-class>
com.bellsouth.snt.idm.ejb.wfac.DslUpdtDdpostPrcsrMDB
</ejb-class>
<transaction-type>Container</transaction-type>
<message-selector>
<![CDATA[ idm_state = 'dsl_updt_dd_post' ]]>
</message-selector>
<acknowledge-mode>auto-acknowledge</acknowledge-mode>
<message-driven-destination>
<destination-type>javax.jms.Queue</destination-type>
</message-driven-destination>
<env-entry>
<env-entry-name>MDB_NAME</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>dsl_updt_dd_post</env-entry-value>
</env-entry>
<!--security-identity><use-caller-identity/></security-identity-->
<resource-ref>
<res-ref-name>jms/QueueConnectionFactory</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>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>DslUpdtDdpostPrcsrMDB</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
================ejb-jar.xml END
================weblogic-ejb-jar.xml BEGIN
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic
8.1.0 EJB//EN'
'http://www.bea.com/servers/wls810/dtd/weblogic-ejb-jar.dtd'>
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>DslUpdtDdpostPrcsrMDB</ejb-name>
<message-driven-descriptor>
<pool>
<max-beans-in-free-pool>10</max-beans-in-free-pool>
<initial-beans-in-free-pool>0</initial-beans-in-free-pool>
</pool>
<destination-jndi-name>
idm.jms.clip.WfacClipResponseQueue
</destination-jndi-name>
<connection-factory-jndi-name>
idm.jms.IdmXaJmsQueueConnectionFactory
</connection-factory-jndi-name>
</message-driven-descriptor>
<transaction-descriptor>
<trans-timeout-seconds>
300
</trans-timeout-seconds>
</transaction-descriptor>
<reference-descriptor>
<resource-description>
<res-ref-name>jms/QueueConnectionFactory</res-ref-name>
<jndi-name>idm.jms.IdmXaJmsQueueConnectionFactory</jndi-name>
</resource-description>
</reference-descriptor>
<jndi-name>jms.DslUpdtDdpostPrcsrMDB</jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
================weblogic-ejb-jar.xml END -
SAP WAS SS13 Message driven bean start up problem
Hello,
After we have upgraded our environment from SS9 to SS13 our app doesn't start anymore with the following exception (worked fine before):
com.sap.engine.services.deploy.exceptions.ServerDeploymentException: Exception in operation startApp with application
<skipped>
Caused by: java.lang.NoSuchMethodException: com.sap.engine.services.ejb.message.SrvSessionPool.<init>(com.sap.engine.services.ejb.util.pool.PoolUser, com.sap.engine.services.ejb.Environment, java.util.Properties)
ejb-jar.xml contains the reference to the class which couldn't be loaded:
<property>
<property-name>PoolClass</property-name>
<property-value>
com.sap.engine.services.ejb.message.SrvSessionPool
</property-value>
</property>
Is there something we're missing? Please help! Thanks!
P.S. Full stack trace below:
Date : 09/06/2005
Time : 18:10:13:655
Category : /System/Audit
Message ID : 00C09F09C00700200000000300000B8000040021B1330F51
Severity : Error
Location : com.sap.engine.services.deploy
Source Name : com.sap.engine.services.deploy
Thread : SAPEngine_System_Thread[impl:5]_62
Message : Exception com.sap.engine.services.deploy.exceptions.ServerDeploymentException: Exception in operation startApp with application ourapp.com/App36.
at com.sap.engine.services.deploy.server.application.ApplicationTransaction.rollbackPart(ApplicationTransaction.java:387)
at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesOnOneServer(ApplicationTransaction.java:301)
at com.sap.engine.services.deploy.server.application.ParallelAdapter.makeAllPhasesImpl(ParallelAdapter.java:301)
at com.sap.engine.services.deploy.server.application.ParallelAdapter.run(ParallelAdapter.java:73)
at com.sap.engine.frame.core.thread.Task.run(Task.java:60)
at com.sap.engine.core.thread.impl5.SingleThread.execute(SingleThread.java:74)
at com.sap.engine.core.thread.impl5.SingleThread.run(SingleThread.java:140)
Caused by: com.sap.engine.services.ejb.exceptions.deployment.EJBDeploymentException: Exception during the initialization of container boot class com.nrx.beans.job_handler.JobHandlerBean10ContainerFP.
at com.sap.engine.services.ejb.EJBAdmin.prepareLoad(EJBAdmin.java:994)
at com.sap.engine.services.ejb.EJBAdmin.prepareStart(EJBAdmin.java:2402)
at com.sap.engine.services.deploy.server.application.StartTransaction.prepareCommon(StartTransaction.java:370)
at com.sap.engine.services.deploy.server.application.StartTransaction.prepare(StartTransaction.java:318)
at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesOnOneServer(ApplicationTransaction.java:299)
... 5 more
Caused by: com.sap.engine.services.ejb.ContainerInitializationException: Cannot initialize message system bridge com.sap.engine.services.ejb.message.JMSBridgeFP.
at com.sap.engine.services.ejb.message.MessageContainer.load(MessageContainer.java:457)
at com.sap.engine.services.ejb.message.MessageContainer.init(MessageContainer.java:146)
at com.sap.engine.services.ejb.message.MessageContainerFP.init(MessageContainerFP.java:53)
at com.sap.engine.services.ejb.EJBAdmin.prepareLoad(EJBAdmin.java:988)
... 9 more
Caused by: com.sap.engine.services.ejb.message.JMSBridgeException: Cannot initialize the message-driven bean container.
at com.sap.engine.services.ejb.message.JMSBridge.registerListener(JMSBridge.java:113)
at com.sap.engine.services.ejb.message.MessageContainer.load(MessageContainer.java:455)
... 12 more
Caused by: com.sap.engine.services.ejb.ContainerInitializationException: Cannot create a session pool for message-driven bean JobHandlerBean.
at com.sap.engine.services.ejb.message.JMSBridge.initPool(JMSBridge.java:219)
at com.sap.engine.services.ejb.message.JMSBridge.registerListener(JMSBridge.java:96)
... 13 more
Caused by: java.lang.NoSuchMethodException: com.sap.engine.services.ejb.message.SrvSessionPool.<init>(com.sap.engine.services.ejb.util.pool.PoolUser, com.sap.engine.services.ejb.Environment, java.util.Properties)
at java.lang.Class.getConstructor0(Class.java:1937)
at java.lang.Class.getConstructor(Class.java:1027)
at com.sap.engine.services.ejb.message.JMSBridge.initPool(JMSBridge.java:205)
... 14 moreHello,
After we have upgraded our environment from SS9 to SS13 our app doesn't start anymore with the following exception (worked fine before):
com.sap.engine.services.deploy.exceptions.ServerDeploymentException: Exception in operation startApp with application
<skipped>
Caused by: java.lang.NoSuchMethodException: com.sap.engine.services.ejb.message.SrvSessionPool.<init>(com.sap.engine.services.ejb.util.pool.PoolUser, com.sap.engine.services.ejb.Environment, java.util.Properties)
ejb-jar.xml contains the reference to the class which couldn't be loaded:
<property>
<property-name>PoolClass</property-name>
<property-value>
com.sap.engine.services.ejb.message.SrvSessionPool
</property-value>
</property>
Is there something we're missing? Please help! Thanks!
P.S. Full stack trace below:
Date : 09/06/2005
Time : 18:10:13:655
Category : /System/Audit
Message ID : 00C09F09C00700200000000300000B8000040021B1330F51
Severity : Error
Location : com.sap.engine.services.deploy
Source Name : com.sap.engine.services.deploy
Thread : SAPEngine_System_Thread[impl:5]_62
Message : Exception com.sap.engine.services.deploy.exceptions.ServerDeploymentException: Exception in operation startApp with application ourapp.com/App36.
at com.sap.engine.services.deploy.server.application.ApplicationTransaction.rollbackPart(ApplicationTransaction.java:387)
at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesOnOneServer(ApplicationTransaction.java:301)
at com.sap.engine.services.deploy.server.application.ParallelAdapter.makeAllPhasesImpl(ParallelAdapter.java:301)
at com.sap.engine.services.deploy.server.application.ParallelAdapter.run(ParallelAdapter.java:73)
at com.sap.engine.frame.core.thread.Task.run(Task.java:60)
at com.sap.engine.core.thread.impl5.SingleThread.execute(SingleThread.java:74)
at com.sap.engine.core.thread.impl5.SingleThread.run(SingleThread.java:140)
Caused by: com.sap.engine.services.ejb.exceptions.deployment.EJBDeploymentException: Exception during the initialization of container boot class com.nrx.beans.job_handler.JobHandlerBean10ContainerFP.
at com.sap.engine.services.ejb.EJBAdmin.prepareLoad(EJBAdmin.java:994)
at com.sap.engine.services.ejb.EJBAdmin.prepareStart(EJBAdmin.java:2402)
at com.sap.engine.services.deploy.server.application.StartTransaction.prepareCommon(StartTransaction.java:370)
at com.sap.engine.services.deploy.server.application.StartTransaction.prepare(StartTransaction.java:318)
at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesOnOneServer(ApplicationTransaction.java:299)
... 5 more
Caused by: com.sap.engine.services.ejb.ContainerInitializationException: Cannot initialize message system bridge com.sap.engine.services.ejb.message.JMSBridgeFP.
at com.sap.engine.services.ejb.message.MessageContainer.load(MessageContainer.java:457)
at com.sap.engine.services.ejb.message.MessageContainer.init(MessageContainer.java:146)
at com.sap.engine.services.ejb.message.MessageContainerFP.init(MessageContainerFP.java:53)
at com.sap.engine.services.ejb.EJBAdmin.prepareLoad(EJBAdmin.java:988)
... 9 more
Caused by: com.sap.engine.services.ejb.message.JMSBridgeException: Cannot initialize the message-driven bean container.
at com.sap.engine.services.ejb.message.JMSBridge.registerListener(JMSBridge.java:113)
at com.sap.engine.services.ejb.message.MessageContainer.load(MessageContainer.java:455)
... 12 more
Caused by: com.sap.engine.services.ejb.ContainerInitializationException: Cannot create a session pool for message-driven bean JobHandlerBean.
at com.sap.engine.services.ejb.message.JMSBridge.initPool(JMSBridge.java:219)
at com.sap.engine.services.ejb.message.JMSBridge.registerListener(JMSBridge.java:96)
... 13 more
Caused by: java.lang.NoSuchMethodException: com.sap.engine.services.ejb.message.SrvSessionPool.<init>(com.sap.engine.services.ejb.util.pool.PoolUser, com.sap.engine.services.ejb.Environment, java.util.Properties)
at java.lang.Class.getConstructor0(Class.java:1937)
at java.lang.Class.getConstructor(Class.java:1027)
at com.sap.engine.services.ejb.message.JMSBridge.initPool(JMSBridge.java:205)
... 14 more -
A Question About Message Driven Bean Exception Handling
"Your onMessage method should handle all exceptions. It must not throw checked exceptions, and throwing a RuntimeException is considered a programming error."
The above sentence is from the JMS documentation.
I will use a message driven bean for guarenteeing to send an email with some critical info in case of an unexpected system failure. Say I was not able to save into db some critical info, therefore I want to send that info to myself with a mail to be able to handle that situation manually. Now in case of failure I will send a message to a queue which contains the critical info, and a message driven bean will listen for the message and send email to me. But what if the message driven bean fails ? If I am to handle any exceptions on my onMessage method, how will the messaging system be able to redeliver that message ? It seems to me the message will not remain in the queue anymore(I have consumed it) ?
Any help appreciated, thanks in advance.Fatih.Karakoc wrote:
"Your onMessage method should handle all exceptions. It must not throw checked exceptions, and throwing a RuntimeException is considered a programming error."
The above sentence is from the JMS documentation.
I will use a message driven bean for guarenteeing to send an email with some critical info in case of an unexpected system failure. Say I was not able to save into db some critical info, therefore I want to send that info to myself with a mail to be able to handle that situation manually. Now in case of failure I will send a message to a queue which contains the critical info, and a message driven bean will listen for the message and send email to me. But what if the message driven bean fails ? If I am to handle any exceptions on my onMessage method, how will the messaging system be able to redeliver that message ? It seems to me the message will not remain in the queue anymore(I have consumed it) ?
You can configure your queue to guarantee delivery. If you use JTA you can also make it transational, so the message is put back on the queue in the event of failure. Your configuration should also include max retries and a failure queue to make sure you don't get stuck in an infinite loop where a message can never be processed.
Which app server are you using? WebLogic makes it pretty easy to set these config parameters.
% -
Message Driven Bean and Distributed transaction
Hi ALL
I am developing an asynchronous application using MDB. My application flow is as follows:
1. From MDB onMessage i am calling a method MethodA that
a. calls a simple pojo1 where I am getting a Connection on XA enable datasource1 and executing Stored Procedure1 of DatabaseSchema1.
b. In that pojo without committing m closing the connection and coming back in MethodA.
c. Again from MethodA m calling a different pojo2 where I am getting a new Connection on XA enable datasource2 and executing Stored Procedure2 of
DatabaseSchema1. In this pojo also without committing m closing the connection and coming back in MethodA.
d. Again from MethodA m calling pojo1 where I am getting a new Connection on XA enable datasource1 and executing a different function of Stored Procedure1 of DatabaseSchema1.
Public class MDB{
Public void onMessage(��.)
Try{
Method1();
Catch(Exception x)
mdbcontext.setRollbackOnly();
Private void MethodA()
Call pojo1;
Call pojo2
Pojo1
Public void CallSP1()
Get connection from Datasource1 (shema1,user1, pwd1);
Call sp1();
//return without commit;
Pojo2
Public void CallSP2()
Get connection from Datasource2 (shema1,user2, pwd2);
Call sp2();
//return without commit;
SP1:
Insert table1
Savepoint 1
Insert into Table1
Rollback to 1
Insert a row
End SP1 (without commit)
SP2:
Insert table2
Savepoint 2
Update table2
Rollback to 2
Insert table2
End SP2 (without commit)
In ejb-jar.xml
Transaction type is Container
Transaction attribute is Required for all
Now problem is:
Case 1: success case when no exception is there at Java layer
SP1 works fine I mean there is only 2 inserts in Table 1
But In SP2 there are 3 inserts
Case 2: if an exception comes at Java layer
SP1 is fine
Rollback is not happening in SP2
In ejb-jar.xml transaction attributes is Required for all methods and transaction type is Container.
Backend is Oracle 10g and init.xa has already been run on that.
Will be very obliged if can have a single hint of the problem.
Both datasource are XA enable
Backend is Oracle 10g
Application server is WAS 6.0
Queue is WAS MQ 6.0
Thanks{color:#008000}Hi Friends,
Thought of updating the answers for my questions in case somebody else would find it helpful.
{color}
{color:#999999}{color:#00ccff}I'm trying to make message driven bean and use the OnListener method.
But since I'm doing this for the first time I have very limited knowledge.
The following are my doubts :
1. Should I have a main function while using the MDB?{color}
{color:#008000} There is no need for any main function.{color}
{color:#00ccff}2. Is it mandatory to have JNDI setup done?
{color} {color}{color:#008000} There is no need for any JNDI setup done. But you need to configure the details on the
Websphere by creating valid entries inside Resources namely -
Queue Connection Factory, Queues and Listener Ports under the server.
Thanks,
Arun Prithviraj{color} -
Message Driven Bean - Configuration problem
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.enterprise.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.java:118)
at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.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(ApplicationManager.java:205)
at com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:156)
at com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:480)
at com.sun.enterprise.admin.event.AdminEventMulticaster.invokeApplicationDeployEventListener(AdminEventMulticaster.java:448)
at com.sun.enterprise.admin.event.AdminEventMulticaster.handleApplicationDeployEvent(AdminEventMulticaster.java:432)
at com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:299)
at com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:107)
at com.sun.enterprise.admin.server.core.mbean.config.ManagedServerInstance.multicastEvent(ManagedServerInstance.java:3880)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.sun.enterprise.admin.server.core.jmx.Introspector.invokeMethodOn(Introspector.java:181)
at com.sun.enterprise.admin.server.core.mbean.config.AdminBase.invoke(AdminBase.java:86)
at com.sun.enterprise.admin.server.core.mbean.config.ConfigMBeanBase.invoke(ConfigMBeanBase.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(DefaultMBeanServerInterceptor.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>
<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
SuneeshIn 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.enterprise.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.enterprise.system.container.ejb.mdb|_ThreadID=12;|com.sun.enterprise.connectors.ConnectorRuntimeException
com.sun.enterprise.connectors.ConnectorRuntimeException: JMS resource not created :
at com.sun.enterprise.connectors.system.ActiveJmsResourceAdapter.getPhysicalDestinationFromConfiguration(ActiveJmsResourceAdapter.java:296)
at com.sun.enterprise.connectors.system.ActiveJmsResourceAdapter.updateMDBRuntimeInfo(ActiveJmsResourceAdapter.java:232)
at com.sun.enterprise.connectors.inflow.ConnectorMessageBeanClient.setup(ConnectorMessageBeanClient.java:139)
at com.sun.ejb.containers.MessageBeanContainer.<init>(MessageBeanContainer.java:189)
at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.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(ApplicationManager.java:205)
at com.sun.enterprise.server.ApplicationManager.applicationDeployed(ApplicationManager.java:156)
at com.sun.enterprise.server.ApplicationManager.applicationEnabled(ApplicationManager.java:590)
at com.sun.enterprise.admin.event.AdminEventMulticaster.invokeApplicationDeployEventListener(AdminEventMulticaster.java:454)
at com.sun.enterprise.admin.event.AdminEventMulticaster.handleApplicationDeployEvent(AdminEventMulticaster.java:432)
at com.sun.enterprise.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:299)
at com.sun.enterprise.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:107)
at com.sun.enterprise.admin.server.core.mbean.config.ManagedServerInstance.multicastEvent(ManagedServerInstance.java:3880)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.sun.enterprise.admin.server.core.jmx.Introspector.invokeMethodOn(Introspector.java:181)
at com.sun.enterprise.admin.server.core.mbean.config.AdminBase.invoke(AdminBase.java:86)
at com.sun.enterprise.admin.server.core.mbean.config.ConfigMBeanBase.invoke(ConfigMBeanBase.java:68
Thanks
Suneesh -
Message Driven bean: message always removed from queue
We use MDB to dequeue messages from database queue (AQ) and want to handle errors: if the transaction rolls back, message should have retry_count updated and after defined retries should move to exception queue.
The problem is, that with all combinations of transactions settings, the message is removed from queue before onMessage is called. If I use Container managed transactions with Mandatory transaction attribute, call to setRollbackOnly fails with message "java.lang.IllegalStateException: Cannot call setRollbackOnly() current thread is NOT associated with a transaction."
How can I write a MDB, which can commit or rollback message depending on whether exception is or is not thrown? I use JDev 10.1.3.
Thanks,
Viliam
Here are my files:
ejb-jar.xml:
<?xml version = '1.0' encoding = 'windows-1250'?>
<!DOCTYPE ejb-jar PUBLIC "-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN" "http://java.sun.com/dtd/ejb-jar_2_0.dtd">
<ejb-jar>
<enterprise-beans>
<message-driven>
<description>Message Driven Bean</description>
<display-name>SendSMSBean</display-name>
<ejb-name>SendSMSBean</ejb-name>
<ejb-class>sk.transacty.cc.ejb.SendSMSBeanBean</ejb-class>
<transaction-type>Container</transaction-type>
<acknowledge-mode>Auto-acknowledge</acknowledge-mode>
<message-driven-destination>
<destination-type>javax.jms.Queue</destination-type>
</message-driven-destination>
<resource-ref>
<res-ref-name>jdbc/CCDataSource</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</message-driven>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>SendSMSBean</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Mandatory</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>orion-ejb-jar.xml:
<?xml version = '1.0' encoding = 'windows-1250'?>
<!DOCTYPE orion-ejb-jar PUBLIC "-//Evermind//DTD Enterprise JavaBeans 1.1 runtime//EN" "http://xmlns.oracle.com/ias/dtds/orion-ejb-jar.dtd">
<orion-ejb-jar>
<enterprise-beans>
<message-driven-deployment max-instances="1" name="SendSMSBean" connection-factory-location="java:comp/resource/jmsAQ/QueueConnectionFactories/aqQue" destination-location="java:comp/resource/jmsAQ/Queues/msg_queue" listener-threads="1" min-instances="0"/>
</enterprise-beans>
<assembly-descriptor>
<default-method-access>
<security-role-mapping impliesAll="true" name="<default-ejb-caller-role>"/>
</default-method-access>
</assembly-descriptor>
</orion-ejb-jar>As far as I know XMLType JMS messages are not supported when using OJMS. They might be for OC4J 10.1.3, but I thought it's an AQ limitation rather than an OC4J one.. To be sure you might just log a TAR on Metalink.
hth,
Bastiaan -
Message Driven Bean reading multiple times from a jms queue
Hi,
I am facing a strange problem with my message driven bean. Its configured to read message from a jms queue. But sometimes it read the same message multiple times from the jms queue.
We are using weblogic server 8.1 sp5.
Please find below our descriptor files
ejb-jar.xml
<ejb-jar>
<display-name>ClarifyCRM_Process_Manager_13.1</display-name>
<enterprise-beans>
<session>
<display-name>ProcessManager</display-name>
<ejb-name>ProcessManager</ejb-name>
<home>com.clarify.procmgr.ejb.ProcessManagerHome</home>
<remote>com.clarify.procmgr.ejb.ProcessManagerRemote</remote>
<ejb-class>com.clarify.procmgr.ejb.ProcessManagerEJB</ejb-class>
<session-type>Stateless</session-type>
<transaction-type>Container</transaction-type>
</session>
<message-driven>
<display-name>ProcessManagerListener</display-name>
<ejb-name>ProcessManagerListener</ejb-name>
<ejb-class>com.clarify.procmgr.ejb.ProcessManagerMDB</ejb-class>
<transaction-type>Bean</transaction-type>
<acknowledge-mode>Auto-acknowledge</acknowledge-mode>
<message-driven-destination>
<destination-type>javax.jms.Queue</destination-type>
</message-driven-destination>
</message-driven>
</enterprise-beans>
<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>ProcessManager</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>
</ejb-jar>
weblogic-ejb-jar.xml
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>ProcessManager</ejb-name>
<stateless-session-descriptor>
<pool>
<max-beans-in-free-pool>100</max-beans-in-free-pool>
<initial-beans-in-free-pool>10</initial-beans-in-free-pool>
</pool>
</stateless-session-descriptor>
<enable-call-by-reference>False</enable-call-by-reference>
<jndi-name>ProcessManagerHome</jndi-name>
<dispatch-policy>PMExecuteQueue</dispatch-policy>
<remote-client-timeout>0</remote-client-timeout>
</weblogic-enterprise-bean>
<weblogic-enterprise-bean>
<ejb-name>ProcessManagerListener</ejb-name>
<message-driven-descriptor>
<pool>
<max-beans-in-free-pool>100</max-beans-in-free-pool>
<initial-beans-in-free-pool>10</initial-beans-in-free-pool>
</pool>
<destination-jndi-name>clarify.procmgr.jms.queue.Execution</destination-jndi-name>
<connection-factory-jndi-name>clarify.procmgr.jms.factories.ExecConnection</connection-factory-jndi-name>
</message-driven-descriptor>
<enable-call-by-reference>True</enable-call-by-reference>
<dispatch-policy>PMListenerExecuteQueue</dispatch-policy>
<remote-client-timeout>0</remote-client-timeout>
</weblogic-enterprise-bean>
</weblogic-ejb-jar> The MDB is sometimes reading multiple times from clarify.procmgr.jms.queue.Execution
Also i would like to add here that the connection factory we are using clarify.procmgr.jms.factories.ExecConnection is having the following properties
ServerAffinity Enabled=true
XA connection factory enabled=false.
Please help me out here!!Maybe, your MDB "sometimes" throws an Exception in onMessage.
Check if this happens when you set <max-beans-in-free-pool>1</max-beans-in-free-pool>. -
Message-driven bean deployment error
Hi:
When attempting to deploy a message-driven bean to the server I get a the following error message:SEVERE: MDB00030: [MessageControllerJAR:MessageControllerEJB]: Exception in setting up message-drive
n bean container: [[C4003]: Error occurred on connection creation. - caught java.lang.NumberFormatEx
ception] However, bindings to the queues seem to be created successfully, as evidenced here:
INFO: CORE5076: Using Java HotSpot(TM) Server VM, Version 1.4.2_02 from Sun Microsystems Inc.
INFO: JTS5014: Recoverable JTS instance, serverId is 100
INFO: RAR5060: Install JDBC Datasources ...
INFO: JMS5015: Install JMS resources ...
INFO: JMS5002: Binding [< JMS Destination: jms/Sample, javax.jms.Queue, [ imqDestinationName=sample] >]
INFO: JMS5002: Binding [< JMS Connection Factory: jms/SampleQCF, javax.jms.QueueConnectionFactory [imqBrokerHostName=localhost , imqBrokerHostPort=7222 ] >]
INFO: LDR5010: All ejb(s) of [stateless-simple] loaded successfully!
INFO: WEB0100: Loading web module [stateless-simple:stateless-simple.war] in virtual server [server1
] at [helloworld]
INFO: HTTP3072: HTTP listener http-listener-1 [http://xxxxxx:99] ready to accept requests
startup: server started successfully
INFO: CORE3274: successful server startup
I'm using an external JMS provider and according to them the problem is not their server. If we look at the exception trace (javax.jms.JMSException) this is what gets displayed in the server's console:
SEVERE: MDB00030: [MessageControllerJAR:MessageControllerEJB]: Exception in setting up message-drive
n bean container: [[C4003]: Error occurred on connection creation. - caught java.lang.NumberFormatEx
ception]
SEVERE: MDB00017: [MessageControllerEJB]: Exception in creating message-driven bean container: [java
x.jms.JMSException: [C4003]: Error occurred on connection creation. - caught java.lang.NumberFormatE
xception]
SEVERE: javax.jms.JMSException
javax.jms.JMSException: [C4003]: Error occurred on connection creation. - caught java.lang.NumberFor
matException
at com.sun.messaging.jmq.jmsclient.ExceptionHandler.getJMSException(ExceptionHandler.java:183)
at com.sun.messaging.jmq.jmsclient.ExceptionHandler.handleException(ExceptionHandler.java:136)
at com.sun.messaging.jmq.jmsclient.PortMapperClient.readBrokerPorts(PortMapperClient.java:145)
at com.sun.messaging.jmq.jmsclient.PortMapperClient.init(PortMapperClient.java:86)
at com.sun.messaging.jmq.jmsclient.PortMapperClient.<init>(PortMapperClient.java:47)
at com.sun.messaging.jmq.jmsclient.protocol.tcp.TCPConnectionHandler.<init>(TCPConnectionHandler.java:46)
at com.sun.messaging.jmq.jmsclient.protocol.tcp.TCPStreamHandler.openConnection(TCPStreamHandler.java:101)
at com.sun.messaging.jmq.jmsclient.ProtocolHandler.init(ProtocolHandler.java:501)
at com.sun.messaging.jmq.jmsclient.ProtocolHandler.<init>(ProtocolHandler.java:930)
at com.sun.messaging.jmq.jmsclient.ConnectionImpl.openConnection(ConnectionImpl.java:1482)
at com.sun.messaging.jmq.jmsclient.ConnectionImpl.init(ConnectionImpl.java:403)
at com.sun.messaging.jmq.jmsclient.ConnectionImpl.<init>(ConnectionImpl.java:234)
at com.sun.messaging.jmq.jmsclient.UnifiedConnectionImpl.<init>(UnifiedConnectionImpl.java:33)
at com.sun.messaging.jmq.jmsclient.QueueConnectionImpl.<init>(QueueConnectionImpl.java:32)
at com.sun.messaging.jmq.jmsclient.XAQueueConnectionImpl.<init>(XAQueueConnectionImpl.java:33)
at com.sun.messaging.jmq.jmsclient.JMSXAQueueConnectionImpl.<init>(JMSXAQueueConnectionImpl.java:33)
at com.sun.messaging.jmq.jmsclient.JMSXAQueueConnectionFactoryImpl.createXAQueueConnection(JMSXAQueueConnectionFactoryImpl.java:75)
at com.sun.messaging.jmq.jmsclient.JMSXAQueueConnectionFactoryImpl.createXAQueueConnection(JMSXAQueueConnectionFactoryImpl.java:51)
at com.sun.enterprise.jms.ConnectionFactoryWrapper.createQueueConnection(ConnectionFactoryWrapper.java:118)
at com.sun.ejb.containers.MessageBeanHelperBase.setup(MessageBeanHelperBase.java:394)
at com.sun.ejb.containers.MessageBeanContainer.<init>(MessageBeanContainer.java:206)
at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:173)
at com.iplanet.ias.server.AbstractLoader.loadEjbs(AbstractLoader.java:345)
at com.iplanet.ias.server.EJBModuleLoader.load(EJBModuleLoader.java:79)
at com.iplanet.ias.server.StandAloneEJBModulesManager.moduleDeployed(StandAloneEJBModulesManager.java:194)
at com.iplanet.ias.server.StandAloneEJBModulesManager.moduleDeployed(StandAloneEJBModulesManager.java:166)
at com.iplanet.ias.server.StandAloneEJBModulesManager.moduleDeployed(StandAloneEJBModulesManager.java:297)
at com.iplanet.ias.admin.event.AdminEventMulticaster.invokeModuleDeployEventListener(AdminEventMulticaster.java:464)
at com.iplanet.ias.admin.event.AdminEventMulticaster.handleModuleDeployEvent(AdminEventMulticaster.java:451)
at com.iplanet.ias.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:294)
at com.iplanet.ias.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:99)
at com.iplanet.ias.admin.server.core.channel.AdminChannelServer.sendNotification(AdminChannelServer.java:84)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
at sun.rmi.transport.Transport$1.run(Transport.java:148)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread
SEVERE: EJB5090: Exception in creating EJB container [javax.jms.JMSException: [C4003]: Error occurre
d on connection creation. - caught java.lang.NumberFormatException]
SEVERE: appId=MessageControllerJAR moduleName=MessageControllerJAR ejbName=MessageControllerEJB
SEVERE: LDR5004: UnExpected error occured while creating ejb container
javax.jms.JMSException: [C4003]: Error occurred on connection creation. - caught java.lang.NumberFor
matException
at com.sun.messaging.jmq.jmsclient.ExceptionHandler.getJMSException(ExceptionHandler.java:183)
at com.sun.messaging.jmq.jmsclient.ExceptionHandler.handleException(ExceptionHandler.java:136)
at com.sun.messaging.jmq.jmsclient.PortMapperClient.readBrokerPorts(PortMapperClient.java:145)
at com.sun.messaging.jmq.jmsclient.PortMapperClient.init(PortMapperClient.java:86)
at com.sun.messaging.jmq.jmsclient.PortMapperClient.<init>(PortMapperClient.java:47)
at com.sun.messaging.jmq.jmsclient.protocol.tcp.TCPConnectionHandler.<init>(TCPConnectionHandler.java:46)
at com.sun.messaging.jmq.jmsclient.protocol.tcp.TCPStreamHandler.openConnection(TCPStreamHandler.java:101)
at com.sun.messaging.jmq.jmsclient.ProtocolHandler.init(ProtocolHandler.java:501)
at com.sun.messaging.jmq.jmsclient.ProtocolHandler.<init>(ProtocolHandler.java:930)
at com.sun.messaging.jmq.jmsclient.ConnectionImpl.openConnection(ConnectionImpl.java:1482)
at com.sun.messaging.jmq.jmsclient.ConnectionImpl.init(ConnectionImpl.java:403)
at com.sun.messaging.jmq.jmsclient.ConnectionImpl.<init>(ConnectionImpl.java:234)
at com.sun.messaging.jmq.jmsclient.UnifiedConnectionImpl.<init>(UnifiedConnectionImpl.java:33)
at com.sun.messaging.jmq.jmsclient.QueueConnectionImpl.<init>(QueueConnectionImpl.java:32)
at com.sun.messaging.jmq.jmsclient.XAQueueConnectionImpl.<init>(XAQueueConnectionImpl.java:33)
at com.sun.messaging.jmq.jmsclient.JMSXAQueueConnectionImpl.<init>(JMSXAQueueConnectionImpl.java:33)
at com.sun.messaging.jmq.jmsclient.JMSXAQueueConnectionFactoryImpl.createXAQueueConnection(JMSXAQueueConnectionFactoryImpl.java:75)
at com.sun.messaging.jmq.jmsclient.JMSXAQueueConnectionFactoryImpl.createXAQueueConnection(JMSXAQueueConnectionFactoryImpl.java:51)
at com.sun.enterprise.jms.ConnectionFactoryWrapper.createQueueConnection(ConnectionFactoryWrapper.java:118)
at com.sun.ejb.containers.MessageBeanHelperBase.setup(MessageBeanHelperBase.java:394)
at com.sun.ejb.containers.MessageBeanContainer.<init>(MessageBeanContainer.java:206)
at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:173)
at com.iplanet.ias.server.AbstractLoader.loadEjbs(AbstractLoader.java:345)
at com.iplanet.ias.server.EJBModuleLoader.load(EJBModuleLoader.java:79)
at com.iplanet.ias.server.StandAloneEJBModulesManager.moduleDeployed(StandAloneEJBModulesManager.java:194)
at com.iplanet.ias.server.StandAloneEJBModulesManager.moduleDeployed(StandAloneEJBModulesManager.java:166)
at com.iplanet.ias.server.StandAloneEJBModulesManager.moduleDeployed(StandAloneEJBModulesManager.java:297)
at com.iplanet.ias.admin.event.AdminEventMulticaster.invokeModuleDeployEventListener(AdminEventMulticaster.java:464)
at com.iplanet.ias.admin.event.AdminEventMulticaster.handleModuleDeployEvent(AdminEventMulticaster.java:451)
at com.iplanet.ias.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:294)
at com.iplanet.ias.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:99)
at com.iplanet.ias.admin.server.core.channel.AdminChannelServer.sendNotification(AdminChannelServer.java:84)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
at sun.rmi.transport.Transport$1.run(Transport.java:148)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.ja
WARNING: CORE5020: Error while loading ejb module
WARNING: ADM5603:Event listener error [Error while loading EJB module [MessageControllerJAR]. Please refer to the server log for more details. Any suggestions will be appreciated. Thanks. SCHi:
When attempting to deploy a message-driven bean to the server I get a the following error message:SEVERE: MDB00030: [MessageControllerJAR:MessageControllerEJB]: Exception in setting up message-drive
n bean container: [[C4003]: Error occurred on connection creation. - caught java.lang.NumberFormatEx
ception] However, bindings to the queues seem to be created successfully, as evidenced here:
INFO: CORE5076: Using Java HotSpot(TM) Server VM, Version 1.4.2_02 from Sun Microsystems Inc.
INFO: JTS5014: Recoverable JTS instance, serverId is 100
INFO: RAR5060: Install JDBC Datasources ...
INFO: JMS5015: Install JMS resources ...
INFO: JMS5002: Binding [< JMS Destination: jms/Sample, javax.jms.Queue, [ imqDestinationName=sample] >]
INFO: JMS5002: Binding [< JMS Connection Factory: jms/SampleQCF, javax.jms.QueueConnectionFactory [imqBrokerHostName=localhost , imqBrokerHostPort=7222 ] >]
INFO: LDR5010: All ejb(s) of [stateless-simple] loaded successfully!
INFO: WEB0100: Loading web module [stateless-simple:stateless-simple.war] in virtual server [server1
] at [helloworld]
INFO: HTTP3072: HTTP listener http-listener-1 [http://xxxxxx:99] ready to accept requests
startup: server started successfully
INFO: CORE3274: successful server startup
I'm using an external JMS provider and according to them the problem is not their server. If we look at the exception trace (javax.jms.JMSException) this is what gets displayed in the server's console:
SEVERE: MDB00030: [MessageControllerJAR:MessageControllerEJB]: Exception in setting up message-drive
n bean container: [[C4003]: Error occurred on connection creation. - caught java.lang.NumberFormatEx
ception]
SEVERE: MDB00017: [MessageControllerEJB]: Exception in creating message-driven bean container: [java
x.jms.JMSException: [C4003]: Error occurred on connection creation. - caught java.lang.NumberFormatE
xception]
SEVERE: javax.jms.JMSException
javax.jms.JMSException: [C4003]: Error occurred on connection creation. - caught java.lang.NumberFor
matException
at com.sun.messaging.jmq.jmsclient.ExceptionHandler.getJMSException(ExceptionHandler.java:183)
at com.sun.messaging.jmq.jmsclient.ExceptionHandler.handleException(ExceptionHandler.java:136)
at com.sun.messaging.jmq.jmsclient.PortMapperClient.readBrokerPorts(PortMapperClient.java:145)
at com.sun.messaging.jmq.jmsclient.PortMapperClient.init(PortMapperClient.java:86)
at com.sun.messaging.jmq.jmsclient.PortMapperClient.<init>(PortMapperClient.java:47)
at com.sun.messaging.jmq.jmsclient.protocol.tcp.TCPConnectionHandler.<init>(TCPConnectionHandler.java:46)
at com.sun.messaging.jmq.jmsclient.protocol.tcp.TCPStreamHandler.openConnection(TCPStreamHandler.java:101)
at com.sun.messaging.jmq.jmsclient.ProtocolHandler.init(ProtocolHandler.java:501)
at com.sun.messaging.jmq.jmsclient.ProtocolHandler.<init>(ProtocolHandler.java:930)
at com.sun.messaging.jmq.jmsclient.ConnectionImpl.openConnection(ConnectionImpl.java:1482)
at com.sun.messaging.jmq.jmsclient.ConnectionImpl.init(ConnectionImpl.java:403)
at com.sun.messaging.jmq.jmsclient.ConnectionImpl.<init>(ConnectionImpl.java:234)
at com.sun.messaging.jmq.jmsclient.UnifiedConnectionImpl.<init>(UnifiedConnectionImpl.java:33)
at com.sun.messaging.jmq.jmsclient.QueueConnectionImpl.<init>(QueueConnectionImpl.java:32)
at com.sun.messaging.jmq.jmsclient.XAQueueConnectionImpl.<init>(XAQueueConnectionImpl.java:33)
at com.sun.messaging.jmq.jmsclient.JMSXAQueueConnectionImpl.<init>(JMSXAQueueConnectionImpl.java:33)
at com.sun.messaging.jmq.jmsclient.JMSXAQueueConnectionFactoryImpl.createXAQueueConnection(JMSXAQueueConnectionFactoryImpl.java:75)
at com.sun.messaging.jmq.jmsclient.JMSXAQueueConnectionFactoryImpl.createXAQueueConnection(JMSXAQueueConnectionFactoryImpl.java:51)
at com.sun.enterprise.jms.ConnectionFactoryWrapper.createQueueConnection(ConnectionFactoryWrapper.java:118)
at com.sun.ejb.containers.MessageBeanHelperBase.setup(MessageBeanHelperBase.java:394)
at com.sun.ejb.containers.MessageBeanContainer.<init>(MessageBeanContainer.java:206)
at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:173)
at com.iplanet.ias.server.AbstractLoader.loadEjbs(AbstractLoader.java:345)
at com.iplanet.ias.server.EJBModuleLoader.load(EJBModuleLoader.java:79)
at com.iplanet.ias.server.StandAloneEJBModulesManager.moduleDeployed(StandAloneEJBModulesManager.java:194)
at com.iplanet.ias.server.StandAloneEJBModulesManager.moduleDeployed(StandAloneEJBModulesManager.java:166)
at com.iplanet.ias.server.StandAloneEJBModulesManager.moduleDeployed(StandAloneEJBModulesManager.java:297)
at com.iplanet.ias.admin.event.AdminEventMulticaster.invokeModuleDeployEventListener(AdminEventMulticaster.java:464)
at com.iplanet.ias.admin.event.AdminEventMulticaster.handleModuleDeployEvent(AdminEventMulticaster.java:451)
at com.iplanet.ias.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:294)
at com.iplanet.ias.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:99)
at com.iplanet.ias.admin.server.core.channel.AdminChannelServer.sendNotification(AdminChannelServer.java:84)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
at sun.rmi.transport.Transport$1.run(Transport.java:148)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
at java.lang.Thread.run(Thread
SEVERE: EJB5090: Exception in creating EJB container [javax.jms.JMSException: [C4003]: Error occurre
d on connection creation. - caught java.lang.NumberFormatException]
SEVERE: appId=MessageControllerJAR moduleName=MessageControllerJAR ejbName=MessageControllerEJB
SEVERE: LDR5004: UnExpected error occured while creating ejb container
javax.jms.JMSException: [C4003]: Error occurred on connection creation. - caught java.lang.NumberFor
matException
at com.sun.messaging.jmq.jmsclient.ExceptionHandler.getJMSException(ExceptionHandler.java:183)
at com.sun.messaging.jmq.jmsclient.ExceptionHandler.handleException(ExceptionHandler.java:136)
at com.sun.messaging.jmq.jmsclient.PortMapperClient.readBrokerPorts(PortMapperClient.java:145)
at com.sun.messaging.jmq.jmsclient.PortMapperClient.init(PortMapperClient.java:86)
at com.sun.messaging.jmq.jmsclient.PortMapperClient.<init>(PortMapperClient.java:47)
at com.sun.messaging.jmq.jmsclient.protocol.tcp.TCPConnectionHandler.<init>(TCPConnectionHandler.java:46)
at com.sun.messaging.jmq.jmsclient.protocol.tcp.TCPStreamHandler.openConnection(TCPStreamHandler.java:101)
at com.sun.messaging.jmq.jmsclient.ProtocolHandler.init(ProtocolHandler.java:501)
at com.sun.messaging.jmq.jmsclient.ProtocolHandler.<init>(ProtocolHandler.java:930)
at com.sun.messaging.jmq.jmsclient.ConnectionImpl.openConnection(ConnectionImpl.java:1482)
at com.sun.messaging.jmq.jmsclient.ConnectionImpl.init(ConnectionImpl.java:403)
at com.sun.messaging.jmq.jmsclient.ConnectionImpl.<init>(ConnectionImpl.java:234)
at com.sun.messaging.jmq.jmsclient.UnifiedConnectionImpl.<init>(UnifiedConnectionImpl.java:33)
at com.sun.messaging.jmq.jmsclient.QueueConnectionImpl.<init>(QueueConnectionImpl.java:32)
at com.sun.messaging.jmq.jmsclient.XAQueueConnectionImpl.<init>(XAQueueConnectionImpl.java:33)
at com.sun.messaging.jmq.jmsclient.JMSXAQueueConnectionImpl.<init>(JMSXAQueueConnectionImpl.java:33)
at com.sun.messaging.jmq.jmsclient.JMSXAQueueConnectionFactoryImpl.createXAQueueConnection(JMSXAQueueConnectionFactoryImpl.java:75)
at com.sun.messaging.jmq.jmsclient.JMSXAQueueConnectionFactoryImpl.createXAQueueConnection(JMSXAQueueConnectionFactoryImpl.java:51)
at com.sun.enterprise.jms.ConnectionFactoryWrapper.createQueueConnection(ConnectionFactoryWrapper.java:118)
at com.sun.ejb.containers.MessageBeanHelperBase.setup(MessageBeanHelperBase.java:394)
at com.sun.ejb.containers.MessageBeanContainer.<init>(MessageBeanContainer.java:206)
at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:173)
at com.iplanet.ias.server.AbstractLoader.loadEjbs(AbstractLoader.java:345)
at com.iplanet.ias.server.EJBModuleLoader.load(EJBModuleLoader.java:79)
at com.iplanet.ias.server.StandAloneEJBModulesManager.moduleDeployed(StandAloneEJBModulesManager.java:194)
at com.iplanet.ias.server.StandAloneEJBModulesManager.moduleDeployed(StandAloneEJBModulesManager.java:166)
at com.iplanet.ias.server.StandAloneEJBModulesManager.moduleDeployed(StandAloneEJBModulesManager.java:297)
at com.iplanet.ias.admin.event.AdminEventMulticaster.invokeModuleDeployEventListener(AdminEventMulticaster.java:464)
at com.iplanet.ias.admin.event.AdminEventMulticaster.handleModuleDeployEvent(AdminEventMulticaster.java:451)
at com.iplanet.ias.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:294)
at com.iplanet.ias.admin.event.AdminEventMulticaster.multicastEvent(AdminEventMulticaster.java:99)
at com.iplanet.ias.admin.server.core.channel.AdminChannelServer.sendNotification(AdminChannelServer.java:84)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:261)
at sun.rmi.transport.Transport$1.run(Transport.java:148)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.ja
WARNING: CORE5020: Error while loading ejb module
WARNING: ADM5603:Event listener error [Error while loading EJB module [MessageControllerJAR]. Please refer to the server log for more details. Any suggestions will be appreciated. Thanks. SC
Maybe you are looking for
-
After installing 4 add ons and restarting, firefox no longer works - help!
On my PC running Windows 7, I installed these 4 add ons: Measure it, Web Developer, Colorzilla, and Screenshot, restarting Firefox, and only the home page came up, none of my bookmarks were working. I had to manually type in a web address for anythin
-
Hello Guys, I have done all required steps to maintain Free Goods (in Retail system). Maintained following condition tables: 1. Company/Material 2. Sales org/Material 3. Sales org./Distr. Channel/Material 4. Sales org./Distr. Channel/Plant/Material 5
-
This happens even on my banking sites and bill pay sites. The little bar comes down at the top of the page. Gives me the option of allow, when I right click it does not do anything. I have to click the x or allow to make it go away.
-
The Vertical example in the FlashHelp SDK provided with RHX5 (help example with safari guides for Africa), there are popup links that expand the text content of the current paragraph by adding an explanation in-line with the popup link. There is one
-
Can I put my DVD movies on to Itunes to move to my Iphone? like with cds (not home movies) compaq Windows XP