Hello people! I'm having trouble on EJB3 unit test.
I'm getting a class cast exception when i try to retrieve the local bean
interface for unit testing. My code is the following:
// configure the enviroment
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,"org
I think the problem is not there, because I can get the Reference to MyBean
with
ctx.lookup("MyBean/local")
The problem is when i try to narrow this with
MyBeanLocalInterface i = PortableRemoteObject.narrow(ref, MyBean.class)
Propably i'm missing some jar in the classpath. The server i'm us
Hummm I changed the code to:
MyLocal local = (MyLocal)ctx.lookup("MyBean/local");
But I am now getting the exception:
java.lang.ClassCastException: javax.naming.Reference cannot be cast to
br.com.original.negocio.email.interfaces.IEmailLocal
Thanks!
View the original post :
http://www.jb
I use the same JVM that the EJB is deployed and have added the
jbossall-cliente.jar and it doesn't work at all, I get the same exception.
My EJB application is running when i execute the unit test. Is This right ?
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopi
I just meant that i am executing the unit tests on same machine that the EJB is
deployed. Really I use JBoss 5 and i think there are lots of jars more to add
to classpath. And I have to use local interface, i can't use remote interface
in a application that's running locally.
Thanks! I'll sear
Hello!
I have have the same problem. So please if you find the solution,
post it here :) .
Thanks!
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4222320#4222320
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4222320
_
Hello people!
I have the same problem that You mentioned.
But I have create the same tests in a separate project and it runs with no
problem. I think there must be some libary in the EJB project that stop the
microcontainer unit test from executing when it is in the EJB project.
View th
Hello People!
I am having some trouble with a ajax form. After i have inserted the object on
the database through ejb sessionbean and call a method to clean the jsf form by
setting null the managed bean object attributes. I receive a message
(Transaction Fail) from jsf PhaseListener mecanism, a
Hello!
could anyone explain me how do i install the Jboss AS when i make the download
from
http://switch.dl.sourceforge.net/sourceforge/jboss/jboss-4.0.4.GA-Patch1-installer.jar
I get the file jboss-4.0.4.GA-Patch1-installer.jar but when i click it to
execute it opens and i find a lot of dire