Hi Jason,
I encountered the same problem. After searching for a long time I found several extra
necessary steps in order to get this working. First of all, see
http://technology.amis.nl/blog/?p=1368
Next, make sure that IIOP is listening to the correct IP address. If you go to the
Glassfish admin console, go to the IIOP settings under configuration. The default IIOP
listener is listening on port 3700 at ip address 0.0.0.0 which will result in a
connection error if you try to connect to it from another host. If you try to connect to
it from the samen host, this will go ok.
In order to connect to it from a remote host, add another IIOP listener on e.g. port
3701 and make sure that it ONLY listens on the "external" ip address of the Glassfish
server, e.g. 192.168.0.1 if that is it's IP address.
After this I had no problems anymore connecting to my remote session beans.
Greets, Wouter van Reeven
--
People: "If she weighs the same as a Duck, she's made of wood!"
Sir Bedevere: "And therefore...?"
On Wed, November 1, 2006 7:58, Jason.Huang_at_Sun.COM said:
> Hi, all
>
> I saw a faq in this page
> https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html about "How do I
> access a Remote EJB (3.0 or 2.x) from a non-Java EE web container like
> Tomcat or Resin?"
>
> In the step 3, it says
>
>
> Step 3. Add the necessary appserver code to the web server's
> classpath.
>
> See step 3 of stand-alone client access
> <https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html#Step_3._Include_appserv-rt.jar_and>
> for the list of required .jars.
>
> What does it meas by "web server's classpath", I copied the
> appserv-rt.jar and javaee.jar to the %Tomcat_Home%/server/lib, however,
> then the tomcat cannot start up with the following error:
> ------------------------------------------------------
> javax.naming.NamingException: Cannot create resource instance
> at
> org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:142)
> at
> javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
> at org.apache.naming.NamingContext.lookup(NamingContext.java:792)
> at org.apache.naming.NamingContext.lookup(NamingContext.java:152)
> at
> org.apache.catalina.realm.UserDatabaseRealm.start(UserDatabaseRealm.java:266)
> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1087)
> at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:520)
> at
> org.apache.catalina.core.StandardService.start(StandardService.java:502)
> at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:2304)
> at org.apache.catalina.startup.Catalina.start(Catalina.java:558)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
> UserDatabaseRealm[Catalina]: PWC2101: Exception looking up UserDatabase
> under key UserDatabase
> javax.naming.NamingException: Cannot create resource instance
> at
> org.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:142)
> at
> javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:304)
> at org.apache.naming.NamingContext.lookup(NamingContext.java:792)
> at org.apache.naming.NamingContext.lookup(NamingContext.java:152)
> at
> org.apache.catalina.realm.UserDatabaseRealm.start(UserDatabaseRealm.java:266)
> at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1087)
> at
> org.apache.catalina.core.StandardEngine.start(StandardEngine.java:520)
> at
> org.apache.catalina.core.StandardService.start(StandardService.java:502)
> at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:2304)
> at org.apache.catalina.startup.Catalina.start(Catalina.java:558)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> at java.lang.reflect.Method.invoke(Method.java:585)
> at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:294)
> at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:432)
>
> ------------------------------------------------------
>
> Could anyone provide some hints on this problem? Thanks in advance.
>
> Best Regards,
> --Jason
>
>
>
>