Hi Jason,
Sorry it took awhile for me to get back on your question.
On Thu, Nov 02, 2006 at 10:36:30AM +0800, Jason.Huang_at_Sun.COM wrote:
> Wouter, what's error you got and what's the version of glassfish you used?
I am using Glassfish V2 build 22. I know this isn't supported by NetBeans but it
was the newest version I could get at.
This is what I did: I created an EJB module called EJBTest-ejb and created as
simple remote session bean in it. This bean only has one method, sayHello(),
which returns the string "Hello World!".
Next I created a simple Java class that contains this code in the main method
Properties props = System.getProperties();
props.setProperty("java.naming.factory.initial", "com.sun.enterprise.naming.SerialInitContextFactory");
props.setProperty("java.naming.factory.url.pkgs", "com.sun.enterprise.naming");
props.setProperty("java.naming.factory.state", "com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl");
props.setProperty("org.omg.CORBA.ORBInitialHost", "galaxy");
props.setProperty("org.omg.CORBA.ORBInitialPort", "3700");
try {
InitialContext ic = new InitialContext();
TestRemote testRemote = (TestRemote)ic.lookup(TestRemote.class.getName());
System.out.println(testRemote.sayHello());
} catch (NamingException ex) {
ex.printStackTrace();
}
Here, galaxy is another host which I am trying to connect to remotely. I also
configured the application to use the jar from the EJBTest-ejb project as well
as the appserv-rt.jar and javaee.jar libs from Glassfish.
When I run this application from NetBeans I get this error message:
Nov 5, 2006 8:26:50 PM com.sun.corba.ee.impl.transport.SocketOrChannelConnectionImpl <init>
WARNING: "IOP00410201: (COMM_FAILURE) Connection failure: socketType: IIOP_CLEAR_TEXT; hostname: 127.0.1.1; port: 3700"
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
This error messages goes on and on and on and on and repeatedly mentions port
3700, 3820 and 3920 which are the standard IIOP ports. I need to manually
terminate the process for else it will go on ifinitely, or so it seems.
When I add an iiop-listener on port 3701 which only listens to the ip address of
galaxy (which in my case is 10.10.10.7) and not 0.0.0.0 alls goes well, even
when I try to connect to port 3700 and not 3701:
run:
Hello World!
BUILD SUCCESSFUL (total time: 8 seconds)
So, I installed Glassfish v1 UR1 build 14 and tried with that as well. I first
tried without the additional iiop listener and got the same error messages as
before. Next I created a new iiop listener on port 3701 and 10.10.10.7 again and
the application printed "Hello World!" again.
So, what am I doing differently than you?
Greets, Wouter
--
People: "If she weighs the same as a Duck, she's made of wood!"
Sir Bedevere: "And therefore...?"