BusinessService which sends JMS messages to a JBoss 4.2.x server

Hi,
how do I configure my OSB so that I can send JMS messages to a JBoss server? I have added a Foreign JMS server with the appropriate initial context data and have put the jboss relevant jars into my <domain>/lib directory (javassist.jar, jbossall-client.jar, jboss-aop-jdk50.jar, jboss-messaging-client.jar, trove.jar) but I still get an error in the proxy service when it forwards the message to the business service referencing the imported JMS queues and connectionFactory. The message is:
<18.02.2010 18:00 Uhr MEZ> <Warning> <ALSB Logging> <BEA-000000> < [RouteToJboss, _onErrorHandler-1181696354513531347--39bf6a8e.126dc62f38e.-7e57, Log error, ERROR] Error occurred in flow: BEA-380002[JMSPool:169803]JNDI lookup of the JMS connection factory jboss.connectionFactory failed: javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory]RouteToJbossrequest-pipeline>
Am I missing something?
Best regards,
Dimo
PS. I also had to put a newer log4j version in the preclasspath because jboss client seems to require verisons >= 1.2.12 and the one shipped with OSB does not cut it

There is a difference between supported and certified.
ADF was certified (meaning tested) with JBoss 4.0.4.
We didn't test with JBoss 4.2 so we don't know if it works or not.
However it is supported - meaning that if you try to deploy to 4.2 and run into issues you can open bugs with Oracle support.

