on 08-20-2007 11:28 AM
Hello
We have one EJB deployed in a Weblogic Server.
When we connected with a junit client to the ejb the comunication is correct, but if the client is a Webdynpro project deployed in the server SAP WAS there is a classcast exception when is executed the PortableRemoteObject.narrow method.
Our client code is this:
private ObjectHome getHome() throws Exception {
String jndiname = "ejb/name";
Object ref = getContext().lookup(jndiname);
ObjectHome objectHome=(ObjectHome)PortableRemoteObject.narrow(ref, ObjectHome.class);
return ampliacionJornadaHome;
}
private InitialContext getContext() throws NamingException {
Hashtable props = new Hashtable();
props.put(InitialContext.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
props.put(InitialContext.PROVIDER_URL, "t3://server:7010");
props.put("force_remote", "true");
InitialContext initialContext = new InitialContext(props);
return initialContext;
}
public void onActionClass(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
{
try
{
HashMap parameters = new HashMap();
ObjectHomeHome ejbHome = getHome();
}
catch (Exception e) { }
}
The ClassCastException is generated in the PortableRemoteObject.narrow(ref, ObjectHome.class),
We have detected that the getContext().lookup(jndiname); return the next object com.sap.engine.services.iiop.CORBA.CORBAObject:com.sap.engine.services.iiop.server.portable.Delegate_1_2@cee0f4
Any suggestion will be well received.
Thanks and Regards
Hi Alfredo
did you find any solution to this class cast ?
I got the same exception and I tested a lot of things but no solutions.
Thks
Johann
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
As this is not XI/PI related you should post this question to another forum, like Java Programming.
Regards
Stefan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.