Problem calling AS8.2 EJB from Sun WebServer 6.1

Last time I've probably posted my question in to the wrong forum. Sorry for cross-posting, but I really need to solve this issue.

I am calling an EJB from a JSF portlet. When I deploy the portlet on a Sun Portal 7, running on a Webserver 6.1, then

InitialContext.lookup(String)

returns

com.sun.corba.se.impl.corba.CORBAObjectImpl

instead of

...MyClassHome_DynamicStub

ThePortableRemoteObject.narrow then returns null instead of the class...

I've found a solution to this here: http://forum.java.sun.com/thread.jspa?forumID=136&threadID=619420

The solution is to use another INITIAL_CONTEXT_FACTORY:

props.setProperty(Context.INITIAL_CONTEXT_FACTORY, "com.sun.appserv.naming.S1ASCtxFactory")

But I need this to be done on a WebServer, and

com.sun.appserv.naming.S1ASCtxFactory is contained in the Application server jar (appserver-rt.jar I believe).

According to this:

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6336410

I can't use this jar in the Sun Webserver. And it's probably true, the portlet doesn't work with the jar packaged in to the WAR.

Is there any other solution to this?

[1245 byte] By [Martin777a] at [2007-11-26 18:10:22]
# 1
> Is there any other solution to this?Yes, there is. The EJB Client Jar was missing the RMI stubs. When I called the EJB from the AS8, the server probably created the stubs, but webserver didn't. rmic -iiop classname solved the issue.
Martin777a at 2007-7-9 5:42:40 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...