[jboss-user] [JBoss Messaging] - Re: how to send message to remote server with http

libinggang do-not-reply at jboss.com
Thu Dec 20 00:53:33 EST 2007


"ataylor" wrote : You need to configure jBoss Remoting. theres an example under docs/examples/http.

thanks!
 is docs/examples/http the same as jboss-messaging-1.4.0.SP3/examples/http?

I can run that example successfully,but the access to jndi in that example is not over http,and i tried change configure in the jndi.properties from 
[
java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.provider.url=jnp://172.25.67.39:1099                   
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces   
]

to
[
java.naming.factory.initial=org.jboss.naming.HttpNamingContextFactory   
java.naming.provider.url=http://172.25.67.39:8080/invoker/JMXInvokerServlet
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces        

]

but i got this exception:

sleep:
     [echo] Sleeping for 2 seconds ...

run:
     [java] javax.naming.NoInitialContextException: Cannot instantiate class: org.jboss.naming.HttpNamingContextFactory   [Ro
.ClassNotFoundException: org.jboss.naming.HttpNamingContextFactory  ]
     [java]     at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:657)
     [java]     at javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:247)
     [java]     at javax.naming.InitialContext.init(InitialContext.java:223)
     [java]     at javax.naming.InitialContext.(InitialContext.java:175)
     [java]     at org.jboss.example.jms.common.Util.doesDestinationExist(Util.java:51)
     [java]     at org.jboss.example.jms.common.ExampleSupport.setup(ExampleSupport.java:214)
     [java]     at org.jboss.example.jms.common.ExampleSupport.setup(ExampleSupport.java:194)
     [java]     at org.jboss.example.jms.common.ExampleSupport.run(ExampleSupport.java:146)
     [java]     at org.jboss.example.jms.http.HttpExample.main(HttpExample.java:136)
     [java] Caused by: java.lang.ClassNotFoundException: org.jboss.naming.HttpNamingContextFactory
     [java]     at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
     [java]     at java.security.AccessController.doPrivileged(Native Method)
     [java]     at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
     [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
     [java]     at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
     [java]     at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
     [java]     at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
     [java]     at java.lang.Class.forName0(Native Method)
     [java]     at java.lang.Class.forName(Class.java:242)
     [java]     at com.sun.naming.internal.VersionHelper12.loadClass(VersionHelper12.java:42)
     [java]     at javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:654)
     [java]     ... 8 more
     [java]
     [java] #####################
     [java] ###    FAILURE!   ###
     [java] #####################

BUILD FAILED


what should i do next?
Thanks a lot!

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4114502#4114502

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4114502



More information about the jboss-user mailing list