I did some exploring into the source code of openejb 2.1 and stripped away
the offending code:
final String serverURL = "ejbd://127.0.0.1:4201";
final URL url = new URL("http://"+serverURL);
final InetAddress inet = InetAddress.getByName(url.getHost());
Now, if I catch the exception it, it throws a similar exception openejb
reported:
java.net.UnknownHostException: ejbd: ejbd
at java.net.InetAddress.getAllByName0(InetAddress.java:1145)
at java.net.InetAddress.getAllByName(InetAddress.java:1072)
at java.net.InetAddress.getAllByName(InetAddress.java:1008)
at java.net.InetAddress.getByName(InetAddress.java:958)
Its adding http + ejb for connection strings resulting in a url of:
"http://ejbd://127.0.0.1:4201". First question, is this an invalid URL?
The URL class does not throw an error on creating this URL. The method
url.getHost() returns "ejbd".
Next, I took the code snippet and removed the "http://" and tried this code:
final String serverURL = "ejbd://127.0.0.1:4201";
final URL url = new URL(serverURL);
But I get an exception on the second line of:
java.net.MalformedURLException: unknown protocol: ejbd
at java.net.URL.<init>(URL.java:574)
at java.net.URL.<init>(URL.java:464)
at java.net.URL.<init>(URL.java:413)
Any suggestions?
--
View this message in context:
http://www.nabble.com/Remote-EJB-Connect---Initial-Context%2C-host-unknown-Exception-tp17280392s134p17317520.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.