on 01-24-2007 1:29 PM
I am developing an application with 2 message driven beans but only 1 session bean. I have developed two separate connection factories for both mdb's.
But I am getting the following error-
Caught exception during application startup from SAP J2EE Engine's deploy service:
java.rmi.RemoteException: Error occurred while starting application sap.com/MyMessageEAR and wait. Reason: Clusterwide exception: server ID 4380950:com.sap.engine.services.deploy.exceptions.ServerDeploymentException: Exception while preparing start of application sap.com/MyMessageEAR.
at com.sap.engine.services.deploy.server.application.StartTransaction.prepareCommon(StartTransaction.java:241)
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:301)
at com.sap.engine.services.deploy.server.application.ParallelAdapter.makeAllPhasesImpl(ParallelAdapter.java:327)
at com.sap.engine.services.deploy.server.application.ParallelAdapter.runInTheSameThread(ParallelAdapter.java:111)
at com.sap.engine.services.deploy.server.application.ParallelAdapter.makeAllPhasesAndWait(ParallelAdapter.java:230)
at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:4680)
at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:4585)
at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:4558)
at com.sap.engine.services.deploy.server.DeployServiceImplp4_Skel.dispatch(DeployServiceImplp4_Skel.java:1163)
at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:304)
at com.sap.engine.services.rmi_p4.DispatchImpl._run(DispatchImpl.java:193)
at com.sap.engine.services.rmi_p4.server.P4SessionProcessor.request(P4SessionProcessor.java:122)
at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
Caused by: java.lang.ClassCastException
at com.sap.engine.services.ejb.message.JMSBridge.createConnection(JMSBridge.java:194)
at com.sap.engine.services.ejb.message.JMSBridge.registerQueueListener(JMSBridge.java:142)
at com.sap.engine.services.ejb.message.JMSBridge.registerListener(JMSBridge.java:120)
at com.sap.engine.services.ejb.message.MessageContainer.load(MessageContainer.java:458)
at com.sap.engine.services.ejb.message.MessageContainer.init(MessageContainer.java:149)
at com.sap.engine.services.ejb.message.MessageContainerFP.init(MessageContainerFP.java:53)
at com.sap.engine.services.ejb.EJBAdmin.prepareLoad(EJBAdmin.java:999)
at com.sap.engine.services.ejb.EJBAdmin.prepareStart(EJBAdmin.java:2424)
at com.sap.engine.services.deploy.server.application.StartTransaction.prepareCommon(StartTransaction.java:231)
... 18 more
(message ID: com.sap.sdm.serverext.servertype.inqmy.extern.EngineApplOnlineDeployerImpl.performAction(DeploymentActionTypes).REMEXC)
Deployment exception : Got problems during deployment
do we need to register the message driven bean in saome way in case the session bean gets to know which mdb to call? If yes , how
Hi Shilpa,
Since JMS 1.1, there is "ConnectionFactory" - superinterface to both QueueConnectionFactory and TopicConnectionFactory.
In case you are developing your application on newer servers like SAP NetWeaver Application Server, Java EE 5 Edition, you could try using only one such factory in your application and avoid those problems.
However SAP NetWeaver 2004s Application Server supports JMS 1.0 and Vladimir's advice is the only possible way.
Best Regards
Peter
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Apparently in the ejb-jar.xml you have configured the MDB to listen on a Queue (destination-type element) but have provided a TopicConnectionFactory in the ejb-j2ee-engine.xml (connection-factory-name element).
-Vladimir
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
With two (or more) MDBs it's no different than with one. Each MDB is configured separately in the ejb-jar.xml and ejb-j2ee-engine.xml.
In the ejb-jar.xml for each MDB you specify
<message-driven-destination>
<destination-type>javax.jms.Topic</destination-type>
<!-- or <destination-type>javax.jms.Queue</destination-type> -->
</message-driven-destination>
In the ejb-j2ee-engine.xml for each MDB you specify
<message-props>
<destination-name>MyDestination</destination-name>
<connection-factory-name>MyConnectionFactory</connection-factory-name>
</message-props>
If <destination-type> in ejb-jar.xml is Topic, MyConnectionFactory must be created as TopicConnectionFactory in jms-factories.xml. If <destination-type> is Queue, MyConnectionFactory, naturally, must be created as QueueConnectionFactory.
HTH!
-Vladimir
I have created new connection factories/queue/topic in Visual Administrator.
When I am trying to access them , it gives the following error:
The connector in which ConnectionFactory "MyTopicFactory" is defined is not deployed or not started.
I am referring the resources as:
jmsfactory/default/MyTopicFactory instead of java:comp/env/MyTopicFactory
jmsqueues/default/MyQueue instead of java:comp/env/MyQueue
jmstopics/default/MyTopic instead of java:comp/env/MyTopic
Is this method correct? What else I have to do to access them?
Well, you have to register the connection factories and destinations using the JMS Connector service. See this link:
http://help.sap.com/saphelp_nw04/helpdata/en/22/cf4e71c46cdb4da31153be96c5389f/frameset.htm
Then, in the ejb-j2ee-engine.xml you refer the resources with their names as specified above, without any prefixes:
http://help.sap.com/saphelp_nw04/helpdata/en/4d/3fe73902dc5145920990028ca1781f/frameset.htm
It is also worth going thru the other topics around <a href="http://help.sap.com/saphelp_nw04/helpdata/en/55/8898af1b129b4b8a1b63acea61b465/frameset.htm">MDB development</a> if you are not sure about something.
HTH!
-Vladimir
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.