[jboss-user] [EJB 3.0] - Re: Could not obtain connection to any of these urls: Remote

a0001428 do-not-reply at jboss.com
Fri Aug 21 01:53:44 EDT 2009


Hi,

Thank for you replay.

Let me explain better.

In my computer(Local) I have a client test:

public static void main(String[] args) {
		try {
			Properties properties = new Properties();
			properties.load(new FileInputStream("jndi.properties"));

			Context contexto = null;

			contexto = new InitialContext(properties);

			GreeterFacade beanRemoto = (GreeterFacade)

			contexto.lookup(BouncerFacadeBean.RemoteJNDIName);

			Collection resultado = beanRemoto.listadoPedidos();
			for (Iterator iterator = resultado.iterator(); iterator.hasNext();) {
				String object = (String) iterator.next();
				System.out.println("El resultado es:" + resultado);
			}
		}



This is the error(is a new error):

javax.naming.CommunicationException [Root exception is java.rmi.UnknownHostException: Unknown host: obelix; nested exception is: 
	java.net.UnknownHostException: obelix]
	at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:724)
	at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:589)
	at javax.naming.InitialContext.lookup(Unknown Source)
	at demoEJB.Testing.main(Testing.java:27)
Caused by: java.rmi.UnknownHostException: Unknown host: obelix; nested exception is: 
	java.net.UnknownHostException: obelix
	at sun.rmi.transport.tcp.TCPEndpoint.newSocket(Unknown Source)
	at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
	at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
	at sun.rmi.server.UnicastRef.invoke(Unknown Source)
	at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
	at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
	... 3 more
Caused by: java.net.UnknownHostException: obelix
	at java.net.PlainSocketImpl.connect(Unknown Source)
	at java.net.SocksSocketImpl.connect(Unknown Source)
	at java.net.Socket.connect(Unknown Source)
	at java.net.Socket.connect(Unknown Source)
	at java.net.Socket.(Unknown Source)
	at java.net.Socket.(Unknown Source)
	at sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(Unknown Source)
	at sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(Unknown Source)
	... 9 more



where obelix is the Sever remote name, this server has a IP Public(ISP): z.z.z.z

jndi.properties(for main client, local):

java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
java.naming.provider.url=jnp:// z.z.z.z(IP Public):1099 


==Server remote( win 2003 server, office server that is in another city)=============

On the server remote I did: 


I restarted JBOSS with run.bat -b 0.0.0.0 (command line)

JBoss Bootstrap Environment

04:43:19,977 INFO [Server] Starting JBoss (MX MicroKernel)...
04:43:19,993 INFO [Server] Release ID: JBoss [Trinity] 4.2.2.GA (build: SVNTag=JBoss_4_2_2_GA date=
200710221139)

04:43:25,212 INFO [WebService] Using RMI server codebase: http:// obelix :8083/

04:43:43,915 INFO [Http11Protocol] Inicializando Coyote HTTP/1.1 en puerto http-0.0.0.0-8080

I put on URL:(in server remote)
http://localhost:8080/jmx-console: (jboss.j2ee)

jar=ejb-jar-0.0.1-SNAPSHOT.jar,name=BixBox,service=EJB3
module=ejb-jar-0.0.1-SNAPSHOT.jar,service=EJB3

Server remote has:
Host file:
127.0.0.1 localhost


I hope I've explained well :) :)

Help me please!!

Thanks you!!


 
 

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

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



More information about the jboss-user mailing list