Similar Messages

  • How to send JMS Message from a BPM Process

    Hi All
    I have small query regarding sending JMS Message from a bpm process. Is it possible to send JMS message from one bpm process to another bpm process.
    I have a scenario in which I need to send a JMS message to a queue where another process is listening on that queue and as soon as the message is received on the queue the process instance is created.
    I know how to listen for the JMS message on the queue, but I don't how to send a JMS message from a process.
    Also Can I create process by sending the Notification to the process instead of a JMS message. But the process to be created is not a subprocess i.e. Can notification be send accross different processes.
    Any information or example in this regard would be helpful.
    Thanks in advance
    Edited by: user9945154 on Apr 22, 2009 7:46 PM

    Hi,
    Here's one approach to sending JMS messages from an Oracle BPM process. If you're doing this just to send a message into another process, do not take this approach. It's far easier and quicker if you do this using the OOTB "send notification" logic.
    These steps describe how to do this using WebLogic. The steps would be different if you're using another ap server / JMS provider.
    1. Guessing you've already done this, but first expose the two required WebLogic jar files for JMS messaging as Java components in the External Resources. The two files for WebLogic are weblogic.jar and wljmsclient.jar” (located in the < WebLogic home directory > /weblogic/server/lib” directory).
    AquaLogic BPM JMS Queue Listener for WebLogic 8.1
    2. You've probably already done this, but add an External Resource to represent the J2EE container:
    • Name: “weblogicJ2EE” - this is important and will be used in the next step
    • Supported Type: “GENERIC_J2EE”
    • Initial Context Factory: “weblogic.jndi.WLInitialContextFactory”
    • URL: “t3://localhost:7001”
    • Principal: and Credentials: whatever userid and password you defined to access theWebLogic administrative console.
    3. Create the External Resource that represents the send queue configuration. In this example, I'm calling it “WebLogic Send Queue”. This is important - remember what you named it because you will use this name in the logic that sends the JMS message. This new External Resource is configured as:
    • J2EE: “weblogicJ2EE” (same name as the second External Resource you created)
    • Destination Type: “QUEUE”
    • Lookup Name: “weblogic.examples.jms.exampleQueue”
    • Connection Factory Lookup Name: “weblogic.examples.jms.QueueConnectionFactory”
    4. Here's the logic to send a Message to the Queue
    <pre class="jive-pre"><p />msg as String = "Hello World"
    jmsMsg as Fuego.Msg.JmsMessage
    msg = "<?xml version=\"1.0\"?><Msg>" + msg + "</Msg></xml>"
    jmsMsg = JmsMessage(type : JmsMessageType.TEXT)
    jmsMsg.textValue = msg
    sendMessage DynamicJMS
    using configuration = "WebLogic Send Queue",
    message = jmsMsg</pre>
    Note that the “sendMessage” method uses the configuration parameter “WebLogic Send Queue”. You previously created a JMS messaging service External Resource with this name in the third step.
    Again, please don't go this route if you're just using it to send notifications between processes,
    Dan

  • Problem in sending JMS message on remote OC4J

    I have two OC4J standalone (10.1.3.0.0 build 041119.0001.2385)
    The containers work on Windows2000 in different machines connected by the LAN.
    The First container has deployed application from example http://www.oracle.com/technology/tech/java/oc4j/1013/howtos/how-to-jca-intro/doc/how-to-jca-intro.html
    The second container has j2ee application (Servlet) that sending JMS messages in the queue of the first container.
    Code Servlet in second OC4J:
    package mypackage2;
    import javax.servlet. *;
    import javax.servlet.http. *;
    import java.io. PrintWriter;
    import java.io. IOException;
    import javax.jms. *;
    import javax.naming. *;
    import java.util. *;
    public class Servlet1 extends HttpServlet
    private static final String CONTENT_TYPE = "text/html;charset=windows-1251";
    public void init (ServletConfig config) throws ServletException
    super.init (config);
    String QUEUE_NAME = "OracleASjms/MyQueue1";
    String QUEUE_CONNECTION_FACTORY = "OracleASjms/MyQCF";
    public void doGet (HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException
    response.setContentType (CONTENT_TYPE);
    PrintWriter out = response.getWriter ();
    out.println (" < html > ");
    out.println (" < head > < title > Servlet1 < /title > < /head > ");
    out.println (" < body > ");
    try
    Hashtable env = new Hashtable ();
    env.put (Context. INITIAL_CONTEXT_FACTORY, "oracle.j2ee.rmi.RMIInitialContextFactory");
    env.put (Context. SECURITY_PRINCIPAL, "admin");
    env.put (Context. SECURITY_CREDENTIALS, "admin");
    env.put (Context. PROVIDER_URL, "ormi://host_OC4J_1:23791/jcamdb");
    env.put ("dedicated.rmicontext", "true");
    InitialContext ic = new InitialContext (env);
    QueueConnectionFactory connectionFactory = (QueueConnectionFactory)ic.lookup (QUEUE_CONNECTION_FACTORY);
    QueueConnection connection = connectionFactory.createQueueConnection ();
    connection.start ();
    QueueSession queueSession =
    connection.createQueueSession (false, Session.AUTO_ACKNOWLEDGE);
    Queue queue = (Queue) ic.lookup (QUEUE_NAME);
    ic.close ();
    System.out.println (" Queue: " + queue);
    QueueSender sender = queueSession.createSender (queue);
    System.out.println (" creating Message: " + queue);
    Message message = queueSession.createMessage ();
    System.out.println (" Message created ");
    message.setJMSType ("theMessage");
    message.setLongProperty ("time", System.currentTimeMillis ());
    message.setStringProperty ("id", "11111");
    message.setStringProperty ("oamount", "55555");
    message.setStringProperty ("message", "77777");
    message.setStringProperty ("RECIPIENT", "MDB");
    System.out.println (" Sending message... ");
    sender.send (message);
    System.out.println (" Message sent ");
    sender.close ();
    queueSession.close ();
    connection.close ();
    catch (Exception e)
    System.out.println (" ** TEST FAILED ** < br > Exception: " + e);
    out.println (e.toString ());
    e.printStackTrace ();
    out.println (" < p > The servlet has received a GET. This is the reply. < /p
    ");out.println (" < /body > < /html > ");
    out.close ();
    Error: This code send message in The First container, and should send in the second OC4J !!!!
    Please answer :
    As configure (what code it is necessary to write) servlet (any J2EE the application in OC4J) to use a path to OC4J JMS (remote OC4J JMS) through the Resource Adapter (using OracleASjms.rar). ???

    I have two OC4J standalone (10.1.3.0.0 build 041119.0001.2385)
    The containers work on Windows2000 in different machines connected by the LAN.
    The First container has deployed application from example http://www.oracle.com/technology/tech/java/oc4j/1013/howtos/how-to-jca-intro/doc/how-to-jca-intro.html
    The second container has j2ee application (Servlet) that sending JMS messages in the queue of the first container.
    Code Servlet in second OC4J:
    package mypackage2;
    import javax.servlet. *;
    import javax.servlet.http. *;
    import java.io. PrintWriter;
    import java.io. IOException;
    import javax.jms. *;
    import javax.naming. *;
    import java.util. *;
    public class Servlet1 extends HttpServlet
    private static final String CONTENT_TYPE = "text/html;charset=windows-1251";
    public void init (ServletConfig config) throws ServletException
    super.init (config);
    String QUEUE_NAME = "OracleASjms/MyQueue1";
    String QUEUE_CONNECTION_FACTORY = "OracleASjms/MyQCF";
    public void doGet (HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException
    response.setContentType (CONTENT_TYPE);
    PrintWriter out = response.getWriter ();
    out.println (" < html > ");
    out.println (" < head > < title > Servlet1 < /title > < /head > ");
    out.println (" < body > ");
    try
    Hashtable env = new Hashtable ();
    env.put (Context. INITIAL_CONTEXT_FACTORY, "oracle.j2ee.rmi.RMIInitialContextFactory");
    env.put (Context. SECURITY_PRINCIPAL, "admin");
    env.put (Context. SECURITY_CREDENTIALS, "admin");
    env.put (Context. PROVIDER_URL, "ormi://host_OC4J_1:23791/jcamdb");
    env.put ("dedicated.rmicontext", "true");
    InitialContext ic = new InitialContext (env);
    QueueConnectionFactory connectionFactory = (QueueConnectionFactory)ic.lookup (QUEUE_CONNECTION_FACTORY);
    QueueConnection connection = connectionFactory.createQueueConnection ();
    connection.start ();
    QueueSession queueSession =
    connection.createQueueSession (false, Session.AUTO_ACKNOWLEDGE);
    Queue queue = (Queue) ic.lookup (QUEUE_NAME);
    ic.close ();
    System.out.println (" Queue: " + queue);
    QueueSender sender = queueSession.createSender (queue);
    System.out.println (" creating Message: " + queue);
    Message message = queueSession.createMessage ();
    System.out.println (" Message created ");
    message.setJMSType ("theMessage");
    message.setLongProperty ("time", System.currentTimeMillis ());
    message.setStringProperty ("id", "11111");
    message.setStringProperty ("oamount", "55555");
    message.setStringProperty ("message", "77777");
    message.setStringProperty ("RECIPIENT", "MDB");
    System.out.println (" Sending message... ");
    sender.send (message);
    System.out.println (" Message sent ");
    sender.close ();
    queueSession.close ();
    connection.close ();
    catch (Exception e)
    System.out.println (" ** TEST FAILED ** < br > Exception: " + e);
    out.println (e.toString ());
    e.printStackTrace ();
    out.println (" < p > The servlet has received a GET. This is the reply. < /p
    ");out.println (" < /body > < /html > ");
    out.close ();
    Error: This code send message in The First container, and should send in the second OC4J !!!!
    Please answer :
    As configure (what code it is necessary to write) servlet (any J2EE the application in OC4J) to use a path to OC4J JMS (remote OC4J JMS) through the Resource Adapter (using OracleASjms.rar). ???

  • How to send JMS message from oracle to weblogic

    Hello,
    I am facing with a problem of sending jms message from oracle to weblogic. I am using oracle 10g and weblogic server 9.1. Here is the problem. I would like to create a trigger to send JMS message to weblogic server whenever there is an update in oracle database. So I created a java class that will send a jms message to weblogic server. But in that class I use the jndi from weblogic: weblogic.jndi.WLInitialContextFactory
    when I use the loadjava utility to load that class into oracle, the status of that class is invalid though this class is working fine in eclipse with the weblogic.jar included. I was thinking because the jndi from weblogic needs the weblogic.jar in order to work, then I loaded that jar file into oracle (it took about 20 minute to load everything) and everything loaded into oracle from that jar file is invalid and missing some reference.
    So my question is: how do I send a jms message from oracle to weblogic using a java class with the right jndi?
    Any help will be appreciated.
    Thanks
    TL

    It should be quite straightforward to do this. As stated you need weblogic.jar in your classpath, then use 100% standard JMS calls to publish.
    Ensure that you set the following properties before getting your initial context:
    java.naming.factory.initial=weblogic.jndi.WLInitialContextFactory
    java.naming.provider.url=t3://node:7001 (or whatever)
    this will ensure that the correct JMS implementation classes are invoked.
    You can't easily (without some mucking around) build a test implementation in an AQ environment and then deploy to WebLogic because in AQ you don't tend to use JNDI lookups (unless you've implemented oracle JNDI etc) but rather use non standard factory class to create connections etc.

  • XAException during sending JMS message

    I'am having following exception during sending JMS message using JMSService to remote OC4J queue:
    04/09/15 16:35:02 XAException in errorRollback rollback(c0:a7:9:14:cd:2d:0:0:2a:
    0:0:0:0:0:0:0:0:2b:0:ff:2:84:8c:1):
    04/09/15 16:35:02 XAException in errorRollback null
    04/09/15 16:35:02 XAException in errorRollback rollback(c0:a7:9:14:cd:2d:0:0:2a:
    0:0:0:0:0:0:0:0:2b:0:ff:2:84:8c:1):
    04/09/15 16:35:02 XAException in errorRollback null
    <2004-09-15 16:35:02,717> <ERROR> <default.collaxa.cube.engine.dispatch> <BaseSc
    heduledWorker::process> Failed to handle dispatch message ... exception Message
    handle error.
    An exception occurred while attempting to process the message "com.collaxa.cube.
    engine.dispatch.message.invoke.InvokeInstanceMessage"; the exception is: Transac
    tion was rolled back: TwoPhase Commit failed; nested exception is: javax.transac
    tion.xa.XAException: rollback(c0:a7:9:14:cd:2d:0:0:2a:0:0:0:0:0:0:0:0:2b:0:ff:2:
    84:8c:1):
    Regards
    Jarek

    Hi Jarek,
    Is it possible to send us a reproducible bpel package or steps to reproduce? you can send the test case to [email protected]
    when you send the zip file could you please rename to .zap extension. I haven't seen this problem before. I want to reproduce this on my development env.
    -muruga

  • How to send JMS message from pl/SQL to jBoss

    Hi all,
    I need a helping. This is my problem:
    There's a queue which is definitied under the Jboss. I would like send a message from pl/SQL to jBoss.
    Why is't working??
    http://www.oracle.com/technology/sample_code/tech/java/jsp/samples/jms/Readme.html
    thnk's,
    fgy,,

    You can defince a queue in Oracle, then access this queue from your Jboss application. Not sure if you need JMS, but there are some Oracle OCI functions that are certainly helpful for such a task.
    You might look into further details be reading the manual on Oracle Advanced Queuing or Oracle Streams.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14257/part4.htm#i436427

  • I am unable to send JMS message to application which resides in third party

    I am able to produce the Message into JMS demoQueue which is available in SOA 10.1.3.3. And also I tried remote server which is available in my office it having the application SchoolMAX with JMS Configuration. So I need to produce the JMS message into SchoolMAX application. But I am unable to pass to the data’s to that SchoolMAX JMS.
    for this I have configured the respective queues, queue factory etc in Enterprise Manager , but i am not able to access our application which is in remote server through third party in JDeveloper for BPEL Process.
    please i am very new to this JDeveloper & BPEL Console , please help me out in resolving the issue ASAP. please we will be waiting for some reply.

    Hi Kathy,
    Happy Holidays!  Do you have an iPad with cellular service and a text-messaging plan?
    Send messages with your iPhone, iPad, or iPod touch - Apple Support
    http://support.apple.com/en-us/HT201287
    What's the difference between SMS/MMS and iMessage?
    SMS/MMS lets you send text messages and photos to other cellular phones or devices. iMessage lets you send text messages and photos to another iOS device over Wi-Fi, without worrying about text-messaging charges (cellular data charges may apply). 
    What do I need to use SMS/MMS and iMessage?
    Here's what you need to use SMS/MMS and iMessage:
    SMS/MMS: A text-messaging plan. Contact your carrier for more information.
    iMessage: An iPhone, iPad, or iPod touch with iOS 5 or later.
    How do I know if my message used SMS/MMS or iMessage?
    You can tell which type of message you're sending by the color of the Send button and text bubble.
    SMS/MMS: Send button and text bubbles are green.
    iMessage: Send button and text bubbles are blue.
    How can I link my iPhone number with Messages on my iPad, iPod touch, or Messages for Mac?
    When you sign in to Messages with your Apple ID on your iPhone, you link your phone number to your Apple ID. If you then sign in to Messages with the same Apple ID on your iPad, iPod touch, or Mac, Messages will link that device to your phone number as well.
    I hope this information helps ....
    - Judy

  • Send JMS message from a webapp in Tomcat to JMS queue in SJSAS

    Hi, everybody
    I have a web application. Is is a simple JMS message sender: 2 jsp files(User Interface) and a java helper class which in charge of the sending of jms messages) . It runs well on SJSAS 9 web container.
    After I have moved it to Tomcat5.5.17(bundled with Netbeans5.5.1), I have the following exception when I visit the jsp page:
    type : Exception report
    message :
    description : The server encountered an internal error () that prevented it from fulfilling this request.
    exception:
    javax.servlet.ServletException: Servlet.init() for servlet jsp threw exception
         org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
         org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
         org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
         org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         java.lang.Thread.run(Thread.java:595)
    root cause :
    java.lang.NoClassDefFoundError
         org.apache.jasper.servlet.JspServlet.init(JspServlet.java:106)
         org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
         org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
         org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
         org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         java.lang.Thread.run(Thread.java:595)I have imported appserv-rt.jar / appserv-ext.jar / appserv-deployment-jar / appserv-ws.jar / imqjmsra.jar / javaee.jar to my web application's library.
    And i have used the argu-ed Context to do JNDI job to find the JMS resources in SJSAS.
    I need your advices, thank you.

    The following is the detailed info contains in Tomcat's logs file
    SEVERE: StandardWrapper.Throwable
    java.lang.NoClassDefFoundError: javax/servlet/jsp/JspApplicationContext
         at org.apache.jasper.compiler.JspRuntimeContext.<clinit>(JspRuntimeContext.java:84)
         at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:106)
         at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
         at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
         at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3917)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4201)
         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
         at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:608)
         at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:493)
         at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1204)
         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:585)
         at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
         at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:213)
         at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220)
         at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:815)
         at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)
         at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1377)
         at org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:814)
         at org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:343)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:174)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         at java.lang.Thread.run(Thread.java:595)
    Sep 7, 2007 1:56:10 PM org.apache.catalina.core.StandardContext loadOnStartup
    SEVERE: Servlet /zzTomcat threw load() exception
    java.lang.NoClassDefFoundError: javax/servlet/jsp/JspApplicationContext
         at org.apache.jasper.compiler.JspRuntimeContext.<clinit>(JspRuntimeContext.java:84)
         at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:106)
         at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
         at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:932)
         at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3917)
         at org.apache.catalina.core.StandardContext.start(StandardContext.java:4201)
         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
         at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:608)
         at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:493)
         at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1204)
         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:585)
         at org.apache.commons.modeler.BaseModelMBean.invoke(BaseModelMBean.java:503)
         at com.sun.jmx.mbeanserver.DynamicMetaDataImpl.invoke(DynamicMetaDataImpl.java:213)
         at com.sun.jmx.mbeanserver.MetaDataImpl.invoke(MetaDataImpl.java:220)
         at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:815)
         at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:784)
         at org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1377)
         at org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:814)
         at org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:343)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:174)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:524)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         at java.lang.Thread.run(Thread.java:595)
    Sep 7, 2007 1:57:14 PM org.apache.catalina.core.ApplicationContext log
    SEVERE: StandardWrapper.Throwable
    java.lang.NoClassDefFoundError
         at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:106)
         at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
         at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:757)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:130)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         at java.lang.Thread.run(Thread.java:595)
    Sep 7, 2007 1:57:14 PM org.apache.catalina.core.StandardWrapperValve invoke
    SEVERE: Allocate exception for servlet jsp
    java.lang.NoClassDefFoundError
         at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:106)
         at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
         at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:757)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:130)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         at java.lang.Thread.run(Thread.java:595)
    Sep 7, 2007 2:07:05 PM org.apache.catalina.core.ApplicationContext log
    SEVERE: StandardWrapper.Throwable
    java.lang.NoClassDefFoundError
         at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:106)
         at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
         at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:757)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:130)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         at java.lang.Thread.run(Thread.java:595)
    Sep 7, 2007 2:07:05 PM org.apache.catalina.core.StandardWrapperValve invoke
    SEVERE: Allocate exception for servlet jsp
    java.lang.NoClassDefFoundError
         at org.apache.jasper.servlet.JspServlet.init(JspServlet.java:106)
         at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
         at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:757)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:130)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         at java.lang.Thread.run(Thread.java:595)

  • Send JMS Message to OJMS in a Servlet?

    I'm trying to get my servlet to send a message to a JMS queue hosted by OJMS. I have had the code working with the default JMS provider (in-memory only). I can't fathom what the appropriate JNDI names are for the connection factory and queue when using the resource-provider mechanism.
    The Docs suggest it's dead simple but don't give a single example to work from!
    In application.xml I have:
         <!-- JMS Resource Definition -->     
         <resource-provider class="oracle.jms.OjmsContext" name="myJMS">
              <description> OJMS/AQ </description>
              <property name="datasource" value="jdbc/myDS_OCI" />
         </resource-provider>
    The datasource connects to my Oracle 9i database and the schema contains a Queue Table with two queues in it. The one I want to use is called Timed_Event_Queue there.
    According to the docs, I should be able to do a lookup something like
    ctx.lookup("java:comp/resource/myJMS/Queues/Timed_Event_Queue")
    but I can't get anything to even pretend to work!
    I'm working with OC4J 9.0.4 at the moment.
    Any suggestions??
    Thanks,
    -Dominic

    Dominic,
    Were you able to get the QueueConnectionFactory? I have tried this on OC4J 903 and it does work fine. Is there some error message thrown at the OC4J console?
    If you want a sample code, then feel free to mail me at [email protected]
    Hope this helps,
    Rajat

  • Sending jms message from bc4j session bean

    Hi,
    i need to send some message from my bc4j (deployed as session bean).
    i have successfully deployed my mdb to listen for these message via Queue. I try to send some message from test client it works well, this the code snippet :
    String connectionFactoryName = "java:comp/env/jms/QueueConnectionFactory";
    String queueName = "java:comp/env/jms/demoQueue";
    JMSSender sender = new JMSSender(connectionFactoryName,queueName);
    sender.send("test");
    sender.close();
    when i move this code to my bc4j(session bean), message is sent, but my mdb doesn't receive it !( onMessage procedure doesn't come out )
    Really appreciate for help,
    Ricky H.P.

    sorry, this is JMSSender class source code:
    public class JMSSender{
    Context jndiContext;
    QueueConnectionFactory connectionFactory;
    QueueConnection connection;
    QueueSession session;
    TextMessage message;
    QueueSender queueSender;
    Queue queue;
    public JMSSender(String connectionFactoryName,String queueName){
    init(connectionFactoryName,queueName);
    void init(String connectionFactoryName,String queueName){
    * Create a JNDI InitialContext object.
    try {
    jndiContext = new InitialContext();
    } catch (NamingException e) {
    e.printStackTrace();
    * Look up connection factory and queue. If either does
    * not exist, exit.
    try {       
    //connectionFactory = (QueueConnectionFactory)jndiContext.lookup("java:comp/env/jms/QueueConnectionFactory");
    //queue = (Queue)jndiContext.lookup("java:comp/env/jms/demoQueue");
    connectionFactory = (QueueConnectionFactory)jndiContext.lookup(connectionFactoryName);
    queue = (Queue)jndiContext.lookup(queueName);
    }catch (Exception e) {
    e.printStackTrace();
    public void send(String strMessage){
    try {
    connection = connectionFactory.createQueueConnection();
    session = connection.createQueueSession(false,Session.AUTO_ACKNOWLEDGE);
    String correlationId = Long.toString(System.currentTimeMillis());
    message = session.createTextMessage();
    message.setText(strMessage);
    queueSender = session.createSender(queue);
    queueSender.send(message);
    } catch (Exception ex) {
    ex.printStackTrace();
    } finally {
    System.out.println("message sent success !!!");
    public void close(){
    try {
    queueSender.close();
    session.close();
    connection.close();
    } catch (Exception ex) {
    ex.printStackTrace();
    } finally {
    public static void main(String args[]){
    new JMSSender("java:comp/env/jms/QueueConnectionFactory","java:comp/env/jms/trgBctQueue");
    }

  • How to send jms message to mq series

    Hi all,
    I'm new to JMS and I've been asked to send an xml file to a IBM MQ series message queue.
    I need to send this message from an application running on a tomcat webserver.
    Basically, what packages do I need to start with that?
    Is that possible without installing an MQ client on the webserver?
    What parameters would I need to make a connection? I currently only know the QUEUE name and that the MQ is running on a different machine than the webserver is.
    Thank you!
    Steven

    This can help u writing to MQueue
    ==================================================================
    // Program Name
    // MQWrite
    // Last date of modification
    // 1 Oct 2000
    // Description
    // This java class will read a line of input from the keyboard
    // and send it as a message. The program will loop until the
    // user presses CTL^Z.
    // Sample Command Line Parameters
    // -h 127.0.0.1 -p 1414 -c CLIENT.CHANNEL -m MQA1 -q TEST.QUEUE
    // Copyright(C), Roger Lacroix, Capitalware
    import com.ibm.mq.*;
    import java.io.IOException;
    import java.util.Hashtable;
    import java.io.*;
    public class MQWrite {
    private MQQueueManager _queueManager = null;
    private Hashtable params = null;
    public int port = 1414;
    public String hostname = "127.0.0.1";
    public String channel = "CLIENT.TO.MQA1";
    public String qManager = "MQA1";
    public String outputQName = "SYSTEM.DEFAULT.LOCAL.QUEUE";
    public MQWrite()
    super();
    private boolean allParamsPresent()
    boolean b = params.containsKey("-h") &&
    params.containsKey("-p") &&
    params.containsKey("-c") &&
    params.containsKey("-m") &&
    params.containsKey("-q");
    if (b)
    try
    port = Integer.parseInt((String) params.get("-p"));
    catch (NumberFormatException e)
    b = false;
    // Set up MQ environment
    hostname = (String) params.get("-h");
    channel = (String) params.get("-c");
    qManager = (String) params.get("-m");
    outputQName = (String) params.get("-q");
    return b;
    private void init(String[] args) throws IllegalArgumentException
    params = new Hashtable(5);
    if (args.length > 0 && (args.length % 2) == 0)
    for (int i = 0; i < args.length; i+=2)
    params.put(args, args[i+1]);
    else
    throw new IllegalArgumentException();
    if (allParamsPresent())
    // Set up MQ environment
    MQEnvironment.hostname = hostname;
    MQEnvironment.channel = channel;
    MQEnvironment.port = port;
    else
    throw new IllegalArgumentException();
    public static void main(String[] args)
    MQWrite write = new MQWrite();
    try
    write.init(args);
    write.selectQMgr();
    write.write();
    catch (IllegalArgumentException e)
    System.out.println("Usage: java MQWrite <-h host> <-p port> <-c channel> <-m QueueManagerName> <-q QueueName>");
    System.exit(1);
    catch (MQException e)
    System.out.println(e);
    System.exit(1);
    private void selectQMgr() throws MQException
    _queueManager = new MQQueueManager(qManager);
    private void write() throws MQException
    String line;
    int lineNum=0;
    int openOptions = MQC.MQOO_OUTPUT + MQC.MQOO_FAIL_IF_QUIESCING;
    try
    MQQueue queue = _queueManager.accessQueue( outputQName,
    openOptions,
    null, // default q manager
    null, // no dynamic q name
    null ); // no alternate user id
    DataInputStream input = new DataInputStream(System.in);
    System.out.println("MQWrite v1.0 connected");
    System.out.println("and ready for input, terminate with ^Z\n\n");
    // Define a simple MQ message, and write some text in UTF format..
    MQMessage sendmsg = new MQMessage();
    sendmsg.format = MQC.MQFMT_STRING;
    sendmsg.feedback = MQC.MQFB_NONE;
    sendmsg.messageType = MQC.MQMT_DATAGRAM;
    sendmsg.replyToQueueName = "ROGER.QUEUE";
    sendmsg.replyToQueueManagerName = qManager;
    MQPutMessageOptions pmo = new MQPutMessageOptions(); // accept the defaults, same
    // as MQPMO_DEFAULT constant
    while ((line = input.readLine()) != null)
    sendmsg.clearMessage();
    sendmsg.messageId = MQC.MQMI_NONE;
    sendmsg.correlationId = MQC.MQCI_NONE;
    sendmsg.writeString(line);
    // put the message on the queue
    queue.put(sendmsg, pmo);
    System.out.println(++lineNum + ": " + line);
    queue.close();
    _queueManager.disconnect();
    catch (com.ibm.mq.MQException mqex)
    System.out.println(mqex);
    catch (java.io.IOException ioex)
    System.out.println("An MQ IO error occurred : " + ioex);
    // Description
    // This java class will read a line of input from the keyboard
    // and send it as a message. The program will loop until the
    // user presses CTL^Z.
    // Sample Command Line Parameters
    // -h 127.0.0.1 -p 1414 -c CLIENT.CHANNEL -m MQA1 -q TEST.QUEUE
    import com.ibm.mq.*;
    import java.io.IOException;
    import java.util.Hashtable;
    import java.io.*;
    public class MQWrite {
    private MQQueueManager _queueManager = null;
    private Hashtable params = null;
    public int port = 1414;
    public String hostname = "127.0.0.1";
    public String channel = "CLIENT.TO.MQA1";
    public String qManager = "MQA1";
    public String outputQName = "SYSTEM.DEFAULT.LOCAL.QUEUE";
    public MQWrite()
    super();
    private boolean allParamsPresent()
    boolean b = params.containsKey("-h") &&
    params.containsKey("-p") &&
    params.containsKey("-c") &&
    params.containsKey("-m") &&
    params.containsKey("-q");
    if (b)
    try
    port = Integer.parseInt((String) params.get("-p"));
    catch (NumberFormatException e)
    b = false;
    // Set up MQ environment
    hostname = (String) params.get("-h");
    channel = (String) params.get("-c");
    qManager = (String) params.get("-m");
    outputQName = (String) params.get("-q");
    return b;
    private void init(String[] args) throws IllegalArgumentException
    params = new Hashtable(5);
    if (args.length > 0 && (args.length % 2) == 0)
    for (int i = 0; i < args.length; i+=2)
    params.put(args[i], args[i+1]);
    else
    throw new IllegalArgumentException();
    if (allParamsPresent())
    // Set up MQ environment
    MQEnvironment.hostname = hostname;
    MQEnvironment.channel = channel;
    MQEnvironment.port = port;
    else
    throw new IllegalArgumentException();
    public static void main(String[] args)
    MQWrite write = new MQWrite();
    try
    write.init(args);
    write.selectQMgr();
    write.write();
    catch (IllegalArgumentException e)
    System.out.println("Usage: java MQWrite <-h host> <-p port> <-c channel> <-m QueueManagerName> <-q QueueName>");
    System.exit(1);
    catch (MQException e)
    System.out.println(e);
    System.exit(1);
    private void selectQMgr() throws MQException
    _queueManager = new MQQueueManager(qManager);
    private void write() throws MQException
    String line;
    int lineNum=0;
    int openOptions = MQC.MQOO_OUTPUT + MQC.MQOO_FAIL_IF_QUIESCING;
    try
    MQQueue queue = _queueManager.accessQueue( outputQName,
    openOptions,
    null, // default q manager
    null, // no dynamic q name
    null ); // no alternate user id
    DataInputStream input = new DataInputStream(System.in);
    System.out.println("MQWrite v1.0 connected");
    System.out.println("and ready for input, terminate with ^Z\n\n");
    // Define a simple MQ message, and write some text in UTF format..
    MQMessage sendmsg = new MQMessage();
    sendmsg.format = MQC.MQFMT_STRING;
    sendmsg.feedback = MQC.MQFB_NONE;
    sendmsg.messageType = MQC.MQMT_DATAGRAM;
    sendmsg.replyToQueueName = "ROGER.QUEUE";
    sendmsg.replyToQueueManagerName = qManager;
    MQPutMessageOptions pmo = new MQPutMessageOptions(); // accept the defaults, same
    // as MQPMO_DEFAULT constant
    while ((line = input.readLine()) != null)
    sendmsg.clearMessage();
    sendmsg.messageId = MQC.MQMI_NONE;
    sendmsg.correlationId = MQC.MQCI_NONE;
    sendmsg.writeString(line);
    // put the message on the queue
    queue.put(sendmsg, pmo);
    System.out.println(++lineNum + ": " + line);
    queue.close();
    _queueManager.disconnect();
    catch (com.ibm.mq.MQException mqex)
    System.out.println(mqex);
    catch (java.io.IOException ioex)
    System.out.println("An MQ IO error occurred : " + ioex);

  • Send JMS messages from Oracle Procedure

    Hi
    I need to write an Oracle procedure that would send a JMS message. So please share your thoughts on how this can be done in Oracle.
    thank you

    sdk11 wrote:
    Hi
    I need to write an Oracle procedure that would send a JMS message. So please share your thoughts on how this can be done in Oracle.
    thank youhttp://www.lmgtfy.com/?q=Oracle+procedure+that+would+send+a+JMS+message
    Handle:      sdk11
    Status Level:      Newbie
    Registered:      Jan 13, 2010
    Total Posts:      56
    Total Questions:      30 (27 unresolved)
    why so many unanswered questions?
    Edited by: sb92075 on Jan 12, 2012 8:44 AM

  • UnsupportedOperationException sending JMS messages

    Hi everyone. I'm a bit new to OC4J, so I apologize if this is a silly question. I've got the following code:
        Hashtable environment = new Hashtable();
        environment.put("java.naming.factory.initial", "com.evermind.server.ApplicationClientInitialContextFactory");
        environment.put("java.naming.provider.url", "ormi://localhost/");
        environment.put("java.naming.security.principal", "oc4jadmin");
        environment.put("java.naming.security.credentials", "XXX");
        Context context = new InitialContext(environment);
        ConnectionFactory qcf = (ConnectionFactory)context.lookup("jms/TestConnectionFactory");
        Connection conn = qcf.createConnection();
        try
          Queue queue = (Queue)context.lookup("jms/demoQueue");
          Session qSession = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);
          conn.start();
          MessageProducer producer = qSession.createProducer(queue);
          TextMessage message = qSession.createTextMessage();
          message.setText(messageText);
          producer.send(queue, "Hello to JMS!");
        finally
          conn.close();
        }And it fails with the following exception:
    Exception in thread "main" java.lang.UnsupportedOperationException: MessageProducer[Oc4jJMS.Producer.matt-solnits-computer.local.db7df8:11115155f3b:-7ffb.3,Queue[Demo Queue]]: cannot send message to Queue[Demo Queue], sender has default destination.
         at com.evermind.server.jms.EvermindMessageProducer.send(EvermindMessageProducer.java:349)
         at com.evermind.server.jms.EvermindMessageProducer.send(EvermindMessageProducer.java:215)Any idea what I'm doing wrong? The JMS docs say this can happen if the MessageProducer does not have a destination, but as you can see that's not the case.
    Any help would be sincerely appreciated.
    -- Matt

    Never mind! Just figured it out.
    You can't both specify a queue in the Session.createProducer() call and in MessageProducer.send(). You have to pick one or the other.
    Changing this line:
    producer.send(queue, message);to:
    producer.send(message);fixed it. Yay :-)
    -- Matt

  • Can  we send JMS  Message to another PC (local machine with out  WAS

    Hi,
    We are trying to send the message from one Pc to another PC.But local machine is having normal java application with out interaction WAS .
    is it possible to send the message to another PC with out interaction of local WAS by invoking the objects from another PC.
    Reply me ASAP
    Thanks in advance

    Ni_Min wrote:
    I was trying to avoid using emails, because someone has to check his mail box to find the message, he might be busy doing something and never get notified. Is there a common protocol that all machines listen to without me having to installing anything on them to make it work ? Also, when it comes to protocols, what are my choices ?In other words you want to spam people without their consent with messages they're not interested in.
    The very reason what you want to do isn't possible is because of the abuse.
    What do you think would happen if someone anywhere in the world could just launch a program that sends a "message" to all computers on the internet (which is what would be possible with your idea) and cause all those computers to lock up until the message has been read and actively dismissed by the unlucky recipient?
    Now imagine a million spammers, virus authors, and other lowlifes all doing that at the same time thousands of times a day.
    Now imagine yourself to be one of them (you are by association already) and someone with a little bit of a short temper who's in posession of a knife and the knowledge of how to make a noose to put around your neck finding out where you live.

  • Problem sending jms message from Web page button (JSF 1.2)

    SJSAS PE 9.0 running on Windows
    Some of the code
    //imports:
    import javax.jms.ConnectionFactory;
    import javax.jms.Queue;
    import javax.jms.Session;
    import javax.jms.JMSException;
    import javax.annotation.Resource;
    //Injection
    @Resource(mappedName = "jms/ConnectionFactory")
    private ConnectionFactory connectionFactory;
    @Resource(mappedName = "jms/Queue")
    private Queue queue;
    //Button action code
    System.out.println("Trying to send message to EJB");
    javax.jms.Session jmssession = null;
    javax.jms.Connection connection = null;
    javax.jms.MessageProducer messageProducer = null;
    javax.jms.TextMessage message = null;
    final int NUM_MSGS = 1;
    try {           
    // This line is failing, java.lang.NullPointerException
    connection = connectionFactory.createConnection();
    jmssession = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
    messageProducer = jmssession.createProducer(queue);
    message = jmssession.createTextMessage();
    for (int i = 0; i < NUM_MSGS; i++) {
    message.setText("PV interface jobid " + (i + 1));
    message.setBooleanProperty("Gyldig", true); // Sample on how to use properties; can be used to collect necessary information
    System.out.println("Sending message: " + message.getText());
    messageProducer.send(message);
    } catch (JMSException e) {
    System.out.println("Exception occurred: " + e.toString());
    } finally {
    if (connection != null) {
    try {
    connection.close();
    } catch (JMSException e) {
    } // if
    } // finally
    ERROR MESSAGE
    Log Entry Detail
    Details
    Timestamp:
    May 8, 2007 15:24:26.608
    Log Level:
    SEVERE
    Logger:
    javax.enterprise.resource.webcontainer.jsf.application
    Name-Value Pairs:
    ThreadID=12;ThreadName=httpWorkerThread-8080-1;_RequestID=832ea681-575f-4126-9bcf-01dcdf010044;
    Record Number:
    2513
    Message ID:
    java.lang.NullPointerException javax.faces.el.EvaluationException
    Complete Message
    java.lang.NullPointerException
         at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:97)
         at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:96)
         at com.sun.rave.web.ui.appbase.faces.ActionListenerImpl.processAction(ActionListenerImpl.java:57)
         at javax.faces.component.UICommand.broadcast(UICommand.java:383)
         at com.sun.webui.jsf.component.WebuiCommand.broadcast(WebuiCommand.java:160)
         at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:450)
         at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:759)
         at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:97)
         at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:244)
         at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:113)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
         at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:397)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:278)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:240)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:179)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
         at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:182)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
         at com.sun.enterprise.web.VirtualServerPipeline.invoke(VirtualServerPipeline.java:120)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
         at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:566)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:536)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:939)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:239)
         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.invokeAdapter(ProcessorTask.java:667)
         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.processNonBlocked(ProcessorTask.java:574)
         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:844)
         at com.sun.enterprise.web.connector.grizzly.ReadTask.executeProcessorTask(ReadTask.java:287)
         at com.sun.enterprise.web.connector.grizzly.ReadTask.doTask(ReadTask.java:212)
         at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
         at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:75)
    Caused by: java.lang.NullPointerException
         at com.company.testinterfaceportal.JmsSending.<init>(JmsSending.java:37)
         at com.company.testinterfaceportal.MainApplicationBean.SendBeskjedNaa(MainApplicationBean.java:192)
         at com.company.testinterfaceportal.Status.button1_action(Status.java:709)
         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:597)
         at com.sun.el.parser.AstValue.invoke(AstValue.java:151)
         at com.sun.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:283)
         at javax.faces.component.MethodBindingMethodExpressionAdapter.invoke(MethodBindingMethodExpressionAdapter.java:77)
         ... 34 more

    I know the code for the jms-sending is OK (I've
    tested in another application, copy of code), but i
    dont know why it isn't working in this particual
    Visual Web Project. It does seem like the injection
    isn't taking place here; and i have no clue to
    why.....where does your web.xml schema location points to ?
    Injection works only with JEE 5, which means that you have to point to the right version of the servlet spec, i.e version="2.5" and web-app_2_5.xsd.

