[jboss-user] [Persistence, JBoss/CMP, Hibernate, Database] - JBoss 3.2.5 MySQL 4.0 finder Method gives a Finder Exception

pintovc do-not-reply at jboss.com
Sat Nov 4 15:47:06 EST 2006


I have created an EJB with CMP in JBoss 3.2.5. It deploys fine. When I try to find a record in the database table it gives me a FinderException error. 
However, I am able to see the record in the table. Here is the code in the EJB.

try{
    home.create("test","password");
    Collection col = home.findByUserName("test");
}catch(FinderException fe){
   throw new EJBException("Cannot find user");
}

The database table has 3 columns: id, userName and password of type integer, varchar and varchar respectively. There is only one record in the database with field values of (1,"test", "junk")

Here is the error trace. 

14:25:18,236 ERROR [LogInterceptor] EJBException:
javax.ejb.EJBException: Cannot find user
	at wonomi.identityManagement.ejb.FiboBean.compute(FiboBean.java:126)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:324)
	at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:683)

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3983243#3983243

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3983243



More information about the jboss-user mailing list