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)

Similar Messages

  • 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

  • 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

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

  • 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");
    }

  • Sending a jms message from one server to another in a cluster fails..

    Hi,
              My platform is wl6.1 sp7 two servers in a cluster...
              I have problems sending jms messages from one server to the other. When sending to a destination on the same server it works fine, but sending to the other server do not work. I get no exceptions when I send the message. The "Monitor all Active JMS Destinations..."->"Messages Received" column increase number of received messages for the remote server. But the onMessage method in the bean is not called(I am logging all calls to a file...)
              Any suggestions?
              And..
              My understanding is that the JNDINameReplicated default value is set to true? But when I don't set this value to true the jndi name is not replicated too the other server.
              (The state for both servers are Running in the admin console and listed servers in the cluster is 2....
              Server names:
              * bluej, biztalk-lab
              JMS connection factory:
              * xlink.jms.factory.commerceFactory, deplyed on both servers and for the cluster
              Destinations:
              * xlink.jms.service.report.biztalk-lab.Report for the biztalk-lab server active on 'biztalk-labJMSServer' JMS-server
              * xlink.jms.service.report.bluej.Report for the bluej server active on 'bluejJMSServer' JMS-server)
              ~b

    Deployed to the bluej server:
              <weblogic-ejb-jar>
              <weblogic-enterprise-bean>
              <ejb-name>xlink.jms.service.report.bluej.Report</ejb-name>
              <message-driven-descriptor>
              <pool>
              <max-beans-in-free-pool>3</max-beans-in-free-pool>
              <initial-beans-in-free-pool>1</initial-beans-in-free-pool>
              </pool>
              <destination-jndi-name>xlink.jms.service.report.bluej.Report</destination-jndi-name>
              </message-driven-descriptor>
              <jndi-name>xlink.jms.service.report.bluej.Report</jndi-name>
              </weblogic-enterprise-bean>
              <weblogic-enterprise-bean>
              <ejb-name>xlink.jms.service.report.bluej.Report</ejb-name>
              <message-driven-descriptor>
              <destination-jndi-name>xlink.jms.service.report.bluej.Report</destination-jndi-name>
              </message-driven-descriptor>
              <jndi-name>xlink.jms.service.report.bluej.Report</jndi-name>
              </weblogic-enterprise-bean>
              </weblogic-ejb-jar>
              <ejb-jar>
              <enterprise-beans>
              <message-driven>
              <ejb-name>xlink.jms.service.report.bluej.Report</ejb-name>
              <ejb-class>no.xlink.server.service.report.engine.jms.ReportBean</ejb-class>
              <transaction-type>Bean</transaction-type>
              <message-driven-destination>
              <destination-type>javax.jms.Queue</destination-type>
              </message-driven-destination>
              </message-driven>
              </enterprise-beans>
              </ejb-jar>
              Deployed to the biztalk-lab server:
              <weblogic-ejb-jar>
              <weblogic-enterprise-bean>
              <ejb-name>xlink.jms.service.report.biztalk-lab.Report</ejb-name>
              <message-driven-descriptor>
              <pool>
              <max-beans-in-free-pool>3</max-beans-in-free-pool>
              <initial-beans-in-free-pool>1</initial-beans-in-free-pool>
              </pool>
              <destination-jndi-name>xlink.jms.service.report.biztalk-lab.Report</destination-jndi-name>
              </message-driven-descriptor>
              <jndi-name>xlink.jms.service.report.biztalk-lab.Report</jndi-name>
              </weblogic-enterprise-bean>
              <weblogic-enterprise-bean>
              <ejb-name>xlink.jms.service.report.biztalk-lab.Report</ejb-name>
              <message-driven-descriptor>
              <destination-jndi-name>xlink.jms.service.report.biztalk-lab.Report</destination-jndi-name>
              </message-driven-descriptor>
              <jndi-name>xlink.jms.service.report.biztalk-lab.Report</jndi-name>
              </weblogic-enterprise-bean>
              </weblogic-ejb-jar>
              <ejb-jar>
              <enterprise-beans>
              <message-driven>
              <ejb-name>xlink.jms.service.report.biztalk-lab.Report</ejb-name>
              <ejb-class>no.xlink.server.service.report.engine.jms.ReportBean</ejb-class>
              <transaction-type>Bean</transaction-type>
              <message-driven-destination>
              <destination-type>javax.jms.Queue</destination-type>
              </message-driven-destination>
              </message-driven>
              </enterprise-beans>
              </ejb-jar>

  • How can I send a message from database to a J2EE application?

    How can I send a message from database to a J2EE application?
    If I have a codetable in database that has new or modified values I have to refresh the codetable in my J2EE application.
    Most effective way would be send a message to initiate a table reload from J2EE app, but I don't know how to do this.
    Now I have a background thread that regular reads the table and looks for changes.

    http://www.oracle.com/technology/products/integration/bam/10.1.3/TechNotes/TechNote_BAM_AQ_Configuration.pdf
    This document details how to create triggers on a table that send out JMS messages.
    In this example, the messages are going to Oracle BAM.. your message could go to your J2EE application listening to its own topic/queue.
    an alternative idea.
    you could also just cache your lookup table with something like Oracle Coherence and than try to ensure that all changes to the lookup go through Coherence, so that you won't need to do notification from the db up to the application. the application and the lookup data management tool would be using the data grid for management of the lookup table data, and the data grid (coherence) would persist the lookup data changes back to the db.

  • JMS message from one application to the another appl in the same container?

    I have a question.
    Can I send JMS message from one application to the another application in the same container?
    If yes ...can you provide me info.
    I want to know in regards of EJB2.0 and EJB3.0.
    Thanks,
    Rahul

    So the receiver application is a Message Driven Bean, right?
    In your container, do you have a mean to ensure that it is correctly configured to listen the desired destination? Like an administrative console that would show the destinations, the number of pending messages, the number of active consummers...?
    btw what is the destination type? A queue or a topic?

  • How can i send simple message from PC-to-another device

    How can i send simple message from PC-to-another device
    just simple message (like command String) not SMS or Data File.
    I have a computer with bluetooth and the oter side is Embeded Blue
    Thanks.

    http://www.oracle.com/technology/products/integration/bam/10.1.3/TechNotes/TechNote_BAM_AQ_Configuration.pdf
    This document details how to create triggers on a table that send out JMS messages.
    In this example, the messages are going to Oracle BAM.. your message could go to your J2EE application listening to its own topic/queue.
    an alternative idea.
    you could also just cache your lookup table with something like Oracle Coherence and than try to ensure that all changes to the lookup go through Coherence, so that you won't need to do notification from the db up to the application. the application and the lookup data management tool would be using the data grid for management of the lookup table data, and the data grid (coherence) would persist the lookup data changes back to the db.

  • Regarding text messaging, if I send a message from my iPhone, the reply goes to my ipad, or mini ipad. How can I fix this?

    Regarding text messaging, if I send a message from my iPhone, the reply goes to my ipad, or mini ipad. How can I stop this from happening?

    Go to Settings/ Messaging/ Send & Receive on each device to set the contact points to be reached at, and to set the "from" address when you start a new message.  It sounds like your iPhone might be sending messages out as one thing (e.g. an iCloud address) but set to not receive replies only to your phone number.  Make sure you review settings on each device since you may, or may not, want to have them common.

  • Why do text messages from my iPad appear to some people as if they came from my email address instead of my phone number? This does not happen when I send text messages from my iPhone.

    Why do text messages from my iPad appear to some people as if they came from my email address instead of my phone number? This does not happen when I send text messages from my iPhone.

    You need to link your iPhone number to Messages - and Facetime if you use it. For Messages go to Settings>Messages>Send and Receive at>You can be reached by iMessage at. If your phone number is showing there, select it as your Contact address. If it doesn't appear in there, take a look at the end of this article for help.
    iOS and OS X: Link your phone number and Apple ID for use with FaceTime and iMessage - Apple Support

  • HT4623 Unable to send text message from iphone 4 to a non-iphone.

    I have just bought an Iphone 4 with ios 7.1.
    And when i am trying to send text message from my phone to a non-iphone devices it just showing a green (text background & loading bar), but still after some time the message was not getting delivered.
    As per the apple support. I have already put +91 for all my numbers even deleted & create new contacts.
    But the problem is still there.
    I have also tried to change the setting for iMessage (On/Off).
    So, please suggest.

    ​Thanks for getting back to me. I did understand that part, but didn't get
    wheather you could reply to a message you had received. I understood that
    you could not originate a new text.​

  • How to send a message from server to a particular client

    Hi all,
    I need to send a message from one host to another host which are connected in local domain. Now I'm able to send a message from client to server and vice versa but what I need is the server should route that message which I send through one client to another host(client) .
    How can I do that ?
    Please give me some ideas how to do that .
    Thanks in advance
    Edited by: m.parthiban on Mar 5, 2008 1:20 PM

    ejp, thanks for your reply . can you please explain me bit more by providing code snippet ?
    This is what I have done till now :
    MyServer:
    package connection;
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.io.OutputStreamWriter;
    import java.io.PrintWriter;
    import java.net.ServerSocket;
    import java.net.Socket;
    public class MyServer {
          * @param args
         public static void main(String[] args) {
              String ss ="",temp ="";
              Socket clientLink=null;
              try {
                        ServerSocket sockServer = new ServerSocket(6000);
                        while(true) {
                             clientLink = sockServer.accept();
                             System.out.println("Connection Established");
                             InputStreamReader isr = new InputStreamReader(clientLink.getInputStream());
                             BufferedReader bufReader = new BufferedReader(isr);
    //                         System.out.println("buf "+bufReader.readLine());
                             try {
                                  while ((temp=bufReader.readLine())!=null) {
                                       ss+=temp;
                                       System.out.println("ss   "+ss+"Temp "+temp );
                                  System.out.println("Client > "+ss);
                             } catch (IOException e) {
                                  System.out.println("while reading");
                                  e.printStackTrace();
                             OutputStreamWriter osw = new OutputStreamWriter(clientLink.getOutputStream());
                             PrintWriter pw = new PrintWriter(osw,true);
                             pw.write("Welcome -by Server !!!");
                             pw.flush();
                             clientLink.shutdownOutput();
                             clientLink.close();
              } catch (IOException e) {
                   System.out.println("Can't able to connect");
                   e.printStackTrace();
    }MyClient:
    package connection;
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStreamReader;
    import java.io.OutputStreamWriter;
    import java.io.PrintWriter;
    import java.net.Socket;
    import javax.swing.JOptionPane;
    public class MyClient {
          * @param args
         public static void main(String[] args) {
              try {
                   String serverMsg="",temp="";
                   Socket client = new Socket("127.0.0.1",6000);
                   PrintWriter pw = new PrintWriter(client.getOutputStream(),true);
                   pw.write("Hi ,Accecpt me");
                   pw.flush();
    //               pw.close();
                   client.shutdownOutput();
                   InputStreamReader isr  = new InputStreamReader(client.getInputStream());
                   BufferedReader bufRead = new BufferedReader(isr);
                   while ((temp=bufRead.readLine())!=null) {
                        serverMsg +=temp;
                   System.out.println("Server > "+serverMsg);
                   JOptionPane.showMessageDialog(null, serverMsg);
                   client.shutdownInput();
                   client.close();
              } catch (IOException e) {
                   System.out.println("Failed to connect");
                   e.printStackTrace();
    }Once again thanks for the time you spend to reply me.

  • Send a message from a list of emails in lightswitch 2013.4 HTML screen using ajax

    Hi There,
    any idea how to make a button to send a message from a list of emails in lightswitch 2013.4 HTML.
    my idea is to send message to all emails in the details picker (or the drop down menu or a choice list) tat is filled by SQL query (as a data source in lightswitch)
    i have read many articles,  most of them were written in PHP or VB !
    for example:
    http://www.devarticles.com/c/a/HTML/Sending-email-with-AJAX-building-a-small-application/1/
    http://stackoverflow.com/questions/22442074/how-to-send-email-to-a-list-of-addresses-from-lightswitch
    http://lightswitchhelpwebsite.com/Forum/tabid/63/aft/75/Default.aspx
    http://maxslabyak.com/c-sharp/using-jquery-to-send-email-with-web-services/
    http://www.paulspatterson.com/microsoft-lightswitch-sending-emails-from-the-client/
    http://www.quercussolutions.com/blog/index.php/microsoft-lightswitch-sending-emails/
    http://www.lightswitchspecial.com/2013/01/7-most-easiest-way-to-send-email-from.html
    as far as  i know, the HTML screens in lightswitch 2013 can be encoded with ajax only, not vb or C# any more!
    my project contains only HTML screens, no desktop screens. i know that i can do the VB programming in the tables actions, but i am looking to have this code in the Browse screen to give me more flexibility depending on my decision to
    send or not..
    help please :)  

    Hello Hasan,
    I do this using a generic handler(e.g. sendmail.ashx). In the ashx file i use this code:
    Imports System.Net.Mail
    Imports System.Web
    Imports System.Web.Services
    Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
    Dim str As String = "there was no error "
    Dim Recipient As String = Convert.ToString(context.Request.Params("pRecipient"))
    Dim strsub As String = Convert.ToString(context.Request.Params("pSubject"))
    Dim strmsg As String = Convert.ToString(context.Request.Params("pMessage"))
    Dim msg As New MailMessage
    Try
    ' Your mail address and display name.
    ' This what will appear on the From field.
    ' If you used another credentials to access
    ' the SMTP server, the mail message would be
    ' sent from the mail specified in the From
    ' field on behalf of the real sender.
    msg.From = New MailAddress("[email protected]", "Displayname")
    ' To addresses
    msg.To.Add("[email protected]")
    'msg.To.Add(New MailAddress("[email protected]", "Friend B"))
    ' You can specify CC and BCC addresses also
    ' Set to high priority
    msg.Priority = MailPriority.High
    msg.Subject = strsub
    ' You can specify a plain text or HTML contents
    msg.IsBodyHtml = True
    msg.Body = strmsg
    'msg.Body = _
    ' "Hello everybody,<br /><br />" & _
    ' "I found an interesting site called <a href=""http:'JustLikeAMagic.WordPress.com"">" & _
    ' "Just Like a Magic</a>. Be sure to visit it soon."
    ' In order for the mail client to interpret message
    ' body correctly, we mark the body as HTML
    ' because we set the body to HTML contents.
    ' Attaching some data
    ' msg.Attachments.Add(New Attachment("D:\Site.lnk"))
    ' Connecting to the server and configuring it
    Dim client As New SmtpClient()
    client.Host = "mail.gmx.com"
    client.Port = 25
    client.EnableSsl = True
    ' The server requires user's credentials
    ' not the default credentials
    client.UseDefaultCredentials = False
    ' Provide your credentials
    client.Credentials = New System.Net.NetworkCredential("yourcredentias", "f2f081639ad")
    client.DeliveryMethod = SmtpDeliveryMethod.Network
    ' Use SendAsync to send the message asynchronously
    client.Send(msg)
    Catch ex As Exception
    str = ex.Message
    Finally
    msg.Dispose()
    End Try
    context.Response.ContentType = "text/plain"
    context.Response.Write(str)
    End Sub
    When you create the ASHX then replace the ProcessRequest with the above function.
    In LS HTML Screen create the function for pressing a button an appen the following text:
    $.ajax({
    type: 'post',
    data: {
    pRecipient: Screen.yourdata,
    pSubject: Screen.yourdata,
    pMessage: Screen.yourdata,
    url: '../sendmail.ashx',
    success: function success(result) {
    alert(result);
    This is a way you can do that. In VB and out of your browse Screen.
    Hope this helps
    Thomas

  • How to send the message from front end to XI in sender webservice

    Hi All,
    I am doing webservice to proxy scenario, we want to send the message from front end to XI, front end is java application. can any one please guide me the steps need to done for front end to XI.
    1) we wrote a webservice
    2) i have created data type message type and message interface in IR
    3) i have created sender soap adapter with interface name and namespace.
    4) i have generated webservice in ID
    but how can we send the message from front end to XI sender soap adapter.
    Kind Regards,
    Kiran

    Hi,
    Before going with the SOAP Adapter i suggest you to go through this Disscussion
    Re: about http and soap
    If you are going with the SOAP Adapter means
    >>but how can we send the message from front end to XI sender soap adapter.
    you have to use the XI  Server URL( http://host name:j2ee port/
    Use this as Refference
    http://help.sap.com/saphelp_nw70/helpdata/EN/ae/d03341771b4c0de10000000a1550b0/frameset.htm
    Regards
    Seshagiri

Maybe you are looking for

  • Release startegy of Service Entry Sheet

    I configured release strategy for Service entry sheet with Release code 08. When i actually go to ML81N to release the same, i get same code in the drop down but when i select the same (08), it gives me "error  Release with code 08 not possible", ins

  • How to get custom file name in manually generated SSRS report

    Hi, I am creating a SSRS report which would be executed by User manually through ReportServer URL.User would be generating the SSRS report for different Customer ID based on ad-hoc basis. I am passing CustomerID as input parameter to the report. Is t

  • How to update child record when item from parent record changes

    Hi, I have a master and detail form with two regions on the same page. Region one references parent record, one of column in the parent record is also in the child record. And is one to many relation between parent record and child record. How can I

  • Lightroom and Using the editor in PS3

    On using Lightroom to open up a DNG file file in Photoshop CS3 I receive the message "Lightoom is unable to prepare the selected file (file address) It will not be opened". I have read the other links in this forum and have tried the solutions offere

  • Deleting the totals in the view

    Hi, Is there any way to eliminate the totals in the demand planning view? How could it be done? Thanks a lot