Hi, i'm trying to run the Stocks demo with JMS, but when i start the shell script start_generator.sh I got:
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 :Smile_Ab: 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.