Jython java call throws exception asking for 2 args when only one arg is coded
Posted
by clutch
on Stack Overflow
See other posts from Stack Overflow
or by clutch
Published on 2010-06-18T06:59:16Z
Indexed on
2010/06/18
7:03 UTC
Read the original article
Hit count: 284
I have an Java method I want to call within my Jython servlet running on tomcat5. It looks like this:
@SuppressWarnings("unchecked")
public School loadByName(String name) {
List<School> school;
school = getHibernateTemplate().find("from " + getPersistentClass().getName() + " where name = ?", name);
return uniqueResult(school);
}
I call it in Jython using:
foobar = SchoolDAOHibernate.loadByName('Univeristy')
It throws an error that says loadByName() expects 2 args; got 1. What other argument could it be looking for?
© Stack Overflow or respective owner