Results 1 to 8 of 8
  1. #1

    Lightstreamer jms extender and weblogic

    Hey,
    I love this extender as it is so easy to use jms from javascript with it.
    As we have to use Weblogic JMS I run into two problems. I found the solution for my first one but i will post it here for others with the same issue and the second one is a question for help from here.

    a) When using a Topic or Queue all examples use the createTopic method. e.g.
    session.createTopic("stocksTopic")
    In case of Weblogic it is important to know that the given topic name is not the jndi-Name of that topic but the CDI name. CDI stands for Create Destination Identifier and ist not standardized.
    Weblogics syntax here is to use JMSServer/JMSModule!TopicName e.g. 'JMS_Server/MyTestModule!stocksTopic' or if you have only one JMS Server you can use './MyTestModule!stocksTopic'.

    b) now to my problem.
    All worked fine but setting up a subscriber for a queue.
    The same code that worked with ActiveMQ is throwing a NullPointerException with Weblogic - and as the stacktrace suggests that is inside lightstreamer and not due to using the weblogic jars. (i made a java application against the jar and it worked fine with all the same calls to the java api on java level.

    The expception occurs when connection.start() is called.

    here is the code:
    Code:
            jms.ConnectionFactory.createConnection(lightstreamerUrl, cfgName, null, null, {
                onConnectionCreated: function(conn) {
                  node.connection = conn;
    
    
                  // Connection succeeded, dest subscription
                  var session= conn.createSession(false, "PRE_ACK");
        
                  var dest = session.createQueue(destination);
                  var consumer= session.createConsumer(dest, null);
    
    
                  // Add listener to message consumer
                  consumer.setMessageListener({
                    onMessage: function(message) {                    
                      node.log("ls-jms-in: Message received in ls-jms: " + message.getText())
                      node.send({payload: message.getText()});
                    }
                  });
                  node.log("start");
                  // Start the connection
                  conn.start();
                  
                  node.status({fill:"green", shape:"dot", text:"connected"});
                },
    and here is the stacktrace:

    Code:
    28.Sep.18 12:11:37,298 <ERROR> Dispatcher S5399c6b84dba47e2T1137058/87a9cfe5-7c31-44fa-ac76-cf243981be7e: runtime exception caught while starting consumer for destination './PMES!t
    estQueue' of type QUEUE
    java.lang.NullPointerException: null
            at java.util.concurrent.ConcurrentHashMap.putVal(Unknown Source) ~[na:1.8.0_161]
            at java.util.concurrent.ConcurrentHashMap.put(Unknown Source) ~[na:1.8.0_161]
            at com.lightstreamer.jms_extender.b.p.b(p.java) ~[ls-jms-adapters.jar:na]
            at com.lightstreamer.jms_extender.b.o.a(o.java) ~[ls-jms-adapters.jar:na]
            at com.lightstreamer.jms_extender.b.o.a(o.java) ~[ls-jms-adapters.jar:na]
            at com.lightstreamer.jms_extender.b.aa.run(aa.java) [ls-jms-adapters.jar:na]
            at com.lightstreamer.b.d.z.d(z.java) [lightstreamer.jar:na]
            at com.lightstreamer.b.d.r.b(r.java) [lightstreamer.jar:na]
            at com.lightstreamer.b.d.r.run(r.java) [lightstreamer.jar:na]
            at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [na:1.8.0_161]
            at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.8.0_161]
            at com.lightstreamer.b.d.ar.c(ar.java) [lightstreamer.jar:na]
            at com.lightstreamer.b.d.as.c(as.java) [lightstreamer.jar:na]
            at com.lightstreamer.b.d.aq.run(aq.java) [lightstreamer.jar:na]
    Hope you can give me any hints what goes wrong here and how i could fix it.

  2. #2
    Administrator
    Join Date
    Feb 2012
    Location
    Bologna, Italy
    Posts
    102
    Hello,

    thanks for your hints about Weblogic, they will surely be useful to others.

    We will investigate and try to replicate the problem your reported. Which version of Weblogic server and client are you using?

  3. #3
    Hello,
    I use the version 12.2.1.2 from Weblogic using the weblogic thin client jar wlthint3client.jar from the same version. (but i can test against the newest 12.2.1.3 if you think it would help. )
    Maybe i should use another client jar?
    And i use the newest lightstreamer version of course.

    edit: tested it with the wlfullclient.jar instead with similar results.
    Last edited by Arnd; October 1st, 2018 at 10:44 AM.

  4. #4
    Administrator
    Join Date
    Feb 2012
    Location
    Bologna, Italy
    Posts
    102
    Thanks for the information. Will let you know as soon as possible.

  5. #5
    Administrator
    Join Date
    Feb 2012
    Location
    Bologna, Italy
    Posts
    102
    The exception arises from a known limitation of the WebLogic JMS client: it is unable to retrieve the name of destination, i.e. the API queue.getQueueName() returns null. We rely on this operation in a multitude of points. This limitation is also stated at the end of the Lightstreamer JMS Extender Documentation, chapter 7 "JMS Broker Examples", just below the compatibility table.

    In your case, what leads to the use of this API is the PRE_ACK acknowledge mode. Switching to AUTO_ACK or CLIENT_ACK modes should solve the problem, as they do not require the use of this API.

    Let me know if the problem is solved.
    Best regards,

    Gianluca

  6. #6
    Perfect reply- thank you!
    Worked with AUTO_ACK like a charm.
    I had seen the limitations but wasn't aware it could affect the Acknowledge modes.

    Thanks a lot - that helps me tremendously.

    Best regards
    Arnd

  7. #7
    Faced a similar problem, this topic helped thanks !

  8. #8
    Arnd thanks for the detailed description!

 

 

Similar Threads

  1. Lightstreamer JMS Extender Now Available!
    By Alessandro in forum General
    Replies: 2
    Last Post: October 11th, 2022, 03:27 PM
  2. JavaScript Client API for Lightstreamer JMS Extender
    By Alessandro in forum Client APIs
    Replies: 0
    Last Post: May 11th, 2016, 05:19 PM
  3. Hook API for Lightstreamer JMS Extender
    By Alessandro in forum Hook API
    Replies: 0
    Last Post: May 11th, 2016, 05:17 PM
  4. Blog post introducing Lightstreamer JMS Extender
    By Alessandro in forum General
    Replies: 0
    Last Post: December 31st, 2015, 09:48 AM
  5. Replies: 1
    Last Post: June 5th, 2007, 10:17 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT +1. The time now is 10:08 AM.