You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by Wayne Rasmuss <wa...@popstarnetworks.com> on 2008/09/23 17:25:04 UTC

class cast exception in findby method: cannot cast java.util.UUID to ProxyInfo

Hello,

I am trying to move a geronimo 1.1.1 application to geronimo 2.1.2. I have a
number of BMP entitiy beans. My application deploys just fine (amazing) but
when I try to run it I get the error below after I log in. The problem seems
to be with the return value of the following find by method. 

Thanks for the help
Wayne


CLASSES:
Foo is the base type for the bean and UUID is the priamary key type. 
Source is a locator for a datasource.


METHOD:
public UUID ejbFindBy(QualName name) throws FinderException {
        Foo checkImpl = null;
        try {
            try {
                checkImpl = FooImpl.load(name, Source.get());
            } catch (MemberNotFound e) {
            //This means we don't exist. That's fine for now.
            }
        } catch (SQLException e) {
            FinderException exception = new FinderException("Could not load
foo. Cause: " + e);
            exception.initCause(e);
            throw exception;
        }
        return checkImpl != null ? checkImpl.getId() : null;
    }


ERROR
org.apache.jasper.JasperException: java.lang.ClassCastException:
java.util.UUID cannot be cast to org.apache.openejb.ProxyInfo

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:413)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:806)

root cause

java.lang.ClassCastException: java.util.UUID cannot be cast to
org.apache.openejb.ProxyInfo

org.apache.openejb.core.entity.EntityEjbHomeHandler.findX(EntityEjbHomeHandler.java:88)

org.apache.openejb.core.ivm.EjbHomeProxyHandler._invoke(EjbHomeProxyHandler.java:161)

org.apache.openejb.core.ivm.BaseEjbProxyHandler.invoke(BaseEjbProxyHandler.java:321)

org.apache.openejb.util.proxy.Jdk13InvocationHandler.invoke(Jdk13InvocationHandler.java:49)
	$Proxy50.findBy(Unknown Source)

com.popstarnetworks.simplerealmservice.console.IndexHelper.<init>(IndexHelper.java:47)
	org.apache.jsp.index_jsp._jspService(index_jsp.java:55)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:806)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:369)
	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:337)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:806)

-- 
View this message in context: http://www.nabble.com/class-cast-exception-in-findby-method%3A-cannot-cast-java.util.UUID-to-ProxyInfo-tp19630219s134p19630219.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.