Problem creating Physical Destination for Message Driven Bean example
I am trying to create a MDB application. in which i want to distribute the workload using messages.
I am using SUN j2ee application server8.2 and netbeans 6.5 on windows xp professional.
I referred the j2ee 1.4 tutorial to create the mdb's.
I am able to create queue's and connection factories.
the tutorial says
To create the physical destination, perform the following steps:
.In the tree component, expand the Resources node, then expand the JMS Resources node.
.Select the Physical Destinations node.
.On the Physical Destinations page, click New. The Create Physical Destination page appears.
.In the Physical Destination Name field, type PhysicalQueue.
.Choose queue from the Type combo box.
.Click OK.
but i am not able to find out this Physical Destination node in admin console. So when i execute my MDB project the messages are created but the onMessage() method is not invoked.
Please help!!!
Hi,
but this example was in guide to this version.
Ok, in case it is not possible to use MDB, how should i handle long time consumpting functions in EP enviroment?
(customer has only EP6SP2 and he need to send a lot of mails after user request and i dont want to leave user waiting till that function ends. - should i start new thread in portal?)
JJ
Similar Messages
-
ERROR WHEN START ESR: Cannot activate endpoint for message-driven bean
Hi Gurus,
We just upgraded our PI 7.1 to SP11, and we have finished it successfully, then we go to the /rep/start/repository.jnlp to start the ESR but some error happens,while the ID,SLD and RWB works well, below is the detailed message:
Application cannot be started!
Details:
com.sap.engine.services.deploy.container.DeploymentException: Cannot activate endpoint for message-driven bean sap.com/com.sap.xi.repository*xml|com.sap.xpi.ibrep.server.jar*xml|WorkspaceSyncMessageReciverMDB
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:419)
at com.sap.engine.services.deploy.server.application.ParallelAdapter.makeAllPhasesImpl(ParallelAdapter.java:498)
at com.sap.engine.services.deploy.server.application.StartTransaction.makeAllPhasesImpl(StartTransaction.java:554)
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:3422)
at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:3408)
at com.sap.engine.services.deploy.server.DeployCommunicatorImpl.startApplicationAndWait(DeployCommunicatorImpl.java:749)
at com.sap.engine.services.servlets_jsp.server.deploy.impl.ApplicationManager.start(ApplicationManager.java:180)
at com.sap.engine.services.servlets_jsp.server.deploy.impl.ApplicationManager.analyseAppStatusMode(ApplicationManager.java:288)
at com.sap.engine.services.servlets_jsp.server.DeployContext.startLazyApplication(DeployContext.java:334)
at com.sap.engine.services.servlets_jsp.filters.ApplicationSelector.process(ApplicationSelector.java:103)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71)
at com.sap.engine.services.httpserver.filters.WebContainerInvoker.process(WebContainerInvoker.java:67)
at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71)
at com.sap.engine.services.httpserver.filters.ResponseLogWriter.process(ResponseLogWriter.java:60)
at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71)
at com.sap.engine.services.httpserver.filters.DefineHostFilter.process(DefineHostFilter.java:27)
at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71)
at com.sap.engine.services.httpserver.filters.MonitoringFilter.process(MonitoringFilter.java:29)
at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71)
at com.sap.engine.services.httpserver.server.Processor.chainedRequest(Processor.java:295)
at com.sap.engine.services.httpserver.server.Processor$FCAProcessorThread.run(Processor.java:222)
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:152)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:250)
Caused by: com.sap.engine.services.ejb3.container.ActionException: Cannot activate endpoint for message-driven bean sap.com/com.sap.xi.repository*xml|com.sap.xpi.ibrep.server.jar*xml|WorkspaceSyncMessageReciverMDB
at com.sap.engine.services.ejb3.runtime.impl.Actions_MDBEndpointActivation.perform(Actions_MDBEndpointActivation.java:103)
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: Could not activate endpoint for the configured number of attempts
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:95)
... 37 more
Caused by: javax.resource.spi.UnavailableException: Could not activate endpoint for the configured number of attempts
at com.sap.jms.resourceadapter.RaActivation.activate(RaActivation.java:161)
at com.sap.jms.resourceadapter.ResourceAdapterImpl.endpointActivation(ResourceAdapterImpl.java:101)
... 42 more
Caused by: javax.resource.spi.UnavailableException: The destination jms/queue/xi/repository/SWCVSync cannot be looked up. Last attempt performed : jms_vendor_queues_global/jms/queue/xi/repository/SWCVSync
at com.sap.jms.resourceadapter.RaActivation.setupDestination(RaActivation.java:369)
at com.sap.jms.resourceadapter.RaActivation.activate(RaActivation.java:128)
... 43 more
Caused by: com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Object not found in lookup of SWCVSync.
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:367)
... 44 more
how should we resolve this issue? does any one have such experience on this issue?
thanks.Hi;
As our Colleague said it would be good to create message to SAP.
01 .Please check the cache,
02. check the system users are not locked.
03. Re-initialization option in Java Web Start Administration (before using this please read the description carefully).
04. try Full Cache Refresh.
05. Check the Java run time version you are using.
Regards,
Prabhu Rajesh -
Error when ESR starts - Cannot activate endpoint for message-driven bean
Hi, as already posted on ERROR WHEN START ESR: Cannot activate endpoint for message-driven bean
after an upgrade to PI 7.1 SP11, we got the following error when trying to start ESR, other applications work well:
Application cannot be started!
Details: com.sap.engine.services.deploy.container.DeploymentException: Cannot activate endpoint for message-driven bean sap.com/com.sap.xi.repositoryxml|com.sap.xpi.ibrep.server.jarxml|WorkspaceSyncMessageReciverMDB
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:419)
at com.sap.engine.services.deploy.server.application.ParallelAdapter.makeAllPhasesImpl(ParallelAdapter.java:498)
at com.sap.engine.services.deploy.server.application.StartTransaction.makeAllPhasesImpl(StartTransaction.java:554)
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:3422)
at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:3408)
at com.sap.engine.services.deploy.server.DeployCommunicatorImpl.startApplicationAndWait(DeployCommunicatorImpl.java:749)
at com.sap.engine.services.servlets_jsp.server.deploy.impl.ApplicationManager.start(ApplicationManager.java:180)
at com.sap.engine.services.servlets_jsp.server.deploy.impl.ApplicationManager.analyseAppStatusMode(ApplicationManager.java:288)
at com.sap.engine.services.servlets_jsp.server.DeployContext.startLazyApplication(DeployContext.java:334)
at com.sap.engine.services.servlets_jsp.filters.ApplicationSelector.process(ApplicationSelector.java:103)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71)
at com.sap.engine.services.httpserver.filters.WebContainerInvoker.process(WebContainerInvoker.java:67)
at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71)
at com.sap.engine.services.httpserver.filters.ResponseLogWriter.process(ResponseLogWriter.java:60)
at com.sap.engine.services.httpserver.chain.HostFilter.process(HostFilter.java:9)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71)
at com.sap.engine.services.httpserver.filters.DefineHostFilter.process(DefineHostFilter.java:27)
at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71)
at com.sap.engine.services.httpserver.filters.MonitoringFilter.process(MonitoringFilter.java:29)
at com.sap.engine.services.httpserver.chain.ServerFilter.process(ServerFilter.java:12)
at com.sap.engine.services.httpserver.chain.AbstractChain.process(AbstractChain.java:71)
at com.sap.engine.services.httpserver.server.Processor.chainedRequest(Processor.java:295)
at com.sap.engine.services.httpserver.server.Processor$FCAProcessorThread.run(Processor.java:222)
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:152)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:250)
Caused by: com.sap.engine.services.ejb3.container.ActionException: Cannot activate endpoint for message-driven bean sap.com/com.sap.xi.repositoryxml|com.sap.xpi.ibrep.server.jarxml|WorkspaceSyncMessageReciverMDB
at com.sap.engine.services.ejb3.runtime.impl.Actions_MDBEndpointActivation.perform(Actions_MDBEndpointActivation.java:103)
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: Could not activate endpoint for the configured number of attempts
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:95)
... 37 more
Caused by: javax.resource.spi.UnavailableException: Could not activate endpoint for the configured number of attempts
at com.sap.jms.resourceadapter.RaActivation.activate(RaActivation.java:161)
at com.sap.jms.resourceadapter.ResourceAdapterImpl.endpointActivation(ResourceAdapterImpl.java:101)
... 42 more
Caused by: javax.resource.spi.UnavailableException: The destination jms/queue/xi/repository/SWCVSync cannot be looked up. Last attempt performed : jms_vendor_queues_global/jms/queue/xi/repository/SWCVSync
at com.sap.jms.resourceadapter.RaActivation.setupDestination(RaActivation.java:369)
at com.sap.jms.resourceadapter.RaActivation.activate(RaActivation.java:128)
... 43 more
Caused by: com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Object not found in lookup of SWCVSync.
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:367)
... 44 more
Thanks.Guys,
I have deployed the below components and after this repository could not be started which gives the below error.
1000.7.11.10.18.20130529165100
SAP AG
sap.com
SAP_XIAF
1000.7.11.10.11.20130529165100
SAP AG
sap.com
SAP_XIESR
1000.7.11.10.15.20130529165100
SAP AG
sap.com
SAP_XITOOL
We have the same issue. Still the Restart did not solve ths issue.
Can anybody help? We are not able to start the XI Repository.
Our PI components are as below
com.sap.engine.services.ejb3.runtime.impl.refmatcher.EJBResolvingException: Cannot start applicationsap.com/com.sap.xi.repository; nested exception is: java.rmi.RemoteException: [ERROR
CODE DPL.DS.6125] Error occurred while starting application locally and wait.; nested exception is:
com.sap.engine.services.deploy.container.DeploymentException: Cannot activate endpoint for message-driven bean sap.com/com.sap.xi.repository*xml|com.sap.xpi.ibrep.server.jar*xm
l|CacheRefreshMDB^M
at com.sap.engine.services.ejb3.runtime.impl.DefaultContainerRepository.startApp(DefaultContainerRepository.java:315)^M
at com.sap.engine.services.ejb3.runtime.impl.DefaultContainerRepository.getEnterpriseBeanContainer(DefaultContainerRepository.java:106)^M
at com.sap.engine.services.ejb3.runtime.impl.DefaultRemoteObjectFactory.resolveReference(DefaultRemoteObjectFactory.java:55)^M
1000.7.11.10.6.20121015232500
SAP AG
sap.com
MESSAGING
Regards
Omkar -
Message driven bean example is not working
Hi,
i tried message driven bean example on J2ee 6.20. I am able to make connection factory, but when i tried to deploy ear file a get an exception:
Error occurred
com.inqmy.services.deploy.container.DeploymentException: java.lang.NullPointerEx
ception
at com.inqmy.services.ejb20.EJBAdmin.commitDeploy(EJBAdmin.java:604)
at com.inqmy.services.deploy.server.DeployServiceImpl.commit(DeployServi
ceImpl.java:2897)
at com.inqmy.services.deploy.server.DeployServiceImpl.deploy1(DeployServ
iceImpl.java:524)
at com.inqmy.services.deploy.server.DeployServiceImpl.deploy(DeployServi
ceImpl.java:139)
at com.inqmy.services.deploy.command.DeployCommand.exec(DeployCommand.ja
va:142)
at com.inqmy.services.shell.processor.environment.CommandBase.exec(Comma
ndBase.java:124)
at com.inqmy.services.shell.processor.Interpreter.applyLineCommand(Inter
preter.java:391)
at com.inqmy.services.shell.processor.Interpreter.apply(Interpreter.java
:150)
at com.inqmy.services.shell.processor.Shell.work(Shell.java:150)
at com.inqmy.services.shell.processor.managers.ScriptProcessThread.run(S
criptProcessThread.java:128)
in visual administrator I can see the right queue and for few seconds this queue have one consumer.
thank
JJHi,
but this example was in guide to this version.
Ok, in case it is not possible to use MDB, how should i handle long time consumpting functions in EP enviroment?
(customer has only EP6SP2 and he need to send a lot of mails after user request and i dont want to leave user waiting till that function ends. - should i start new thread in portal?)
JJ -
Unable to download an Message Driven Bean Example
http://www.oracle.com/technology/sample_code/tech/java/oc4j/htdocs/oc4jsamplecode/oc4j-demo-ejb.html
In the link above try to download the example for Message Driven Bean. You can download it, but it is a "htm" file not a ear file that gets saved.
All other links open file (They all are jar files).
regards
-- Raghavan (Raag)Hello Pascal,
The following article will assist you with resetting your BlackBerry ID password: http://www.blackberry.com/btsc/KB26361
Please try logging in with the new password when prompted.
Let us know if this helps.
-FB
Come follow your BlackBerry Technical Team on Twitter! @BlackBerryHelp
Be sure to click Kudos! for those who have helped you.
Click "Accept as a Solution" for posts that have solved your issue(s)! -
WebLogic 10 and EJB 3.0 for Message Driven Bean
Hi,
I am trying to deploy Message Driven Bean using EJB3.0 on weblogic 10. I am using annotations and don't want to use deployment descriptors.
The Bean class:
CalculatorBean.java
import javax.ejb.*;
import javax.jms.*;
import java.sql.Timestamp;
import java.util.StringTokenizer;
@MessageDriven(activationConfig =
@ActivationConfigProperty(propertyName="destinationType",
propertyValue="javax.jms.Queue"),
@ActivationConfigProperty(propertyName="destination",
propertyValue="queue/mdb")
public class CalculatorBean implements MessageListener {
public void onMessage (Message msg) {
TextMessage tmsg=null;
try {
if (msg instanceof TextMessage) {
tmsg = (TextMessage) msg;
System.out.println
("MESSAGE BEAN1: Message received: "
+ tmsg.getText());
} else {
System.out.println
("Message of wrong type1: "
+ msg.getClass().getName());
catch (JMSException e) {
e.printStackTrace();
catch (Throwable te) {
te.printStackTrace();
My client:
import javax.naming.*;
import javax.naming.InitialContext;
import java.text.*;
import javax.jms.*;
public class MsgClient {
public static void main(String args[])
QueueConnection cnn=null;
QueueSender sender=null;
QueueSession sess=null;
Queue queue=null;
try {
java.util.Properties p = new java.util.Properties();
p.put("java.naming.factory.initial","weblogic.jndi.WLInitialContextFactory");
p.put("java.naming.provider.url","t3://10.6.74.79:7001");
Context ctx=new InitialContext(p);
//InitialContext ctx=new InitialContext(p);
queue = (Queue)ctx.lookup("queue/mdb");
QueueConnectionFactory factory = (QueueConnectionFactory)ctx.lookup("ConnectionFactory");
cnn = factory.createQueueConnection();
sess= cnn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
sender = sess.createSender(queue);
TextMessage message = sess.createTextMessage();
message.setText("This is message by Gurumurthy" );
System.out.println("Sending message: " +message.getText());
sender.send(message);
sess.close();
catch (Exception e)
e.printStackTrace();
I am compiling and creating jar file for this class. Then I am creating a .ear file for this.
The meta-inf/application.xml contains the following:
<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://java.sun.com/xml/ns/j2ee" version="1.4"
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/application_1_4.xsd">
<display-name>MDBWorking1</display-name>
<description>Application description</description>
<module>
<ejb>MDBWorking1.jar</ejb>
</module>
</application>
I don't want to use deployment descriptor (ejb-jar.xml or weblogic-ejb-jar-xml), because I want to utilize the annotation feature of EJB3.0
So, after creating the .ear file for this, and try to deploy on weblogic 10, I get the following error:
An error occurred during activation of changes, please see the log for details.
Exception preparing module: EJBModule(MDBWorking1.jar) Unable to deploy EJB: CalculatorBean from MDBWorking1.jar: [EJB:011113]Error: The Message Driven Bean 'CalculatorBean(Application: MDBWorking1, EJBComponent: MDBWorking1.jar)', does not have a message destination configured. The message destination must be set using a message-destination-link, destination-resource-link, destination-jndi-name or a resource-adapter-jndi-name.
Substituted for missing class [EJB - 11113]Error: The Message Driven Bean 'CalculatorBean(Application: MDBWorking1, EJBComponent: MDBWorking1.jar)', does not have a message destination configured. The message destination must be set using a message-destination-link, destination-resource-link, destination-jndi-name or a resource-adapter-jndi-name.
How to solve this?
Note:
I don't want to use Deployment Descriptor and all I want to use is EJB3.0's annotation feature.
Thanks,
GuruDear gurubbc,
I don't know if it still matters to you but you can use the javax.ejb.MessageDriven annotation to point your bean on your queue. I had the same issue like you but i could not solve it properly by switchihg to weblogic.ejb.MessageDriven.
Use the following annotation and it should work out:
@MessageDriven
(mappedName = "queue/mdb",
name = "CalculatorBean",
activationConfig = {
@ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue")
Here you can see that the mappedName is the JNDI name of the queue you are trying to connect to. The name is the name for your Bean, and the only property passed is the destination type.
Hope this helps.
Cheers,
Istvan -
Create EJB 3.0 Message Driven Bean on a Oracle JMS (AQ)
Hi, I need to develop a EJB 3.0 Message Driven Bean. The MDB has to work on a Oracle AQ using Oracle JMS. Is there any how-to document giving an example about this issue. Can you give an example how to create the JMS destination in OC4J (how to configure the Oracle JMS AQ in OC4j), issue the JMS destination via annotions (resource injection) in the MDB. Please give me a working example of the MDB and a test client to produce a message. Regards, Arjan Jorritsma
Check your ejb-jar.xml and see if it has the version of "2.1" there...
If the application was depending upon EJB 3.0 annotations but it had a ejb-jar.xml that had version set to "2.1" and there was no oracle specific descriptor (orion-ejb-jar.xml) to designate it use the resource adapter; It would expect JMS destination and connection factory that is required for a JMS-MDB set in the ejb-jar.xml. So try to change the ejb-jar.xml to update the version to "3.0", OC4J would have parsed the annotation and combined the metadata with ejb-jar.xml and it would work.
-Frances -
Hi
I am looking for pointers in building a MDB Bean, pointers in this regard, will be of great help.
Thanks
sunderhttp://www.oracle.com/technology/tech/java/oc4j/1013/how_to/index.html#JMS
Good Luck,
Avi. -
Message-driven bean destination name not found error
Hi,
I am getting this error when I attempt to deploy the Warehouse message-driven bean example/tutorial. I followed the steps in the JMS Queue Simple Sample Application included with the server to set up the queue and queue factory, but I don't think the app. is even getting that far. I can not figure out why I'm get this error. I have looked at everything I can think of, but I'm obviously missing something. Here is the error from the server log.
INFO ( 2252): JMS5015: Install JMS resources ...
INFO ( 2252): JMS5002: Binding [< JMS Destination: jms/WarehouseQueue, javax.jms.Queue, [ imqDestinationName=WarehouseQueue ] >]
INFO ( 2252): JMS5002: Binding [< JMS Connection Factory: jms/WarehouseQueueConnectionFactory, javax.jms.QueueConnectionFactory, [ imqBrokerHostName=localhost , imqBrokerHostPort=7676 ] >]
INFO ( 2252): HTTP3072: HTTP listener http-listener-1 [http://ibankdev2:80] ready to accept requests
INFO ( 2252): CORE3274: successful server startup
INFO ( 2252): CORE5053: Application onReady complete.
INFO ( 2252): MDB00044: Deploying message-driven bean [MDBApp:Warehouse], consuming from [jms/Warehouse]
SEVERE ( 2252): MDB00015: [MDBApp:Warehouse]: Message-driven bean destination name [jms/Warehouse] not found
SEVERE ( 2252): javax.naming.NameNotFoundException
javax.naming.NameNotFoundException: Warehouse not found
at com.sun.enterprise.naming.TransientContext.doLookup(TransientContext.java:185)
at com.sun.enterprise.naming.TransientContext.lookup(TransientContext.java:157)
at com.sun.enterprise.naming.TransientContext.lookup(TransientContext.java:161)
at com.sun.enterprise.naming.SerialContextProviderImpl.lookup(SerialContextProviderImpl.java:78)
at org.omg.stub.com.sun.enterprise.naming._SerialContextProviderImpl_Tie._invoke(Unknown Source)
at com.sun.corba.ee.internal.corba.ServerDelegate.dispatch(ServerDelegate.java:375)
at com.sun.corba.ee.internal.iiop.ORB.process(ORB.java:275)
at com.sun.corba.ee.internal.iiop.LocalClientRequestImpl.invoke(LocalClientRequestImpl.java:96)
at com.sun.corba.ee.internal.corba.ClientDelegate.invoke(ClientDelegate.java:237)
at com.sun.corba.ee.internal.corba.ClientDelegate.invoke(ClientDelegate.java:279)
at org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:457)
at org.omg.stub.com.sun.enterprise.naming._SerialContextProvider_Stub.lookup(Unknown Source)
at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:138)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at com.sun.ejb.containers.MessageBeanHelperBase.setup(MessageBeanHelperBase.java:317)
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.ApplicationManager.applicationDeployed(ApplicationManager.java:134)
at com.iplanet.ias.server.ApplicationManager.applicationDeployed(ApplicationManager.java:110)
at com.iplanet.ias.server.ApplicationManager.applicationDeployed(ApplicationManager.java:294)
at com.iplanet.ias.admin.event.AdminEventMulticaster.invokeApplicationDeployEventListener(AdminEventMulticaster.java:424)
at com.iplanet.ias.admin.event.AdminEventMulticaster.handleApplicationDeployEvent(AdminEventMulticaster.java:408)
at com.iplanet.ias.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:291)
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.java:536)
SEVERE ( 2252): MDB00030: [MDBApp:Warehouse]: Exception in setting up message-driven bean container: [MDBApp:Warehouse: Message-driven bean destination jms/Warehouse not found]
SEVERE ( 2252): MDB00017: [Warehouse]: Exception in creating message-driven bean container: [javax.jms.JMSException: MDBApp:Warehouse: Message-driven bean destination jms/Warehouse not found]
SEVERE ( 2252): javax.jms.JMSException
javax.jms.JMSException: MDBApp:Warehouse: Message-driven bean destination jms/Warehouse not found
at com.sun.ejb.containers.MessageBeanHelperBase.setup(MessageBeanHelperBase.java:340)
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.ApplicationManager.applicationDeployed(ApplicationManager.java:134)
at com.iplanet.ias.server.ApplicationManager.applicationDeployed(ApplicationManager.java:110)
at com.iplanet.ias.server.ApplicationManager.applicationDeployed(ApplicationManager.java:294)
at com.iplanet.ias.admin.event.AdminEventMulticaster.invokeApplicationDeployEventListener(AdminEventMulticaster.java:424)
at com.iplanet.ias.admin.event.AdminEventMulticaster.handleApplicationDeployEvent(AdminEventMulticaster.java:408)
at com.iplanet.ias.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:291)
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.java:536)
SEVERE ( 2252): EJB5090: Exception in creating EJB container [javax.jms.JMSException: MDBApp:Warehouse: Message-driven bean destination jms/Warehouse not found]
SEVERE ( 2252): appId=MDBApp moduleName=EJBModule_Warehouse_jar ejbName=Warehouse
SEVERE ( 2252): LDR5004: UnExpected error occured while creating ejb container
javax.jms.JMSException: MDBApp:Warehouse: Message-driven bean destination jms/Warehouse not found
at com.sun.ejb.containers.MessageBeanHelperBase.setup(MessageBeanHelperBase.java:340)
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.ApplicationManager.applicationDeployed(ApplicationManager.java:134)
at com.iplanet.ias.server.ApplicationManager.applicationDeployed(ApplicationManager.java:110)
at com.iplanet.ias.server.ApplicationManager.applicationDeployed(ApplicationManager.java:294)
at com.iplanet.ias.admin.event.AdminEventMulticaster.invokeApplicationDeployEventListener(AdminEventMulticaster.java:424)
at com.iplanet.ias.admin.event.AdminEventMulticaster.handleApplicationDeployEvent(AdminEventMulticaster.java:408)
at com.iplanet.ias.admin.event.AdminEventMulticaster.processEvent(AdminEventMulticaster.java:291)
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.java:536)
WARNING ( 2252): CORE5021: Application NOT loaded: [MDBApp]
WARNING ( 2252): ADM5603:Event listener error [Error while deploying application [MDBApp]. Please refer to the server log for more details. ]
My bean name is Warehouse, jms/Warehouse is the JNDI and is mapped to MDBPack.WarehouseBean.class. MDBPack is in the classpath on the server. I guessed that the physical destination name was WarehouseQueue, but using Warehouse produced the same result. Please let me know if there is anything I could be missing. TIA
--MichelleHi,
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 -
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 -
When will JDeveloper have support for Message Driven Beans? A search of the JDeveloper help on the subject found nothing.
In the meantime, is there a work-around that you can suggest for working with Message-Driven Beans in JDeveloper?
Thanks in advance for your help.Oracle9i JDeveloper (9.0.3) which is the next release will have support for EJB 2.0 including Message Driven Beans.
This release is slated for this summer.
raghu
JDev Team -
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 -
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 -
Assining Identity to Message Driven Bean
Dear All,
I have a problem on connecting MDB to JMS administered object in iPlanet server.
In the administered object I create an ACI to allows only a certain member of
group can access this ao. Disallowing anonymous user to connect to the ldap server
give me this error.
<Apr 15, 2003 1:41:09 PM SGT> <Warning> <EJB> <010096> <The Message-Driven EJB:
MessageEJB is unable to connect to the J
MS destination: cn=ocsQueue. Connection failed after 365 attempts. The MDB will
attempt to reconnect every 10 seconds, t
his log message will repeat every 600 seconds until the condition clears.>
<Apr 15, 2003 1:41:09 PM SGT> <Warning> <EJB> <010061> <The Message-Driven EJB:
MessageEJB is unable to connect to the J
MS destination: cn=ocsQueue. The EJB container will automatically attempt to re-establish
the connection with the JMS se
rver. 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:
The Message-Driven EJB attempted to connect to the JMS destination with the JNDI
name: cn=ocsQueue. However, the object
with the JNDI name: cn=ocsQueue is not a JMS destination, or the destination found
was of the wrong type (Topic or Queue
).>
How can I configure the security descriptor so that my MDB can gen a connection
to ldap to read the administered object.
I am working on WebLogic 7.0 sp1 and iPlanet
Thanks,
WayanHi Yang,
The J2EE tutorial will give some more information.
http://java.sun.com/j2ee/1.4/docs/tutorial/doc/
See Ch. 28 A Message-Driven Bean example. It has some tips on using deploytool.
Hope this helps,
J -
Message Driven Bean deployment warnings * not active
Hi I´m facing this problem, I test the queue destination with an external client and everything is ok, but then when I try to deploy the Message - Driver - bean on CE the next error comes out , any help will be appreciated.
Deploying file(s): C:Documents and Settingse100009workspace.jdi xenapjmsEAR xenapjmsEAR.ear --- Status: Deploy finished with warnings. --- Description: S U M M A R Y ~~~~~~~~~~~~~~~~~~~ Successfully deployed: 0 Deployed with warnings: 1 Failed deployments: 0 ~~~~~~~~~~~~~~~~~~~ 1. File:C:Documents and Settingse100009workspace.jdi xenapjmsEAR xenapjmsEAR.ear Name:fxenapjmsEAR Vendor:com.sap Location:localhost Version:2010.02.02.12.47.07 Deploy status:Warning Version:HIGHER Description: 1. Warning occurred on server 9111850 during update com.sap/fxenapjmsEAR : SessionsTakerTest: Following tests could not be executed because of failed precondition test "SessionsTakerTest" : Classes Exposure Check, Business Interfaces Check, file: fxenapjms.jar, column -1, line -1, severity: warning 2. Exception has been returned while the com.sap/fxenapjmsEAR was starting. Warning/Exception :[ ][[ERROR CODE DPL.DS.6193] Error while ; nested exception is: com.sap.engine.services.deploy.exceptions.ServerDeploymentException: Clusterwide exception: [server ID 9111850:The destination jmsqueues/default/sapDemoQueue cannot be looked up. Last attempt performed : jms_vendor_queues_global/jmsqueues/default/sapDemoQueue -> Path to object does not exist at jmsqueues, the whole lookup name is jms_vendor_queues_global/jmsqueues/default/sapDemoQueue. server ID 9111850:com.sap.engine.services.deploy.container.DeploymentException: Cannot activate endpoint for message-driven bean com.sap/fxenapjmsEARannotation|fxenapjms.jarannotation|fxenapmjbBean at com.sap.engine.services.ejb3.container.ContainerInterfaceImpl$Actions.perform(ContainerInterfaceImpl.java:903) at com.sap.engine.services.ejb3.container.ContainerInterfaceImpl.prepareStart(ContainerInterfaceImpl.java:435) at com.sap.engine.services.deploy.server.utils.container.ContainerWrapper.prepareStart(ContainerWrapper.java:363) at com.sap.engine.services.deploy.server.application.StartTransaction.prepareCommon(StartTransaction.java:228) at com.sap.engine.services.deploy.server.application.StartTransaction.prepare(StartTransaction.java:186) at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhasesOnOneServer(ApplicationTransaction.java:502) at com.sap.engine.services.deploy.server.application.ApplicationTransaction.makeAllPhases(ApplicationTransaction.java:544) at com.sap.engine.services.deploy.server.application.ParallelAdapter.super_MakeAllPhases(ParallelAdapter.java:286) at com.sap.engine.services.deploy.server.application.StartTransaction.makeAllPhasesImpl(StartTransaction.java:555) at com.sap.engine.services.deploy.server.application.ParallelAdapter.runInTheSameThread(ParallelAdapter.java:197) at com.sap.engine.services.deploy.server.application.ParallelAdapter.makeAllPhasesAndWait(ParallelAdapter.java:358) at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:3432) at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:3418) at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:3308) at com.sap.engine.services.deploy.server.DeployServiceImpl.startApplicationAndWait(DeployServiceImpl.java:3280) at com.sap.engine.services.dc.lcm.impl.J2EELCMProcessor.doStart(J2EELCMProcessor.java:105) at com.sap.engine.services.dc.lcm.impl.LifeCycleManagerImpl.start(LifeCycleManagerImpl.java:78) 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:91) at com.sap.engine.services.dc.cm.deploy.impl.DefaultDeployPostProcessor.postProcess(DefaultDeployPostProcessor.java:61) at com.sap.engine.services.dc.cm.deploy.impl.DeployerImpl.doPostProcessing(DeployerImpl.java:862) at com.sap.engine.services.dc.cm.deploy.impl.DeployerImpl.performDeploy(DeployerImpl.java:810) at com.sap.engine.services.dc.cm.deploy.impl.DeployerImpl.doDeploy(DeployerImpl.java:640) at com.sap.engine.services.dc.cm.deploy.impl.DeployerImpl.deploy(DeployerImpl.java:359) at com.sap.engine.services.dc.cm.deploy.impl.DeployerImpl.deploy(DeployerImpl.java:248) at com.sap.engine.services.dc.cm.deploy.impl.DeployerImplp4_Skel.dispatch(DeployerImplp4_Skel.java:897) at com.sap.engine.services.rmi_p4.DispatchImpl._runInternal(DispatchImpl.java:355) at com.sap.engine.services.rmi_p4.server.ServerDispatchImpl.run(ServerDispatchImpl.java:69) at com.sap.engine.services.rmi_p4.P4Message.process(P4Message.java:67) at com.sap.engine.services.rmi_p4.P4Message.execute(P4Message.java:41) at com.sap.engine.services.cross.fca.FCAConnectorImpl.executeRequest(FCAConnectorImpl.java:977) at com.sap.engine.services.rmi_p4.P4Message.process(P4Message.java:57) at com.sap.engine.services.cross.fca.MessageReader.run(MessageReader.java:55) at com.sap.engine.core.thread.execution.Executable.run(Executable.java:109) at com.sap.engine.core.thread.execution.CentralExecutor$SingleThread.run(CentralExecutor.java:314) Caused by: com.sap.engine.services.ejb3.container.ActionException: Cannot activate endpoint for message-driven bean com.sap/fxenapjmsEARannotation|fxenapjms.jarannotation|fxenapmjbBean 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:897) ... 35 more Caused by: javax.resource.NotSupportedException: javax.resource.spi.UnavailableException: The destination jmsqueues/default/sapDemoQueue cannot be looked up. Last attempt performed : jms_vendor_queues_global/jmsqueues/default/sapDemoQueue at com.sap.jms.resourceadapter.ResourceAdapterImpl.endpointActivation(ResourceAdapterImpl.java:128) at com.sap.engine.services.connector.jca15.EndpointActivationImpl.activateEndpoint(EndpointActivationImpl.java:531) at com.sap.engine.services.connector.jca15.EndpointActivationImpl.findResourceAdapterByName(EndpointActivationImpl.java:155) at com.sap.engine.services.connector.jca15.EndpointActivationImpl.findAdapter(EndpointActivationImpl.java:86) at com.sap.engine.services.connector.jca15.EndpointActivationImpl.activateEndpoint(EndpointActivationImpl.java:59) at com.sap.engine.services.ejb3.runtime.impl.Actions_MDBEndpointActivation.perform(Actions_MDBEndpointActivation.java:84) ... 38 more Caused by: javax.resource.spi.UnavailableException: The destination jmsqueues/default/sapDemoQueue cannot be looked up. Last attempt performed : jms_vendor_queues_global/jmsqueues/default/sapDemoQueue at com.sap.jms.resourceadapter.RaActivation.setupDestination(RaActivation.java:361) at com.sap.jms.resourceadapter.RaActivation.activate(RaActivation.java:126) at com.sap.jms.resourceadapter.ResourceAdapterImpl.endpointActivation(ResourceAdapterImpl.java:115) ... 43 more Caused by: com.sap.engine.services.jndi.persistent.exceptions.NameNotFoundException: Path to object does not exist at jmsqueues, the whole lookup name is jms_vendor_queues_global/jmsqueues/default/sapDemoQueue. at com.sap.engine.services.jndi.implserver.ServerContextImpl.getLastContainer(ServerContextImpl.java:184) at com.sap.engine.services.jndi.implserver.ServerContextImpl.lookup(ServerContextImpl.java:489) at com.sap.engine.services.jndi.implclient.ClientContext.lookup(ClientContext.java:321) at com.sap.engine.services.jndi.implclient.ClientContext.lookup(ClientContext.java:619) 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:359) ... 45 moreHi Isaac
The JMS destination jmsqueues/default/sapDemoQueue cannot be found. You have to configure the destination on the server before the deployment or you have to put the destination's declaration in file jms-resources.xml.
BR, Siarhei
Maybe you are looking for
-
How to store multiple records for one master reocrd using sequnce
dear, my question is in one form i have master block f and detail block. my question is i created one sequence and assign to master table. but i dont know how to assign that sequence to multiple record in detail table for that particular master recor
-
Airport extreme n not connecting to the internet but green light is on
Original configuration worked until a few days ago like this... Cable modem (RCA Digital by Comcast Model DHg535-2) ran into airport extreme N... into a D-Link DGS-2208 8 port switch... off to 8 different macs / printers/apple tv's/ and wireless macb
-
Can i create SalesOrder using SalesQuotation
Hi all, I want to create SalesOrder with reference using the SalesQuotation. How can i achieve this. I am using JAVA to develop this. I am using DI API to achieve this. I am creating SalesOrder directly by giving the items and their quantitie
-
Relation between BSIK,BSIK and BSEG
Hi all , 1. what we mean by the open items table (BSIK) and item table (BSAK). 2. What is the realtion between BSIK,BSAK with mm tables ..please give me the realtionship. 3. when we post in FB01 which are tables are updated 4. IF BSEG is the su
-
Can't get rid of the annoying 1.
App store has a red 1. It's for an update for Remote mouse. On the update screen it says it's already installed. Can't delete the app. Can't get the red 1 to go away. Anybody know how to fix it?