tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Romain Manni-Bucau <>
Subject Re: EJB Deployment in TomEE 6
Date Thu, 29 Dec 2016 13:28:15 GMT

using LocalInitialContextFactory the provider url is ignored (since you do
a local lookup) and the client instance you get is the one from the other
webapp. In the same JVM tomee will optimize the remote calls to but you
should still use org.apache.openejb.client.RemoteInitialContextFactory
instead of the Local one.

Romain Manni-Bucau
@rmannibucau <> |  Blog
<> | Old Blog
<> | Github <> |
LinkedIn <> | JavaEE Factory

2016-12-29 5:47 GMT+01:00 sudhish81 <>:

> Hi,
> I am working on a migration project moving a legacy system from Websphere
> to
> TomEE. The legacy system  is mainly having EJB2 and EJB 3 specifications.
> This application is wrapped as an EAR which contains two EJB projects and
> one web project. When I deployed this application in TomEE's apps folder, I
> can see all the  EJB's getting registered in the logs. But when I try to
> lookup the EJBs Remote interface withe the registered JNDI name and type
> casting it to java.rmi.Remote , I am getting a class cast exception as
> below
> java.lang.ClassCastException: com.sun.proxy.$Proxy85 cannot be cast to
> java.rmi.Remote
> I used the below context properties to get the Initial Context
> p.put("java.naming.factory.initial",
> "org.apache.openejb.core.LocalInitialContextFactory");
> p.put("java.naming.provider.url", "");
> Also if I try to lookup the EJB interface object without typcasting, I can
> see the object in the form
> proxy=fully qualified class name of the Remote interface.
> Since I am struck up with this issue, I cannot proceed further, could any
> one of you help me in resolving this issue
> --
> View this message in context: http://tomee-openejb.979440.
> Sent from the TomEE Users mailing list archive at

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message