Maybe you are looking for

  • Doubt in order by clause

    Hi, I have the below query select distinct first_value(column_name) over (partition by table_name order by decode(column_name,'REP','1', 'END','2','3')),table_name from all_tab_columns where owner='ORCL' can someone plz tell me how the order by will

  • How to implement this function in JSP/Servlet env?

    Hi all, I working on a project, it provides functionality to upload file using JSP/Servlet. In the first JSP page, there is file location and submit button. After user select a file to upload and click submit button, a message, like "sending file to

  • How to Delete of an order ATPCAT BF created by CIF from ECC

    Hello, We created a transfert order in ECC transfered to APO through CIF ang got in APO an order of ATP category BF.  The order no more exist in ECC but is still existing in APO. We want to clean it in APO. The standard transactionj /SAPAPO/RLCDELETE

  • BaseSystem pkg

    Hi I visited a friend today who runs OS X 10.4.11. on an iMac G5 PPC. He couldn't get Disk Utility to work as it told him it couldn't find valid package. I hadn't seen this before so checked online. Apparently, in Macintosh HD > Library > Receipts th

  • Intel High Definition Audio

    Is the built in sound card capable of handling 5.1 or 7.1 surround sound? I've been thinking of installing one of those two in my room but I'm not sure if I would have the surround sound effect. MacBook Pro   Mac OS X (10.4.8)   2 GHz; 2 Gb memory; 1