Re: [appfuse-user] Can't use GenericManager in StartupListener?

2010-05-05 Thread Josep García
Did you try to add your bean definition in the src/test/resources/applicationContext-test.xml file? 2010/5/5 Tony Luo > Hi All, > > I need to put a list of object in memory when application start. > The object is quite simple so I generate the service by Generic > Manager and configured it in ap

[appfuse-user] Cycle detected problem in web servive

2010-05-05 Thread mlounnaci
Hello, When i tried to retrive a List from my getCustomers() webservice method a cycle detected exception occured because the objects have a bidirectional relation. Please, any solution? Thanks for help. -- View this message in context: http://appfuse.547863.n4.nabble.com/Cycle-detected-probl

Re: [appfuse-user] Can't use GenericManager in StartupListener?

2010-05-05 Thread Matt Raible
You could try altering your StartupListenerTest to load applicationContext.xml. This should work. If it doesn't, you're probably altering the wrong file. On Wed, May 5, 2010 at 12:44 AM, Tony Luo wrote: > Hi Matt, > > I noticed that StartupListenerTest doesn' load applicationContext.xml. > But e

Re: [appfuse-user] Can't use GenericManager in StartupListener?

2010-05-05 Thread tibi
take care that sometimes there are multplie files with the same name. in test and main. tibi Quoting Matt Raible : You could try altering your StartupListenerTest to load applicationContext.xml. This should work. If it doesn't, you're probably altering the wrong file. On Wed, May 5, 2010 at

[appfuse-user] load lazy collection hibernate

2010-05-05 Thread tibi
hi i want to load the lazy collection. but the transaction seems to be closed already. anny ideas?? i have this: public User getFullUserByUsername(String username) throws UsernameNotFoundException { List users = getHibernateTemplate().find("from User where username=?", usern

Re: [appfuse-user] load lazy collection hibernate

2010-05-05 Thread Ebrahim Pasbani
Hi Please show complete stack trace of exception On Wed, May 5, 2010 at 6:41 PM, wrote: > > hi i want to load the lazy collection. but the transaction seems to be > closed already. > > anny ideas?? > > i have this: > >public User getFullUserByUsername(String username) throws > UsernameNotFou

Re: [appfuse-user] load lazy collection hibernate

2010-05-05 Thread tibor strausz
i will look at it tomorrow when i'm at work again. it will be a standard stacktrace. i thought the session is closed much later (when going to the view). but i will look at it tomorrow good night ;) tibi Ebrahim Pasbani wrote: > Hi > Please show complete stack trace of exception > > On Wed, Ma

[appfuse-user] Exception thrown when a unique field in database is duplicate

2010-05-05 Thread Juan Antonio
Hello everybody. I have a problem. I generate a random field, that must be unique, and i need to catch the exception thrown in the save() method in the DAO. What is the exception thrown? Is an HibernateException, a RuntimeException...? I used to catch an ConstraintViolationException, could be

Re: [appfuse-user] Exception thrown when a unique field in database is duplicate

2010-05-05 Thread Juan Antonio Calderón
Maybe DataIntegrityViolationException could be used, like in UserManagerImpl.java? Thanks. 2010/5/6 Juan Antonio > > Hello everybody. > > I have a problem. > > I generate a random field, that must be unique, and i need to catch the > exception thrown in the save() method in the DAO. > > What is

Re: [appfuse-user] Exception thrown when a unique field in database is duplicate

2010-05-05 Thread Matt Raible
Yes, this is the recommended exception to catch. 2010/5/5 Juan Antonio Calderón > Maybe DataIntegrityViolationException could be used, like in > UserManagerImpl.java? > > Thanks. > > 2010/5/6 Juan Antonio > > >> Hello everybody. >> >> I have a problem. >> >> I generate a random field, that must

Re: [appfuse-user] Exception thrown when a unique field in database is duplicate

2010-05-05 Thread Dustin Pearce
Are you generating a random number for the object "key" and then seeing if its already there and trying again...and again...? Just curious. -D On May 5, 2010, at 7:17 PM, Juan Antonio Calderón wrote: > Maybe DataIntegrityViolationException could be used, like in > UserManagerImpl.java? > > T