Problem deploying message driven bean using Log4j

Hello all.
Using JDeveloper 11.1.1.0.2, I'm having a problem with a message driven bean I've created and associated with a JMS queue.
I've created an EJB Module project in my application (in which some other projects exist), and created the bean. A simple test of the bean, sending a message through the jms queue and printing it on system.out in the mdb onMessage() worked just fine.
However, when I add apache commons logging to my mdb, things start to go wrong. Running the project on the integrated weblogic 10.3 server just fails during deployment, due to a NoClassDefFoundError on org/apache/log4j/Logger.
In project properties -> libraries and classpath, I've added a log4j library (Log4j-1.2.14.jar) next to Commons Logging 1.0.4 but it doesn't seem to matter anything.
The code of my message bean:
@MessageDriven(mappedName = "weblogic.wsee.DefaultQueue")
public class MyMessageBean implements MessageListener {
    // logger
    private static Log sLog = LogFactory.getLog(MyMessageBean.class);
    public void ejbCreate() {
    public void ejbRemove() {
    public void onMessage(Message message) {
        MapMessage mapmsg = null;
        try {
            if (message instanceof MapMessage) {
                mapmsg = (MapMessage)message;
                boolean msgRedelivered = mapmsg.getJMSRedelivered();
                String msgId = mapmsg.getJMSMessageID();
                if (!msgRedelivered) {
                    sLog.debug("****** Successfully received message " + msgId);
                } else {
                    sLog.debug("****** Successfully received redelivered message " + msgId);
                // Haal de inhoud op:
                int testInt = mapmsg.getInt("TestInt");
                sLog.debug("TestInt:" + testInt);
            } else {
                sLog.debug("Message of wrong type: " +
                                   message.getClass().getName());
        } catch (Exception e) {
            sLog.error("Fout in verwerken",e);           
}Does anybody have any clue as to what I might be doing wrong or missing out here?
The complete stacktrace:
5-aug-2009 12:54:44 oracle.adf.share.config.ADFConfigFactory cleanUpApplicationState
INFO: Cleaning up application state
java.lang.ExceptionInInitializerError
     at java.lang.Class.forName0(Native Method)
     at java.lang.Class.forName(Class.java:247)
     at weblogic.ejb.container.dd.xml.EjbAnnotationProcessor.processWLSAnnotations(EjbAnnotationProcessor.java:1705)
     at weblogic.ejb.container.dd.xml.EjbDescriptorReaderImpl.processWLSAnnotations(EjbDescriptorReaderImpl.java:346)
     at weblogic.ejb.container.dd.xml.EjbDescriptorReaderImpl.createReadOnlyDescriptorFromJarFile(EjbDescriptorReaderImpl.java:192)
     at weblogic.ejb.spi.EjbDescriptorFactory.createReadOnlyDescriptorFromJarFile(EjbDescriptorFactory.java:93)
     at weblogic.ejb.container.deployer.EJBModule.loadEJBDescriptor(EJBModule.java:1198)
     at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:380)
     at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93)
     at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:387)
     at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
     at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:58)
     at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:42)
     at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:615)
     at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
     at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:191)
     at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:16)
     at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:155)
     at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:60)
     at weblogic.deploy.internal.targetserver.operations.ActivateOperation.createAndPrepareContainer(ActivateOperation.java:197)
     at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doPrepare(ActivateOperation.java:89)
     at weblogic.deploy.internal.targetserver.operations.AbstractOperation.prepare(AbstractOperation.java:217)
     at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentPrepare(DeploymentManager.java:723)
     at weblogic.deploy.internal.targetserver.DeploymentManager.prepareDeploymentList(DeploymentManager.java:1190)
     at weblogic.deploy.internal.targetserver.DeploymentManager.handlePrepare(DeploymentManager.java:248)
     at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.prepare(DeploymentServiceDispatcher.java:159)
     at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doPrepareCallback(DeploymentReceiverCallbackDeliverer.java:157)
     at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$000(DeploymentReceiverCallbackDeliverer.java:12)
     at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$1.run(DeploymentReceiverCallbackDeliverer.java:45)
     at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
     at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
     at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
Caused by: org.apache.commons.logging.LogConfigurationException: org.apache.commons.logging.LogConfigurationException: No suitable Log constructor [Ljava.lang.Class;@51b296 for org.apache.commons.logging.impl.Log4JLogger (Caused by java.lang.NoClassDefFoundError: org/apache/log4j/Logger) (Caused by org.apache.commons.logging.LogConfigurationException: No suitable Log constructor [Ljava.lang.Class;@51b296 for org.apache.commons.logging.impl.Log4JLogger (Caused by java.lang.NoClassDefFoundError: org/apache/log4j/Logger))
     at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:543)
     at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
     at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209)
     at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
     at nl.justid.dolores.mdb.MyMessageBean.<clinit>(MyMessageBean.java:19)
     ... 32 more
Caused by: org.apache.commons.logging.LogConfigurationException: No suitable Log constructor [Ljava.lang.Class;@51b296 for org.apache.commons.logging.impl.Log4JLogger (Caused by java.lang.NoClassDefFoundError: org/apache/log4j/Logger)
     at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:413)
     at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529)
     ... 36 more
