Results 1 to 4 of 4
  1. #1
    Senior Member
    Join Date
    Jul 2009
    Location
    sofia
    Posts
    40

    Problem running JMS stocks demo

    Hi, i'm trying to run the Stocks demo with JMS, but when i start the shell script start_generator.sh I got:
    Code:
    06-Aug-09 16:37:12,716 |INFO |SLGenerator                      |main                       |Stock generator is starting. Loading configuration...
    06-Aug-09 16:37:12,717 |DEBUG|SLGenerator                      |main                       |jmsUrl: jnp://localhost:1099
    06-Aug-09 16:37:12,717 |DEBUG|SLGenerator                      |main                       |initialContextFactory: org.jnp.interfaces.NamingContextFactory
    06-Aug-09 16:37:12,717 |DEBUG|SLGenerator                      |main                       |topicConnectionFactory: ConnectionFactory
    06-Aug-09 16:37:12,717 |DEBUG|SLGenerator                      |main                       |queueConnectionFactory: ConnectionFactory
    06-Aug-09 16:37:12,717 |DEBUG|SLGenerator                      |main                       |topicName: topic/stocksTopic
    06-Aug-09 16:37:12,718 |DEBUG|SLGenerator                      |main                       |queueName: queue/stocksQueue
    06-Aug-09 16:37:12,718 |DEBUG|SLGenerator                      |main                       |msgPoolSize: 15
    06-Aug-09 16:37:12,718 |DEBUG|SLGenerator                      |main                       |recoveryPauseMillis: 2000
    06-Aug-09 16:37:12,720 |DEBUG|SLGenerator                      |main                       |JMSHandler Ready
    06-Aug-09 16:37:12,736 |DEBUG|SLGenerator                      |main                       |Generator ready
    06-Aug-09 16:37:12,736 |INFO |SLGenerator                      |main                       |Generator ready.
    06-Aug-09 16:37:12,761 |ERROR|SLGenerator                      |Thread-3                   |Unable to send message - JMSException:Topic publisher not ready
    06-Aug-09 16:37:12,761 |DEBUG|SLGenerator                      |Thread-3                   |Heartbeat sent: 255
    06-Aug-09 16:37:12,761 |ERROR|SLGenerator                      |Thread-2                   |NamingException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory
    javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory]
    	at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657)
    	at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
    	at javax.naming.InitialContext.init(InitialContext.java:223)
    	at javax.naming.InitialContext.<init>(InitialContext.java:197)
    	at stocklist_jms_demo.common.JMSHandler.initJMS(JMSHandler.java:108)
    	at stocklist_jms_demo.common.JMSHandler.initTopicSession(JMSHandler.java:200)
    	at stocklist_jms_demo.common.JMSHandler.initTopicPublisher(JMSHandler.java:304)
    	at stocklist_jms_demo.feed_simulator.Generator$ConnectionLoopTPQR.connectionCall(Generator.java:399)
    	at stocklist_jms_demo.common.ConnectionLoop.run(ConnectionLoop.java:40)
    Caused by: java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory
    	at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    	at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
    	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
    	at java.lang.Class.forName0(Native Method)
    	at java.lang.Class.forName(Class.java:247)
    	at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:46)
    	at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:654)
    	... 8 more
    FYI: The jms.jar was missing and i added jms-1.1.jar
    One other question: I looked at the jms implementation demo. It looks pretty complex and reliable. Could it be used in real world project with little modifications?? It also has fail over mechanisms but doesn't they make it slower or heavy? I do ask this questions because i can't manage to run it yet.
    Where is this NamingContextFactory.class? What other lib should i add?
    Regards.

  2. #2
    Power Member
    Join Date
    Jul 2006
    Location
    Cesano Maderno, Italy
    Posts
    784
    I think that jbossmq-client.jar is missing, it should be placed where the jms.jar file is.
    let me know if that was the problem

  3. #3
    Senior Member
    Join Date
    Jul 2009
    Location
    sofia
    Posts
    40
    Hi!
    Well every thing was described in the README.txt file, but i'm lazy and i did't read it .
    Here is the list of the included jar files:
    concurent.jar
    javaasisst.jar
    jboss-aop-client.jar
    jboss-common-core.jar
    jboss-logging-spi.jar
    jboss-mdr.jar
    jboss-messaging.jar
    jboss-messaging-client.jar
    jboss-remoting.jar
    jboss-serialization.jar
    jms-1.1.jar
    jnp-client.jar
    log4j-1.2.15.jar
    trove.jar

    I'm using jboss 5.10 and every thing work .

    One more question. LS is designed to be independent from the data fead(generators). So if the generator run outside the LS like java console application we add one more point of failure. So is it better to run the generator inside the LS?

    Regards.

  4. #4
    Administrator
    Join Date
    Jul 2006
    Location
    Milan
    Posts
    973
    In our demo, the generator is just a placeholder for a real feed,
    which is independent from Lightstreamer application;
    hence, it does not represent a module to be added to the final architecture,
    but a module that already exists.
    Obviously, the feed cannot be embedded in the Data Adapter,
    but only remotely accessed.

 

 

Similar Threads

  1. Replies: 3
    Last Post: July 29th, 2011, 08:56 AM
  2. Replies: 4
    Last Post: February 3rd, 2011, 10:33 AM
  3. Problem in running the demo exe
    By Preethu in forum Adapter APIs
    Replies: 1
    Last Post: June 8th, 2009, 02:41 PM
  4. I want to Show Live India Markets Stocks On www.myGM4U.com
    By niravmehta2009 in forum Client Protocol
    Replies: 1
    Last Post: March 13th, 2009, 09:20 AM
  5. Problem running Flex examples
    By markgoldin in forum Client APIs
    Replies: 10
    Last Post: May 26th, 2008, 08:52 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 12:50 AM.