Local interface question
mesketh Dec 28, 2001 4:25 AMI've got a local home i/f impl that has a findAll() on it. I have defined the local EJBLocalObject class with the relevant accessors for the attributes I want to manipulate in the web-tier. I'm having difficulty though, getting JBoss to deploy it due to the following stack trace:
[17:22:21,355,ContainerFactory] Could not deploy file:/C:/tools/jboss-3.0.0alpha
/deploy/Default/RomanEJB.jar
java.lang.NullPointerException
at org.jboss.ejb.plugins.cmp.jdbc.bridge.JDBCEntityBridge.loadSelectors(
JDBCEntityBridge.java:213)
I've checked the JDBCEntityBridge class on line 213 and it's fairly innocuous.
Does anyone know what the problem is?
ejb-jar.xml (ejb-ql):
<query-method>
<method-name>findAll</method-name>
<method-params>
</method-params>
</query-method>
<ejb-ql>
SELECT OBJECT(w) FROM WorkAreaSchema as w
</ejb-ql>
Local i/f:
public interface WorkAreaLocalHome extends EJBLocalHome
{
public abstract Collection findAll() throws FinderException;
}
Local obj:
public interface WorkAreaLocal extends EJBLocalObject, IWorkArea
{
}
I have also declared a helper method on my remote i/f for retrieving the snapshot objects rather than have a collection of remote objects to pore through in my JSP view pages.
public Collection ejbHomeGetAllWorkAreas() throws RemoteException
{
Collection locals = null;
try
{
WorkAreaLocalHome waLocalHome = getWorkAreaLocalHome();
locals = waLocalHome.findAll();
}
catch (Exception e)
{
throw new RemoteException("Couldn't resolve the local home i/f for WorkArea",
e);
}
Collection results = null;
if (!locals.isEmpty())
{
results = new ArrayList(locals.size());
WorkAreaLocal nextLocal = null;
Iterator iter = locals.iterator();
while (iter.hasNext())
{
nextLocal = (WorkAreaLocal)iter.next();
results.add(
new WorkAreaStateHolder(nextLocal.getWorkAreaID(),
nextLocal.getName(),
nextLocal.getDescription()));
}
}
return results;
}
This is defined in the home i/f thus:
public Collection getAllWorkAreas() throws RemoteException;