Caused by: java.lang.NoClassDefFoundError: org/apache/log4j/Logger
     at java.lang.Class.getDeclaredConstructors0(Native Method)
     at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
     at java.lang.Class.getConstructor0(Class.java:2699)
     at java.lang.Class.getConstructor(Class.java:1657)
     at org.apache.commons.logging.impl.LogFactoryImpl.getLogConstructor(LogFactoryImpl.java:410)
     ... 37 more
Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Logger
     at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
     at java.security.AccessController.doPrivileged(Native Method)
     at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
     at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
     ... 42 more
<5-aug-2009 12:54:44 uur CEST> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1249469684085' for task '14'. Error is: 'weblogic.application.ModuleException: Exception preparing module: EJBModule(Dolores-MessageBeans-ejb)
[EJB:011023]An error occurred while reading the deployment descriptor. The error was:
null.'
weblogic.application.ModuleException: Exception preparing module: EJBModule(Dolores-MessageBeans-ejb)
[EJB:011023]An error occurred while reading the deployment descriptor. The error was:
null.
     at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:452)
     at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93)
     at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:387)
     at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
     at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:58)
     Truncated. see log file for complete stacktrace
java.lang.ClassNotFoundException: org.apache.log4j.Logger
     at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
     at java.security.AccessController.doPrivileged(Native Method)
     at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
     Truncated. see log file for complete stacktrace
>
5-aug-2009 12:54:44 oracle.adf.share.config.ADFConfigFactory cleanUpApplicationState
INFO: Cleaning up application state
<5-aug-2009 12:54:44 uur CEST> <Warning> <Deployer> <BEA-149004> <Failures were detected while initiating deploy task for application 'Dolores'.>
<5-aug-2009 12:54:44 uur CEST> <Warning> <Deployer> <BEA-149078> <Stack trace for message 149004
weblogic.application.ModuleException: Exception preparing module: EJBModule(Dolores-MessageBeans-ejb)
[EJB:011023]An error occurred while reading the deployment descriptor. The error was:
null.
     at weblogic.ejb.container.deployer.EJBModule.prepare(EJBModule.java:452)
     at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:93)
     at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:387)
     at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
     at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:58)
     Truncated. see log file for complete stacktrace
java.lang.ClassNotFoundException: org.apache.log4j.Logger
     at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
     at java.security.AccessController.doPrivileged(Native Method)
     at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
     at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
     Truncated. see log file for complete stacktrace
>
[Deployer:149034]An exception occurred for task [Deployer:149026]deploy application Dolores on DefaultServer.: Exception preparing module: EJBModule(Dolores-MessageBeans-ejb)
[EJB:011023]An error occurred while reading the deployment descriptor. The error was:
null..
weblogic.application.ModuleException: Exception preparing module: EJBModule(Dolores-MessageBeans-ejb)
[EJB:011023]An error occurred while reading the deployment descriptor. The error was:
null.
####  Deployment incomplete.  ####    Aug 5, 2009 12:54:44 PM
oracle.jdeveloper.deploy.DeployException
     at oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer.doDeploymentAction(Jsr88RemoteDeployer.java:247)
     at oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer.deployImpl(Jsr88RemoteDeployer.java:157)
     at oracle.jdeveloper.deploy.common.AbstractDeployer.deploy(AbstractDeployer.java:94)
     at oracle.jdevimpl.deploy.fwk.WrappedDeployer.deployImpl(WrappedDeployer.java:39)
     at oracle.jdeveloper.deploy.common.AbstractDeployer.deploy(AbstractDeployer.java:94)
     at oracle.jdeveloper.deploy.common.BatchDeployer.deployImpl(BatchDeployer.java:82)
     at oracle.jdeveloper.deploy.common.AbstractDeployer.deploy(AbstractDeployer.java:94)
     at oracle.jdevimpl.deploy.fwk.WrappedDeployer.deployImpl(WrappedDeployer.java:39)
     at oracle.jdeveloper.deploy.common.AbstractDeployer.deploy(AbstractDeployer.java:94)
     at oracle.jdevimpl.deploy.fwk.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:436)
     at oracle.jdeveloper.deploy.DeploymentManager.deploy(DeploymentManager.java:209)
     at oracle.jdevimpl.runner.adrs.AdrsStarter$5$1.run(AdrsStarter.java:1365)
Caused by: oracle.jdeveloper.deploy.DeployException
     at oracle.jdevimpl.deploy.common.Jsr88DeploymentHelper.deployApplication(Jsr88DeploymentHelper.java:413)
     at oracle.jdevimpl.deploy.common.Jsr88RemoteDeployer.doDeploymentAction(Jsr88RemoteDeployer.java:238)
     ... 11 more
Caused by: oracle.jdeveloper.deploy.DeployException: Deployment Failed
     at oracle.jdevimpl.deploy.common.Jsr88DeploymentHelper.deployApplication(Jsr88DeploymentHelper.java:395)
     ... 12 more
#### Cannot run application Dolores due to error deploying to DefaultServer.
[Application Dolores stopped and undeployed from Server Instance DefaultServer]Thanks in advance!
Greetings,
Eelse
Edited by: Eelse on Aug 5, 2009 1:57 PM
Edited by: Eelse on Aug 5, 2009 5:39 PM

