[jboss-user] [JNDI/Naming/Network] - Re: javax.naming.NoInitialContextException error when access

2007-03-14 Thread emcwoo
I have modified the classpath (by modifying the build file of the QUEUE 
example) to include the jar files under the following folders:

C:\Program Files\jboss-4.0.4.GA\server\default\lib
C:\Program Files\jboss-4.0.4.GA\server\messaging\lib
C:\Program Files\jboss-4.0.4.GA\client

However, the following error was encountered.


 [java] javax.naming.NamingException: Failed to retrieve Naming interface 
[Root exception is java.io.IOException]
 [java] at 
org.jboss.naming.HttpNamingContextFactory.getInitialContext(HttpNamingContextFactory.java:84)
 [java] at 
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
 [java] at 
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
 [java] at javax.naming.InitialContext.init(InitialContext.java:219)
 [java] at javax.naming.InitialContext.(InitialContext.java:175)
 [java] at 
org.jboss.example.jms.common.Util.doesDestinationExist(Util.java:43)
 [java] at 
org.jboss.example.jms.common.ExampleSupport.setup(ExampleSupport.java:146)
 [java] at 
org.jboss.example.jms.common.ExampleSupport.run(ExampleSupport.java:57)
 [java] at 
org.jboss.example.jms.queue.QueueExample.main(QueueExample.java:134)
 [java] Caused by: java.io.IOException
 [java] at 
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:602)
 [java] at 
org.jboss.naming.HttpNamingContextFactory.getNamingServer(HttpNamingContextFactory.java:133)
 [java] at 
org.jboss.naming.HttpNamingContextFactory.getInitialContext(HttpNamingContextFactory.java:80)
 [java] ... 8 more
 [java] Caused by: java.net.ConnectException: Connection timed out: connect
 [java] at java.net.PlainSocketImpl.socketConnect(Native Method)
 [java] at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:305)
 [java] at 
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:171)
 [java] at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:158)
 [java] at java.net.Socket.connect(Socket.java:452)
 [java] at java.net.Socket.connect(Socket.java:402)
 [java] at sun.net.NetworkClient.doConnect(NetworkClient.java:139)
 [java] at sun.net.www.http.HttpClient.openServer(HttpClient.java:402)
 [java] at sun.net.www.http.HttpClient.openServer(HttpClient.java:618)
 [java] at sun.net.www.http.HttpClient.(HttpClient.java:306)
 [java] at sun.net.www.http.HttpClient.(HttpClient.java:267)
 [java] at sun.net.www.http.HttpClient.New(HttpClient.java:339)
 [java] at sun.net.www.http.HttpClient.New(HttpClient.java:320)
 [java] at sun.net.www.http.HttpClient.New(HttpClient.java:315)
 [java] at 
sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:521)
 [java] at 
sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:498)
 [java] at 
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:626)
 [java] at 
sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:1502)
 [java] at 
java.net.URLConnection.getHeaderFieldInt(URLConnection.java:476)
 [java] at 
java.net.URLConnection.getContentLength(URLConnection.java:371)
 [java] at 
org.jboss.naming.HttpNamingContextFactory.getNamingServer(HttpNamingContextFactory.java:128)
 [java] ... 9 more


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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4027851
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JNDI/Naming/Network] - Re: javax.naming.NoInitialContextException error when access

2007-03-06 Thread jaikiran
anonymous wrote : Caused by: java.lang.ClassNotFoundException: 
org.jnp.interfaces.HttpNamingContextFactory

Hmmm Try this, change 

anonymous wrote : 
java.naming.factory.initial=org.jnp.interfaces.HttpNamingContextFactory

to

java.naming.factory.initial=org.jboss.naming.HttpNamingContextFactory

P.S.: The org.jboss.naming.HttpNamingContextFactory is present in the jboss.jar 
file. In case you dont have this jar file in your classpath, you can find it in 
%JBOSS_HOME%\server\default\lib folder




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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4025440
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JNDI/Naming/Network] - Re: javax.naming.NoInitialContextException error when access

2007-03-06 Thread emcwoo
jaikiran, thanks for your help.  However, the error occurred no matter how I 
set the java.naming.provider.url, even for a non-exist URL.  From the error 
message on the client side quoted below, the problem seems related to the 
property java.naming.factory.initial=org.jnp.interfaces.HttpNamingContextFactory


Detail error message:

 [java] javax.naming.NoInitialContextException: Cannot instantiate class: 
org.jnp.interfaces.HttpNamingContextFactory [Root exception is 
java.lang.ClassNotFoundException: org.jnp.interfaces.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:43)
 [java] at 
org.jboss.example.jms.common.ExampleSupport.setup(ExampleSupport.java:146)
 [java] at 
org.jboss.example.jms.common.ExampleSupport.run(ExampleSupport.java:57)
 [java] at 
org.jboss.example.jms.queue.QueueExample.main(QueueExample.java:134)
 [java] Caused by: java.lang.ClassNotFoundException: 
org.jnp.interfaces.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] ... 7 more

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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4025316
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JNDI/Naming/Network] - Re: javax.naming.NoInitialContextException error when access

2007-03-05 Thread jaikiran
emcwoo, i havent tried this before so i might not be of much help. However, you 
could try changing 

anonymous wrote : 
java.naming.provider.url=http://localhost:8080/invoker/JMXInvokerServlet 

to

anonymous wrote : 
java.naming.provider.url=http://:8080/invoker/JMXInvokerServlet

I did the following to figure out what provider url to specify:

- Go to http://localhost:8080/jmx-console
- Click on service=invoker,target=Naming,type=http 
- On the page that comes up, check what's the value in the textbox 
corresponding to the 'InvokerURL' property.
- Use this exact value as the value for java.naming.provider.url and then use 
it for running your application






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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4025273
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JNDI/Naming/Network] - Re: javax.naming.NoInitialContextException error when access

2007-03-04 Thread emcwoo
I followed the steps in:

http://wiki.jboss.org/wiki/Wiki.jsp?page=JNDIoverHTTP

However, the error javax.naming.NoInitialContextException was encountered.

The error also occurred after I followed the steps in

http://docs.jboss.org/jbossas/admindevel326/html/ch3.chapter.html#ch3.accessingjndi
 to set the provider url as follows instead

java.naming.provider.url=http://localhost:8080/invoker/JMXInvokerServlet




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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4024963
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user


[jboss-user] [JNDI/Naming/Network] - Re: javax.naming.NoInitialContextException error when access

2007-03-02 Thread jaikiran
anonymous wrote :  
java.naming.factory.initial=org.jnp.interfaces.HttpNamingContextFactory
  | java.naming.provider.url=http://localhost:8080/invoker/JNDIFactory
  | java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces 

That's not the right url. Any reason why you are changing these properties 
instead of using the default one?



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

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4024705
___
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user