What do you mean with I use the same JVM... in your previous post? Same
java.exe executable, or same process?
If the latter: how do you start the Unit Tests so that they run inside the
container?
Wolfgang
View the original post :
Hi,
do you use JBoss 5? If yes: jbossall-client.jar just defines a bunch of
classpath entries in its Manifest.mf, so you have to add much more JARs to your
classpath (but I cannot tell you, which ones).
And one more thing: as your unit test seems to be a standalone application
client, you
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
In case of an test client startet with an own main method this client runs in
fact in a different process then the jboss and your ejbs. In that case you must
use the remote interfaces as per the process is remote to the jboss (as already
Wolfgang and ALR said).
View the original post :
Hi,
what does the JNDIView ( http://www.jboss.org/community/docs/DOC-9583 ) display
for your bean and for the app client?
According to the message, I would suspect that the JNDI path continues
(something like MyBean/local/somethingmore), and your lookup is not done on
the end node of the
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
Oops, my bad... Local interfaces can be cast directly:
MyLocal local = (MyLocal) ctx.lookup(MyBean/local);
Probably a narrow would even result in error.
By the way, with EJB3, the narrow is even for remote interfaces no longer
required, direct casting is possible.
And one more thing: a Unit
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 :
mvpc wrote : java.lang.ClassCastException: javax.naming.Reference cannot be
cast to br.com.original.negocio.email.interfaces.IEmailLocal
This is a common symptom that you don't have the proxy object factories on your
client CP. Typically this is fixed by ensuring you've got
Oops, my bad... Local interfaces can be cast directly:
MyLocal local = (MyLocal) ctx.lookup(MyBean/local);
Probably a narrow would even result in error.
By the way, with EJB3, the narrow is even for remote
interfaces no longer required, direct casting is
possible.
Maybe in most
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 :
11 matches
Mail list logo