You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "Jacek Laskowski (JIRA)" <ji...@apache.org> on 2007/07/12 14:03:04 UTC
[jira] Created: (OPENEJB-607) Cannot access server(s): null:-1 when
InitialContext.PROVIDER_URL is hostname not IP address
Cannot access server(s): null:-1 when InitialContext.PROVIDER_URL is hostname not IP address
--------------------------------------------------------------------------------------------
Key: OPENEJB-607
URL: https://issues.apache.org/jira/browse/OPENEJB-607
Project: OpenEJB
Issue Type: Bug
Components: connectors, server
Affects Versions: 3.0
Reporter: Jacek Laskowski
Assignee: Jacek Laskowski
Priority: Critical
When a remote client accesses OpenEJB (and Geronimo) and uses hostname, e.g. localhost not IP address the following exception is thrown:
WARNING: Cannot access server(s): null:-1 Exception:
java.io.IOException: Cannot access server: null:-1 due to an unkown exception in the OpenEJB client: java.lang.IllegalArgumentException : port out of range:-1
at org.apache.openejb.client.SocketConnectionFactory$SocketConnection.open(SocketConnectionFactory.java:60)
at org.apache.openejb.client.SocketConnectionFactory.getConnection(SocketConnectionFactory.java:34)
at org.apache.openejb.client.ConnectionManager.getConnection(ConnectionManager.java:43)
at org.apache.openejb.client.Client.processRequest(Client.java:60)
at org.apache.openejb.client.Client.request(Client.java:40)
at org.apache.openejb.client.JNDIContext.request(JNDIContext.java:72)
at org.apache.openejb.client.JNDIContext.lookup(JNDIContext.java:195)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at remote.MEJBClient.main(MEJBClient.java:20)
The properties in question are:
props.put(InitialContext.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.client.RemoteInitialContextFactory");
props.put(InitialContext.PROVIDER_URL, "localhost:4201");
Change localhost to 127.0.0.1 and it'll work fine.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Closed: (OPENEJB-607) Cannot access server(s): null:-1 when
InitialContext.PROVIDER_URL is hostname not IP address
Posted by "Jacek Laskowski (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENEJB-607?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jacek Laskowski closed OPENEJB-607.
-----------------------------------
Resolution: Fixed
Fix Version/s: (was: 3.0.x)
3.0
Sending server/openejb-client/src/main/java/org/apache/openejb/client/JNDIContext.java
Adding server/openejb-client/src/test/java/org/apache/openejb/client/JNDIContextTest.java
Transmitting file data ..
Committed revision 634818.
> Cannot access server(s): null:-1 when InitialContext.PROVIDER_URL is hostname not IP address
> --------------------------------------------------------------------------------------------
>
> Key: OPENEJB-607
> URL: https://issues.apache.org/jira/browse/OPENEJB-607
> Project: OpenEJB
> Issue Type: Bug
> Components: connectors, server
> Affects Versions: 3.0.x
> Reporter: Jacek Laskowski
> Assignee: Jacek Laskowski
> Priority: Critical
> Fix For: 3.0
>
>
> When a remote client accesses OpenEJB (and Geronimo) and uses hostname, e.g. localhost not IP address the following exception is thrown:
> WARNING: Cannot access server(s): null:-1 Exception:
> java.io.IOException: Cannot access server: null:-1 due to an unkown exception in the OpenEJB client: java.lang.IllegalArgumentException : port out of range:-1
> at org.apache.openejb.client.SocketConnectionFactory$SocketConnection.open(SocketConnectionFactory.java:60)
> at org.apache.openejb.client.SocketConnectionFactory.getConnection(SocketConnectionFactory.java:34)
> at org.apache.openejb.client.ConnectionManager.getConnection(ConnectionManager.java:43)
> at org.apache.openejb.client.Client.processRequest(Client.java:60)
> at org.apache.openejb.client.Client.request(Client.java:40)
> at org.apache.openejb.client.JNDIContext.request(JNDIContext.java:72)
> at org.apache.openejb.client.JNDIContext.lookup(JNDIContext.java:195)
> at javax.naming.InitialContext.lookup(InitialContext.java:351)
> at remote.MEJBClient.main(MEJBClient.java:20)
> The properties in question are:
> props.put(InitialContext.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.client.RemoteInitialContextFactory");
> props.put(InitialContext.PROVIDER_URL, "localhost:4201");
> Change localhost to 127.0.0.1 and it'll work fine.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (OPENEJB-607) Cannot access server(s): null:-1
when InitialContext.PROVIDER_URL is hostname not IP address
Posted by "David Blevins (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENEJB-607?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12530624 ]
David Blevins commented on OPENEJB-607:
---------------------------------------
This is because when formatted as a URL the "localhost" part becomes the scheme of the URL, such as "http" or "ftp" would.
Specifying the PROVIDER_URL as "ejbd://localhost:4201" should work just fine.
> Cannot access server(s): null:-1 when InitialContext.PROVIDER_URL is hostname not IP address
> --------------------------------------------------------------------------------------------
>
> Key: OPENEJB-607
> URL: https://issues.apache.org/jira/browse/OPENEJB-607
> Project: OpenEJB
> Issue Type: Bug
> Components: connectors, server
> Affects Versions: 3.0.x
> Reporter: Jacek Laskowski
> Assignee: Jacek Laskowski
> Priority: Critical
> Fix For: 3.0.x
>
>
> When a remote client accesses OpenEJB (and Geronimo) and uses hostname, e.g. localhost not IP address the following exception is thrown:
> WARNING: Cannot access server(s): null:-1 Exception:
> java.io.IOException: Cannot access server: null:-1 due to an unkown exception in the OpenEJB client: java.lang.IllegalArgumentException : port out of range:-1
> at org.apache.openejb.client.SocketConnectionFactory$SocketConnection.open(SocketConnectionFactory.java:60)
> at org.apache.openejb.client.SocketConnectionFactory.getConnection(SocketConnectionFactory.java:34)
> at org.apache.openejb.client.ConnectionManager.getConnection(ConnectionManager.java:43)
> at org.apache.openejb.client.Client.processRequest(Client.java:60)
> at org.apache.openejb.client.Client.request(Client.java:40)
> at org.apache.openejb.client.JNDIContext.request(JNDIContext.java:72)
> at org.apache.openejb.client.JNDIContext.lookup(JNDIContext.java:195)
> at javax.naming.InitialContext.lookup(InitialContext.java:351)
> at remote.MEJBClient.main(MEJBClient.java:20)
> The properties in question are:
> props.put(InitialContext.INITIAL_CONTEXT_FACTORY, "org.apache.openejb.client.RemoteInitialContextFactory");
> props.put(InitialContext.PROVIDER_URL, "localhost:4201");
> Change localhost to 127.0.0.1 and it'll work fine.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.