Hi,
I have a problem testing the local interface of an entity bean using cactus.
If I perform any operations on the localhome interface i get a npe:
java.lang.NullPointerException at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:110)
at $Proxy0.create(Unknown Source)
at vmdb.test.unit.db.ejb.SuspensionEntityBeanCaTest.testLocalCreate
[...]
Accessing a remote interface works fine. I don't know whats wrong. Can someone give me a hint?
Thanks for help.
regards,
Marcel
Here is my cactus test code:
public SuspensionEntityBeanCaTest(
String theName)
throws NamingException {
super(theName);
env.put(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
env.put(Context.PROVIDER_URL, "localhost:1099");
env.put(Context.URL_PKG_PREFIXES,
"org.jbosss.naming:org.jnp.interfaces");
jndi = new InitialContext(env);
}
public void testLocalCreate()
throws NamingException, CreateException, FinderException {
SuspensionEntityBeanLocalHome home =(SuspensionEntityBeanLocalHome) jndi.lookup(SuspensionEntityBeanLocalHome.JNDI_NAME);
SuspensionEntityBeanLocal local = home.create();
}