users@glassfish.java.net

Re: Toplink Exception (TOPLINK-28018) - deploy time - B36

From: <glassfish_at_javadesktop.org>
Date: Fri, 01 Jun 2007 11:56:04 PDT

I was actually missing a set<MethodName>, but adding it made no difference. I've also tried stripping the classes of all code that is unnecessary for my initial test. The entity beans have all getters and setters for persisting fields, but the session bean is stripped so that only two methods are left: the getEntityManager() method and the method to find a record:<br><br>
<tt>
        public <T> T findRecord( Class<T> entityClass, String strQuery ) {<br>
                <br>
                 try {<br>
                        Query query = getEntityManager().createQuery( strQuery );<br>
                        return entityClass.cast( query.getSingleResult( ) );<br>
            } catch (EntityNotFoundException notFound) {<br>
                    return null;<br>
            } catch (NonUniqueResultException nonUnique) {<br>
                    return null;<br>
            } // try<br>
        } // findRecord<br>
</tt>
<br>
Still, the same deploy error occurs...<br>
<br>
Marius<br>
<br>
> Can you make sure that you have a set<MethodName>
> defined for each
> get<MethodName> or is<MethodName> for all entities
> for your persistence
> unit. If it turns out that a missing set<MethodName>
> is cause for the
> NPE, please file an issue under entity-persistence
> category.
>
> Thanks,
> Mitesh
[Message sent by forum member 'mariusw' (mariusw)]

http://forums.java.net/jive/thread.jspa?messageID=220082