Creating a new deployment profile (EAR) and including the original deployment (JAR) and the needed libraries (in a lib-directory) solved the problem.

Similar Messages

  • How To Deploy Message Driven Beans in SAPJ2ee 6.20?

    <b>How To Deploy Message Driven Beans in SAPJ2ee 6.20?
    </b> 
    I<b> tried to deploy default example from SAPJ2ee installation,
    I do the prerequisites provided by tutorial, but at phase deployment appears Exception that ejb-jar.xml is incorrect</b><b><i><u>How can i do succes deployment?</u></i></b>
    <i>Thanks.</i>ps I work with this in a project , and it have more importance for us

    Hi Bogdan,
    Message-driven beans are not fully supported in J2EE Engine 6.20. However, simple examples should work. Especially the default example Could you please post the original exception if possible?

  • Error deploying Message driven beans

    hi everyone,
    I am getting the following error while migrating an application from Websphere to SAP Web AS.
    I am trying to used XSD(ejb-jar_2_1.xsd) instead of DTD(ejb-jar_2_0.dtd).
    The error is --
    Cannot parse persistent.xml or storage.xml
    Reason: com.sap.engine.services.deploy.exceptions.BaseWrongStructureException: <b>Incorrect element. Expected: entity | session, found: message-driven..</b>
    It seems it is not expecting a message-driven tag.
    Why is this happening?
    Can anyone please help..
    thanks in advance,
    Abhijit

    hi Myriana,
    Thanks for your response..
    Yes it is a strange error.
    It seems it is not able to recognise the "message-driven" error. Looking at the error it also seems that it is able to find and parse the XSD.
    When i tried with DTD it works fine.
    Is it so that SAP WebAS that comes with with Netweaver 4 does not support message-driven beans while using XSD?
    From this error i think it is so..
    Also I got some similar problem while using <local> and <local-home> tags.
    regards,
    Abhi

  • Message-Driven Bean using @Resource annotation

    I am trying to run a Message-Driven Bean very simple example in https://glassfish.dev.java.net/javaee5/ejb/examples/MDB.html
    I configured MDBQueueConnectionFactory and MDBQueue properly on glassfish admin console.
    I cannot run the example using @Resource annotation. I don't understand why.
    @Resource(mappedName="MDBQueueConnectionFactory")
    private static QueueConnectionFactory queueCF;
    @Resource(mappedName="MDBQueue")
    private static Queue mdbQueue;But I can run this example modifying the source code using InitialContext instance and looking up for JMS Resources.
    InitialContext ctx = new InitialContext();
    QueueConnectionFactory queueCF=(QueueConnectionFactory)ctx.lookup("MDBQueueConnectionFactory");
    QueueConnection queueCon = queueCF.createQueueConnection();
    Queue mdbQueue=(Queue)ctx.lookup("MDB");
    queueSender.send(mdbQueue, msg);
    ...I want to figure out why @Resource annotation do not work well. Any help?
    Thanks in advanced any help.

    Thanks for your reply.
    The error that I get is a simple NullPointerException. Nothing else.
    Like you said, I develop a servlet and I can use @Resource annotation without static reference, and it works.
    public class TestMDB extends HttpServlet {
         private static final long serialVersionUID = 1L;
         @Resource(mappedName="MDBQueueConnectionFactory")
         private QueueConnectionFactory queueCF;
         @Resource(mappedName="MDB")
         private Queue mdbQueue;
         protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
              PrintWriter out = response.getWriter();
              out.println("TEST MDB "+queueCF);
              QueueConnection queueCon;
              try {
                   queueCon = queueCF.createQueueConnection();
                   QueueSession queueSession = queueCon.createQueueSession
                   (false, Session.AUTO_ACKNOWLEDGE);
                   QueueSender queueSender = queueSession.createSender(null);
                   TextMessage msg = queueSession.createTextMessage("hello");
                   queueSender.send(mdbQueue, msg);
                   out.println("Sent message to MDB");
                   queueCon.close();
              } catch (JMSException e) {
                   e.printStackTrace();
    }But my question were about using @Resource annotation on a standalone client. I always get NullPointerException.
    public class MDBClient {
        @Resource(mappedName="MDBQueueConnectionFactory")
        private static QueueConnectionFactory queueCF;
        @Resource(mappedName="MDB")
        private static Queue mdbQueue;
        public static void main(String args[]) {
         try {
                QueueConnection queueCon = queueCF.createQueueConnection();
                QueueSession queueSession = queueCon.createQueueSession
                    (false, Session.AUTO_ACKNOWLEDGE);
                QueueSender queueSender = queueSession.createSender(null);
                TextMessage msg = queueSession.createTextMessage("hello");
                queueSender.send(mdbQueue, msg);
                System.out.println("Sent message to MDB");
                queueCon.close();
            } catch(Exception e) {
                e.printStackTrace();
    }

  • Problem with Message Driven beans

    Hi
    We are Using Oracle App server 9.0.4.X... and i came across some problem.
    We are also using JMS Queue to send and received asynchronous messages. for that we used Oracle AQ as a messaging system.
    when Queue receives a message then the respective MDB will fire and do some Business Process.
    Now the problem is sometimes MDB is going to be an idle stage and its not firing when queue receives the messages.
    Please advise me what needs to be done.
    Thanks in advance,

    Hi shanu, thanks for your reply,
    Yes I configured the JMS Objects in my AS before deploying the MDB.
    I set
    - a Queue: RFIDLocatorQueue
    - a connection Factory: RFIDLocatorConnectionFactory
    - and a Physical destination for my logical queue called: RFIDLocatorPhysicalQueue
    The latter was linked to the RFIDLocatorQueue by putting RFIDLocatorPhysicalQueue in the name parameter of the RFIDLocatorQueue.
    Is there maybe something else I forgot to configure ?
    thanks a lot

  • Sample Message Driven Bean using Oracle Advance Queuing

    Hi,
    Can someone please provide me with sample MDB using Oracle Advance Queuing to Enqueue & Dequeue messages?
    Thanks

    Write your email Id .....I have got a test case which basically enqueus and dequeues the messages using Oracle9i AQ..
    --Venky                                                                                                                                                                                                                                                                   

  • 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,
    Guru

    Dear 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

  • Messenger service using message driven beans

    I need to implement a implement a messenger service. (using Messaging server, Message Queue, Message Clients and Message Driven Beans)
    using netbeans 5.5
    it should develop using EJB 3.0 architeture.
    Can pls tell...how should i start this.(Basic steps of doing this)
    Where should we write the Messaging server.(in a EJB 3.0 application...Is it?)
    Any tutorial regrading this....!

    EJBs and Message Driven Part.
    what should i develop first. Messaging server OR Message Queue
    How can i develop the Messaging Server. Do i need to use Message driven beans there?
    Message was edited by:
    jugp

  • Exception in setting up message-driven bean container: [MQJMS1010: not impl

    Problem
    =======
    We are trying to configure and deploy a Message Driven
    Bean to listen on a WebSphere MQ queue, using LDAP to
    share knowledge of the Queue & Connection Factory.
    But when we start the Sun One domain we get an exception:
    javax.jms.JMSException: MQJMS1010: not implemented
    (see log file at the end of this email)
    Can anybody help please ?
    The configuration of the various components are listed
    below:
    WebSphere MQ Configuration
    ==========================
    Version 5.3
    Queue Manager
    QM_Test
    Queues
    PATH_MFP.Case.Request           
         Queue Type:     Local
    Channels
    Channel_Test               
         Channel Type:     Server Connection
         Protocol Type:     TCP/IP
    LDAP configuration
    ==================
    ldap://localhost/o=mqtest
    cn=MFP_LOCAL_Factory
    javaFactory=com.ibm.mq.jms.MQQueueConnectionFactoryFactory
    javaClassName=com.ibm.mq.jms.MQQueueConnectionFactory
    javaReferenceAddress=#3#QMGR#QM_Test
    javaReferenceAddress=#6#CHAN#Channel_Test
    javaReferenceAddress=#14#TM#SYSTEM.DEFAULT.MODEL.QUEUE
    cn=MFP_LOCAL_Case_Request_Queue
    javaFactory=com.ibm.mq.jms.MQQueueFactory
    javaClassName=com.ibm.mq.jms.MQQueue
    javaReferenceAddress=#9#QU#PATH_MFP.Case.Request
    javaReferenceAddress=#10#QMGR#QM_Test
    EJB configuration
    =================
    ejb-jar.xml
         <message-driven>
    <display-name>ServerMessageDrivenBean</display-name>
    <ejb-name>ServerMessageDrivenBean</ejb-name>
         <ejb-class>nz.co.acc.emi.server.connector.mdb.ServerMessageDrivenBean</ejb-class>
         <transaction-type>Container</transaction-type>
    <message-driven-destination>
              <destination-type>javax.jms.Queue</destination-type>
    </message-driven-destination>
         </message-driven>
    sun-ejb-jar.xml
    <ejb>
         <ejb-name>ServerMessageDrivenBean</ejb-name>
    <jndi-name>MFP_LOCAL_Case_Request_Queue</jndi-name>
         <mdb-connection-factory>
              <jndi-name>MFP_LOCAL_Factory</jndi-name>
         </mdb-connection-factory>
         </ejb>
    Sun One configuration
    =====================
    MFPProcessing: JNDI: External Resources
    MFP_LOCAL_Factory          Enabled javax.jms.QueueConnectionFactory
         JNDI Name:      MFP_LOCAL_Factory
         Resource Type:     javax.jms.QueueConnectionFactory
         JNDI Lookup:     cn=MFP_LOCAL_Factory
         Factoryclass:     com.sun.jndi.ldap.LdapCtxFactory
         Properties:
              java.naming.provider.url          ldap://localhost:389/o=mqtest
              java.naming.security.authentication     none
    MFP_LOCAL_Case_Request_Queue     Enabled javax.jms.Queue
         JNDI Name:      MFP_LOCAL_Case_Request_Queue
         Resource Type:     javax.jms.Queue
         JNDI Lookup:     cn=MFP_LOCAL_Case_Request_Queue
         Factoryclass:     com.sun.jndi.ldap.LdapCtxFactory
         Properties:
              java.naming.provider.url          ldap://localhost:389/o=mqtest
    server.xml
    <mdb-container steady-pool-size="10" pool-resize-quantity="2" max-pool-size="60" idle-timeout-in-seconds="600" monitoring-enabled="true" log-level="FINEST" />
    <jms-service port="1240" admin-user-name="admin" admin-password="admin" init-timeout-in-seconds="30" enabled="true" log-level="FINE" />
    Sun One log file
    ================
    server.log
    [01/Mar/2004:10:06:48] INFO ( 657): CORE1116: Sun ONE Application Server 7.0.0_01
    [01/Mar/2004:10:06:51] INFO ( 657): CORE5076: Using [Java HotSpot(TM) Server VM, Version 1.4.2_01] from [Sun Microsystems Inc.]
    [01/Mar/2004:10:07:09] INFO ( 657): JMS5023: JMS service successfully started. Instance Name = domain1_MFPProcessing, Home = [C:/Sun/AppServer7/imq/bin].
    [01/Mar/2004:10:07:13] INFO ( 657): JTS5014: Recoverable JTS instance, serverId = [100]
    [01/Mar/2004:10:07:14] INFO ( 657): RAR5060: Install JDBC Datasources ...
    [01/Mar/2004:10:07:14] INFO ( 657): RAR5059: Binding [JDBC DataSource Name: jdbc/MfsDataSourceJConn, Pool Name: MFSConnectionPool]
    [01/Mar/2004:10:07:15] INFO ( 657): JMS5015: Install JMS resources ...
    [01/Mar/2004:10:07:47] WARNING ( 657): [EntityContainer] Created EntityContainer....
    [01/Mar/2004:10:07:49] INFO ( 657): LDR5010: All ejb(s) of [mfs] loaded successfully!
    [01/Mar/2004:10:07:52] INFO ( 657): MDB00044: Deploying message-driven bean [emi:ServerMessageDrivenBean], consuming from [MFP_LOCAL_Case_Request_Queue]
    [01/Mar/2004:10:07:52] FINE ( 657): Messages delivery is part of a container-managed tx
    [01/Mar/2004:10:07:52] FINE ( 657): emi:ServerMessageDrivenBean:reconnect-delay-in-seconds=60, reconnect-max-retries=60, reconnect-enabled=true
    [01/Mar/2004:10:07:53] INFO ( 657): MDB00028: [emi:ServerMessageDrivenBean]: Message-driven bean container using external connection factory object: [com.ibm.mq.jms.MQQueueConnectionFactory]
    [01/Mar/2004:10:07:55] FINE ( 657): emi:ServerMessageDrivenBean: Setting message-driven bean pool max-pool-size=60, steady-pool-size=10, pool-resize-quantity=2, idle-timeout-in-seconds=600
    [01/Mar/2004:10:07:55] FINE ( 657): Initializing server session factory
    [01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@11576d7
    [01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@2d5534
    [01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@34d75f
    [01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@127d15e
    [01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@12297d7
    [01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@1ecfeb
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@11576d7
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@2d5534
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@34d75f
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@127d15e
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@12297d7
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@1ecfeb
    [01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@e4776b
    [01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@15c458c
    [01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@da1515
    [01/Mar/2004:10:07:55] FINE ( 657): Created server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@19e3e24
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@e4776b
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@15c458c
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@da1515
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): before wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@19e3e24
    [01/Mar/2004:10:07:55] INFO ( 657): MDB0001: Create message-driven bean pool with maximum pool size [60], bean idle timeout [600] seconds
    [01/Mar/2004:10:07:55] SEVERE ( 657): MDB00030: [emi:ServerMessageDrivenBean]: Exception in setting up message-driven bean container: [MQJMS1010: not implemented]
    [01/Mar/2004:10:07:55] FINE ( 657): MDB00018: [emi:ServerMessageDrivenBean]: Closing message-driven bean container connection
    [01/Mar/2004:10:07:55] WARNING ( 657): [AbstractPool]: Cancelled pool timer task at: Mon Mar 01 10:07:55 NZDT 2004
    [01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@11576d7
    [01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@11576d7
    [01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@2d5534
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@2d5534
    [01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@2d5534
    [01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@34d75f
    [01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@34d75f
    [01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@127d15e
    [01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@127d15e
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@127d15e
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@11576d7
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@34d75f
    [01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@12297d7
    [01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@12297d7
    [01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@1ecfeb
    [01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@1ecfeb
    [01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@e4776b
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@e4776b
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@12297d7
    [01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@e4776b
    [01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@15c458c
    [01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@15c458c
    [01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@da1515
    [01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@da1515
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@1ecfeb
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@15c458c
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@da1515
    [01/Mar/2004:10:07:55] FINEST ( 657): Thread[main,5,main]: in cleanup() ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@19e3e24
    [01/Mar/2004:10:07:55] FINE ( 657): Destroyed server session: com.iplanet.ias.ejb.containers.IASServerSessionImpl@19e3e24
    [01/Mar/2004:10:07:55] SEVERE ( 657): MDB00017: [ServerMessageDrivenBean]: Exception in creating message-driven bean container: [javax.jms.JMSException: MQJMS1010: not implemented]
    [01/Mar/2004:10:07:55] FINEST ( 657): run(): after wait ... com.iplanet.ias.ejb.containers.IASServerSessionImpl@19e3e24
    [01/Mar/2004:10:07:55] SEVERE ( 657): javax.jms.JMSException
    javax.jms.JMSException: MQJMS1010: not implemented
         at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:418)
         at com.ibm.mq.jms.MQQueueConnection.createConnectionConsumer(MQQueueConnection.java:602)
         at com.sun.enterprise.jms.ConnectionWrapperBase.createConnectionConsumer(ConnectionWrapperBase.java:151)
         at com.sun.ejb.containers.MessageBeanHelperQueueImpl.doSetup(MessageBeanHelperQueueImpl.java:67)
         at com.sun.ejb.containers.MessageBeanHelperBase.setup(MessageBeanHelperBase.java:419)
         at com.sun.ejb.containers.MessageBeanContainer.<init>(MessageBeanContainer.java:206)
         at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:173)
         at com.iplanet.ias.server.AbstractLoader.loadEjbs(AbstractLoader.java:345)
         at com.iplanet.ias.server.ApplicationLoader.load(ApplicationLoader.java:81)
         at com.iplanet.ias.server.AbstractManager.load(AbstractManager.java:134)
         at com.iplanet.ias.server.ApplicationLifecycle.onStartup(ApplicationLifecycle.java:168)
         at com.iplanet.ias.server.ApplicationServer.onStartup(ApplicationServer.java:269)
         at com.iplanet.ias.server.J2EERunner.confPostInit(J2EERunner.java:162)
    [01/Mar/2004:10:07:55] SEVERE ( 657): EJB5090: Exception in creating EJB container [javax.jms.JMSException: MQJMS1010: not implemented]
    [01/Mar/2004:10:07:55] SEVERE ( 657): appId=emi moduleName=emiEjb_jar ejbName=ServerMessageDrivenBean
    [01/Mar/2004:10:07:55] SEVERE ( 657): LDR5004: UnExpected error occured while creating ejb container
    javax.jms.JMSException: MQJMS1010: not implemented
         at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:418)
         at com.ibm.mq.jms.MQQueueConnection.createConnectionConsumer(MQQueueConnection.java:602)
         at com.sun.enterprise.jms.ConnectionWrapperBase.createConnectionConsumer(ConnectionWrapperBase.java:151)
         at com.sun.ejb.containers.MessageBeanHelperQueueImpl.doSetup(MessageBeanHelperQueueImpl.java:67)
         at com.sun.ejb.containers.MessageBeanHelperBase.setup(MessageBeanHelperBase.java:419)
         at com.sun.ejb.containers.MessageBeanContainer.<init>(MessageBeanContainer.java:206)
         at com.sun.ejb.containers.ContainerFactoryImpl.createContainer(ContainerFactoryImpl.java:173)
         at com.iplanet.ias.server.AbstractLoader.loadEjbs(AbstractLoader.java:345)
         at com.iplanet.ias.server.ApplicationLoader.load(ApplicationLoader.java:81)
         at com.iplanet.ias.server.AbstractManager.load(AbstractManager.java:134)
         at com.iplanet.ias.server.ApplicationLifecycle.onStartup(ApplicationLifecycle.java:168)
         at com.iplanet.ias.server.ApplicationServer.onStartup(ApplicationServer.java:269)
         at com.iplanet.ias.server.J2EERunner.confPostInit(J2EERunner.java:162)
    [01/Mar/2004:10:07:55] WARNING ( 657): CORE5021: Application NOT loaded: [emi]
    [01/Mar/2004:10:07:55] INFO ( 657): WEB0100: Loading web module [mfs:mfs.war] in virtual server [MFPProcessing] at [mfs]
    [01/Mar/2004:10:08:31] INFO ( 657): HTTP3072: HTTP listener http-listener-1 [http://ch042dysz0405:1080] ready to accept requests
    [01/Mar/2004:10:08:31] INFO ( 657): CORE3274: successful server startup
    [01/Mar/2004:10:08:33] INFO ( 657): CORE5053: Application onReady complete.

    Hi,
    You have not created the jms destination queue object
    jms/Warehouse
    Your server logs says it cannot find the destination queue object.It has got nothing to do with jndi name of your bean
    Create jms destination queue object using
    asadmin>create-jms-resource instance <instance_name> resourcetype javax.jms.Queue --property imqDestinationName=<NAme>  jms/Warehouse
    Then use list-jms-resources <instance_name> to
    find if jms/Warehouse destionation queue object has been created.
    Get back in case of any issues

  • Creating a Message-Driven Bean in 10.1.3

    I have been trying to create a Message-Driven Bean using the wizard but when I tried to deploy it to the stand-alone OC4J, I always got the null pointer exception:
    Caused by: java.lang.NullPointerException
    at com.evermind.server.ApplicationContext.unprivileged_lookup(ApplicationContext.java:227)
    at com.evermind.server.ApplicationContext.lookup(ApplicationContext.java:199)
    at com.evermind.server.ejb.deployment.EJBPackage.parseOrionAssemblyDescriptor(EJBPackage.java:973)
    I am using EJB 2.1, the default jms/QueueConnectionFactory and jms/demoQueue.
    I have been trying to find some simple examples and tutorials to do it but have been unsuccessful. Could somebody please point me to the right direction?

    After spending many hours reading the documentation, I have finally created a MDB that works. The original problem was due to the wizard not updating the orion-ejb-jar.xml file. This I had to do manually.
    I am now trying to use this MDB to process a JMS Web Service, created by using the Web Service wizard. I use the demoQueue for the send operation and demoTopic for the receive operation. I could only get this to work provided I generated a J2EE 1.3 (Oracle) Web Service. If I generated a J2EE 1.4 (JAX-RPC), I had two problems:
    1. If I only filled in the send but not the receive details, an error saying cannot locate the JMS resource was returned when I called a send operation. I shouldn't need to fill in the receive details as I was only trying to issue a send call.
    2. If I also filled in the receive details, then the send request hanged.
    In both cases, I could not see my MDB being activated.
    If I switched to J2EE 1.3 option, then both the send and receive operations would work.
    Could anybody give me any advices?

  • "Message Driven Bean" doesn't work with Sun App Server

    Hello all,
    i have a little bit problems, running a simple "Message Driven Bean" under the Sun App Server. The deployment of it works fine, but after starting the SUN App Server i get the following error message:
    An error occurred during the message-driven beancontainer initialization at runtime. The most common cause for this is that the physical resource(e.g. Queue) from which the message-driven bean is consuming either does not exist or has been configured incorrectly. Another common error is that the message-driven bean implementation class does not correctly implement the required javax.ejb.MessageBean or MessageListener interfaces.
    Has anybody a workaround for this problem?
    The queue seems to be correctly installed. A simple client programm from the Sun Tutorial (Consumer & Producer) works fine without any Errors or Exceptions.
    I am a little bit confused, because the queue seems to work with the client programms but not with a MDB running on the SUN App Server.
    Thanks for you help!
    Greetings
    Manuel

    Hello Mr Manuel!
    could you plz help me with the steps for creating a message driven bean using netbeans ver 5.0(with Sun Java� System Application Server Platform Edition 8.2 )
    I just know how to work with Session beans & Entity Bean, and am try to learn to work on Message Driven Beans too. there are no proper tutorials where i can find steps for creating these..
    I need the steps from the scratch.,like creating QueueConnection Factory & Destination etc..
    It will be gr8 if you can help me with this at the earliest .
    Thank you
    Bye

  • 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
    --Michelle                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Hi,
    You have not created the jms destination queue object
    jms/Warehouse
    Your server logs says it cannot find the destination queue object.It has got nothing to do with jndi name of your bean
    Create jms destination queue object using
    asadmin>create-jms-resource instance <instance_name> resourcetype javax.jms.Queue --property imqDestinationName=<NAme>  jms/Warehouse
    Then use list-jms-resources <instance_name> to
    find if jms/Warehouse destionation queue object has been created.
    Get back in case of any issues

  • Is Message Driven Beans Supported in iAS 6.5?

    Hello Everybody,
    Admin guide of iAS 6.5 speaks about using Message driven beans (mdb). It also says that iAS 6.5 supports EJB 1.1 specification. But, EJB 1.1 specification doesnt support mdbs. Only EJB 2.0 does this. Then how come iAS 6.5 supports mdb, when it says that it is EJB 1.1 complaint and not EJB 2.0 complaint.
    Please clear this doubt for me.
    regards,
    desigan

    It is me who is posting again.
    This is what provided in the Developer guide. I have just read it.
    "iPlanet Application Server, Enterprise Edition 6.5, provides support for deploying message-driven beans. This implementation is based on the EJB 2.0 specifications,
    and is for developer use only. The message-driven bean infrastructure in this release has not been tested in a production environment."
    regards,
    desigan

  • Javax.naming.NameNotFoundException while Message driven bean

    I am adding a message driven bean in to my EJB application and trying
    to deploy it in the WebLogic 6.0 server.
    Now please let me know is there any other step i am missing.
    1) This is what i have added in my ejb-jar.xml
    <enterprise-beans>
         <message-driven>
              <description>no description</description>
              <display-name>ActivatorBean</display-name>
              <ejb-name>ActivatorBean</ejb-name>
              <ejb-class>com.savvion.bizlogic.server.ActivatorBean</ejb-class>
              <transaction-type>Container</transaction-type>
              <message-driven-destination>
                   <jms-destination-type>javax.jms.Queue</jms-destination-type>
              </message-driven-destination>
              <security-identity>
                   <description/>
                   <run-as-specified-identity>
                   <description/>
                   <role-name/>
                   </run-as-specified-identity>
              </security-identity>
         </message-driven>
    2) I am adding this is in the weblogic-ejb.xml
    <weblogic-enterprise-bean>
         <ejb-name>ActivatorBean</ejb-name>
         <message-driven-descriptor>
                             <destination-jndi-name>MyMessageQueueFactory</destination-jndi-name>
         </message-driven-descriptor>
         <transaction-descriptor>
              <trans-timeout-seconds>1200</trans-timeout-seconds>
         </transaction-descriptor>
         <jndi-name>MessageQueue</jndi-name>
         </weblogic-enterprise-bean>
    anything else which needs to added in WebLogic-ejb.xml or in config.xml
    because as per the following error message there should be some
    entry in config.xml.
    onemore thing i am little bit confused in
    <destination-jndi-name>MyMessageQueueFactory</destination-jndi-name>
    and
    <jndi-name>MessageQueue</jndi-name>
    and when i deploed this in WebLogic got this error message on the
    prompt
    <Error> <J2EE> <Error deploying EJB Component : LEngine
    weblogic.ejb20.EJBDeploymentException: Error deploying Message-Driven
    Bean,
    couldn't find Queue 'MyMessageQueueFactory'. Make sure it was declared
    in your config.xml.
    ; nested exception is:
    javax.naming.NameNotFoundException: Unable to resolve MyMessageQueueFactory.
    Resolved: '' Unresolved:'MyMessageQueueFactory' ; remaining name
    javax.naming.NameNotFoundException: Unable to resolve MyMessageQueueFactory.
    Reso
    lved: '' Unresolved:'MyMessageQueueFactory' ; remaining name ''
    <<no stack trace available>>
    >
    <Error> <J2EE> <Error deploying application
    WFEngine: Could not deploy: 'xyz.jar'
    Possible reasons include:
    1. The bean or an interface class has been modified but
    the deployment descriptor has not been updated
    2. The database mappings in the deployment descriptor do not
    match the database definition
    3. The jar file is not a valid jar file
    4. The jar file does not contain a valid bean>
    Thanks
    Naresh

    I am adding a message driven bean in to my EJB application and trying
    to deploy it in the WebLogic 6.0 server.
    Now please let me know is there any other step i am missing.
    1) This is what i have added in my ejb-jar.xml
    <enterprise-beans>
         <message-driven>
              <description>no description</description>
              <display-name>ActivatorBean</display-name>
              <ejb-name>ActivatorBean</ejb-name>
              <ejb-class>com.savvion.bizlogic.server.ActivatorBean</ejb-class>
              <transaction-type>Container</transaction-type>
              <message-driven-destination>
                   <jms-destination-type>javax.jms.Queue</jms-destination-type>
              </message-driven-destination>
              <security-identity>
                   <description/>
                   <run-as-specified-identity>
                   <description/>
                   <role-name/>
                   </run-as-specified-identity>
              </security-identity>
         </message-driven>
    2) I am adding this is in the weblogic-ejb.xml
    <weblogic-enterprise-bean>
         <ejb-name>ActivatorBean</ejb-name>
         <message-driven-descriptor>
                             <destination-jndi-name>MyMessageQueueFactory</destination-jndi-name>
         </message-driven-descriptor>
         <transaction-descriptor>
              <trans-timeout-seconds>1200</trans-timeout-seconds>
         </transaction-descriptor>
         <jndi-name>MessageQueue</jndi-name>
         </weblogic-enterprise-bean>
    anything else which needs to added in WebLogic-ejb.xml or in config.xml
    because as per the following error message there should be some
    entry in config.xml.
    onemore thing i am little bit confused in
    <destination-jndi-name>MyMessageQueueFactory</destination-jndi-name>
    and
    <jndi-name>MessageQueue</jndi-name>
    and when i deploed this in WebLogic got this error message on the
    prompt
    <Error> <J2EE> <Error deploying EJB Component : LEngine
    weblogic.ejb20.EJBDeploymentException: Error deploying Message-Driven
    Bean,
    couldn't find Queue 'MyMessageQueueFactory'. Make sure it was declared
    in your config.xml.
    ; nested exception is:
    javax.naming.NameNotFoundException: Unable to resolve MyMessageQueueFactory.
    Resolved: '' Unresolved:'MyMessageQueueFactory' ; remaining name
    javax.naming.NameNotFoundException: Unable to resolve MyMessageQueueFactory.
    Reso
    lved: '' Unresolved:'MyMessageQueueFactory' ; remaining name ''
    <<no stack trace available>>
    >
    <Error> <J2EE> <Error deploying application
    WFEngine: Could not deploy: 'xyz.jar'
    Possible reasons include:
    1. The bean or an interface class has been modified but
    the deployment descriptor has not been updated
    2. The database mappings in the deployment descriptor do not
    match the database definition
    3. The jar file is not a valid jar file
    4. The jar file does not contain a valid bean>
    Thanks
    Naresh

  • Message Driven Beans: how to receive and send in a single session?

    Hello
    How to receive and send JMS messages in a message driven bean using a single session?
    Thanks.

    Are you referring to writing code within the onMessage method itself to receive JMS messages?
    If so, that is not a pattern that is recommended, especially not in the case of a blocking JMS
    receieve. If you must write an explicit JMS receive within an EJB component it's best to use
    a "check the queue" approach where you give a very small timeout for the receive. That way
    if the message is there it will be returned but if not the call will not block.
    You'll also need to take the transactional settings of the onMessage method into account.
    If your are sending a message and then waiting for a response, those two actions can
    not be done within the same global transaction. For that, you'll need to either use
    BMT and perform each in its own transaction or just not use global transactions at all,
    in which case each send and receive operation will be atomic.
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Maybe you are looking for