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

2010-05-06 Thread Juan Antonio Calderón
That's what i do, perhaps i didn't explain myself very well. :D Doing a lookup searching if there is a duplicate it's almost the same (make a loop, find by the field, catch the "NoSuch..."), almost the same complicated... My "only" problem here was to know the exception thrown (in struts 1 i used

Re: [appfuse-user] Cycle detected problem in web servive

2010-05-06 Thread Dale Newfield
On 5/5/10 3:54 AM, mlounnaci wrote: When i tried to retrive a List from my getCustomers() webservice method a cycle detected exception occured because the objects have a bidirectional relation. What is serializing/constructing the schema for the objects in your service? IIRC I used to use "a

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

2010-05-06 Thread Dale Newfield
On 5/6/10 10:57 AM, Juan Antonio Calderón wrote: Is not an object "key", is a property in a model java class, an unique field in the database :) I have to try it, to know if there is a duplicate field. Any other way? ;) You could always try to do a lookup based on that potential unique value

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

2010-05-06 Thread tibi
i don't get the problem. you have an object with a field which is unique than make the object, save it using a dao, catch the exception. if it is something with unique constrain than you know... tibi Quoting Juan Antonio Calderón : Is not an object "key", is a property in a model java cla

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

2010-05-06 Thread Juan Antonio Calderón
Is not an object "key", is a property in a model java class, an unique field in the database :) I have to try it, to know if there is a duplicate field. Any other way? ;) Thanks everybody. 2010/5/6 Dustin Pearce > Are you generating a random number for the object "key" and then seeing if > it

[appfuse-user] Re: WebServices from Appfuse 2.0 struts

2010-05-06 Thread sudhakargupta_somu
Thanks for reply. What is the meaning of CXF, and i don't know anything about CXF. can you please guide me to learn about integrate web services with appfuse 2.0. Actually i am interested to learn the web services, but i am unable to find the good tutorials to learn. can you please provide the g

[appfuse-user] security with different page per exception

2010-05-06 Thread tibi
i want e different flow for different exception. like credentials expired will go to a renew credentials page. it took me some time to figure it out so here is my full security.xml file. key issues: - http auto-config must be set to false - when you do this you need to add - and you need to ad

Re: [appfuse-user] load lazy collection hibernate

2010-05-06 Thread tibi
thanks ivan, i did not know this one. but do i really need this? i don't need an open session in the view. i access the lazy list in the dao/action already. i don't need it in the view. thanks, tibi Quoting liu Ivan : You should use this ServletFilter to close hibernate Session: hibern

Re: [appfuse-user] load lazy collection hibernate

2010-05-06 Thread liu Ivan
You should use this ServletFilter to close hibernate Session: hibernateFilter org.springframework.orm.hibernate3.support.OpenSessionInViewFilter 2010/5/6 > > here the code of the user object: >@OneToMany >private Set passwordHistory = new > HashSet(); > > here the stacktrace: > > ERRO

Re: [appfuse-user] load lazy collection hibernate

2010-05-06 Thread tibi
here the code of the user object: @OneToMany private Set passwordHistory = new HashSet(); here the stacktrace: ERROR [4010...@qtp-19386565-3] LazyInitializationException.(42) | failed to lazily initialize a collection of role: nl.rapidsugar.emailOpMaat.model.User.passwordHistory,

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

2010-05-06 Thread tibi
i would write a test and see what happens ;) Quoting 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