LazyInitializationException for ASO?
Hi All, I have a very simple layout component where I look for two ASOs and display text based on them. Component snip: http://pastebin.com/m69540e56. Tml snip: http://pastebin.com/m4435806f. I am getting this exception http://pastebin.com/m42ec222a. I dont have any hibernate session injected and I am not calling any getters of objects that would throw a lazy init exception. This happens even right after I restart jetty so both ASOs should be null right? When I return null for getSurvey() the exception goes away. Any ideas? Thanks in advance, Zack -- View this message in context: http://n2.nabble.com/LazyInitializationException-for-ASO--tp363398p363398.html Sent from the Tapestry Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: LazyInitializationException for ASO?
Its a pretty simple hibernate entity: http://pastebin.com/m6c765ff4 Would it matter that Project is a property of Survey? Thanks for the quick reply! Zack Marcus wrote: > > Hi Zack, > > Maybe the problem is related to Survey.java, can you post the code? > > Marcus > > -- View this message in context: http://n2.nabble.com/LazyInitializationException-for-ASO--tp363398p363410.html Sent from the Tapestry Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: LazyInitializationException for ASO?
Yea that seems to have done it. Shouldnt I be able to just check if the ASO is null? Every @ApplicationState of mine is set create = false. I might use that other places in the app and just want make sure I know the cause of the error so it doesnt crop up elsewhere. Zack Jonathan Barker wrote: > > > Are there any places where you use the @ApplicationState annotation for > Survey or Project without create=false? > > What happens if you test on "surveyExists" which would be the way before > the > create=false option was introduced? > > -- View this message in context: http://n2.nabble.com/LazyInitializationException-for-ASO--tp363398p363430.html Sent from the Tapestry Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: LazyInitializationException for ASO?
Ha there you go. Modified code to this: http://pastebin.com/m7f98ffbe and all worked fine without surveyExists. This is good to note for future acegi-based development :) Thanks so much for your help! Zack Jonathan Barker wrote: > > > I think you should. > > It looks like Tapestry is having the problem displaying the error page. > You > have the conditional for outside the ifLoggedIn check. Out of curiosity, > what happens if that is moved inside the ifLoggedIn check? > > I'm wondering if the Acegi RememberMe filter is putting a detached > Hibernate > object into the HTTP Session that Tapestry is trying to display on an > error > page, thereby triggering the exception. So you would be seeing the error > because you are triggering another error... or not ;-) > > Jonathan > > > > >> -Original Message- >> From: zack.manning [mailto:[EMAIL PROTECTED] >> Sent: Monday, July 07, 2008 14:40 >> To: users@tapestry.apache.org >> Subject: RE: LazyInitializationException for ASO? >> >> >> Yea that seems to have done it. Shouldnt I be able to just check if the >> ASO >> is null? Every @ApplicationState of mine is set create = false. I might >> use that other places in the app and just want make sure I know the cause >> of >> the error so it doesnt crop up elsewhere. >> >> Zack >> >> >> Jonathan Barker wrote: >> > >> > >> > Are there any places where you use the @ApplicationState annotation for >> > Survey or Project without create=false? >> > >> > What happens if you test on "surveyExists" which would be the way >> before >> > the >> > create=false option was introduced? >> > >> > >> >> -- >> View this message in context: >> http://n2.nabble.com/LazyInitializationException-for-ASO-- >> tp363398p363430.html >> Sent from the Tapestry Users mailing list archive at Nabble.com. >> >> >> - >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://n2.nabble.com/LazyInitializationException-for-ASO--tp363398p363459.html Sent from the Tapestry Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
[T5] Class contains field(s) (_$configAttributeDefinition_14) that are not private.
Hi All, Seemingly without provocation Tapestry is throwing this error that I cannot figure out. My page simply has an beaneditform and some text when a refresh threw this. Can't get it to go away even after removing what I had been working on. The field it is referring to seems to belong to acegi? Any help would be greatly appreciated. Stack trace is below: Caused by: java.lang.ClassNotFoundException: caught an exception while obtaining a class file for com.inavero.pulse.pages.survey.question.Index at javassist.Loader.findClass(Loader.java:359) at org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl$PackageAwareLoader.findClass(ComponentInstantiatorSourceImpl.java:89) at javassist.Loader.loadClass(Loader.java:311) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl.findClass(ComponentInstantiatorSourceImpl.java:263) ... 123 more Caused by: java.lang.RuntimeException: Class com.inavero.pulse.pages.survey.question.Index contains field(s) (_$configAttributeDefinition_14) that are not private. You should change these fields to private, and add accessor methods if needed. at org.apache.tapestry5.internal.services.InternalClassTransformationImpl.verifyFields(InternalClassTransformationImpl.java:294) at org.apache.tapestry5.internal.services.InternalClassTransformationImpl.preloadMemberNames(InternalClassTransformationImpl.java:256) at org.apache.tapestry5.internal.services.InternalClassTransformationImpl.(InternalClassTransformationImpl.java:190) at org.apache.tapestry5.internal.services.InternalClassTransformationImpl.createChildTransformation(InternalClassTransformationImpl.java:218) at org.apache.tapestry5.internal.services.ComponentClassTransformerImpl.transformComponentClass(ComponentClassTransformerImpl.java:161) at $ComponentClassTransformer_11bdc667625.transformComponentClass($ComponentClassTransformer_11bdc667625.java) at org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl.onLoad(ComponentInstantiatorSourceImpl.java:182) at javassist.Loader.findClass(Loader.java:340) ... 127 more -- View this message in context: http://n2.nabble.com/-T5--Class-contains-field%28s%29-%28_%24configAttributeDefinition_14%29-that-are-not-private.-tp733949p733949.html Sent from the Tapestry Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tapestry5-acegi1.1.0 doesn't work with T5.0.14
I actually was able to successfully upgrade to T5.0.14 and have everything working alright in testing with acegi. I am using 1.1.1-SNAPSHOT. However, I saw your post right after I posted my issue which I think is related to aceg W/ 5.0.14i: http://www.nabble.com/-T5--Class-contains-field(s)-(_%24configAttributeDefinition_14)-that-are-not-private.-td19057259.html I didnt get any package name issues with 1.1.1-SNAPSHOT. zACK tnodev wrote: > > Hello, > > it seems that the new version of Tapestry doesn't work with > *tapestry5-acegi... > ...package name problems... > > any news of an update of **tapestry5-acegi**? > > thanks > * > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://n2.nabble.com/Tapestry5-acegi1.1.0-doesn%27t-work-with-T5.0.14-tp733663p734012.html Sent from the Tapestry Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T5]How to make indentical validation on the client side.
Maybe I'm missing something but why cant you just create a mixin with this functionality instead of using a validator? Zack Filip S. Adamsen wrote: > > Looking further into this, it doesn't even seem to be possible... > > Not as far as I can tell, anyhow. But then it's late here. > > Anyone else? > > -Filip > > On 2008-08-19 04:36, luna_guo wrote: >> >> >> Filip S. Adamsen-2 wrote: >>> Hi, >>> >>> This should get you started: >>> http://wiki.apache.org/tapestry/Tapestry5HowToAddValidators >>> >>> -Filip >>> >> I want make a validator named confirm,just used to confirm the retype >> password. >> Using like this: >> > validate="confirm=idOfPassword" >> ……/> >> Now i have a problem: >> public void validate(Field field, String constraintValue, >> MessageFormatter formatter, String value) throws >> ValidationException { >>//do what here? >> } >> } >> the constraintValue is just the id of the password field,how can i get >> the >> password field's real value in a validator? >> >> /luna > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://n2.nabble.com/-T5-How-to-make-indentical-validation-on-the-client-side.-tp730303p734046.html Sent from the Tapestry Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T5] Class contains field(s) (_$configAttributeDefinition_14) that are not private.
By completely disabling acegi I came to java.lang.ClassCircularityError: com/inavero/pulse/pages/survey/question/Index, which then led me to an @InjectPage that was an @Inject. Changing that fixed it. Strange that it would only present itself after that had been there for a while and with those errors. Hope this helps someone else. Zack zack.manning wrote: > > Hi All, > > Seemingly without provocation Tapestry is throwing this error that I > cannot figure out. My page simply has an beaneditform and some text when > a refresh threw this. Can't get it to go away even after removing what I > had been working on. The field it is referring to seems to belong to > acegi? Any help would be greatly appreciated. Stack trace is below: > > Caused by: java.lang.ClassNotFoundException: caught an exception while > obtaining a class file for com.inavero.pulse.pages.survey.question.Index > at javassist.Loader.findClass(Loader.java:359) > at > org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl$PackageAwareLoader.findClass(ComponentInstantiatorSourceImpl.java:89) > at javassist.Loader.loadClass(Loader.java:311) > at java.lang.ClassLoader.loadClass(ClassLoader.java:251) > at > org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl.findClass(ComponentInstantiatorSourceImpl.java:263) > ... 123 more > Caused by: java.lang.RuntimeException: Class > com.inavero.pulse.pages.survey.question.Index contains field(s) > (_$configAttributeDefinition_14) that are not private. You should change > these fields to private, and add accessor methods if needed. > at > org.apache.tapestry5.internal.services.InternalClassTransformationImpl.verifyFields(InternalClassTransformationImpl.java:294) > at > org.apache.tapestry5.internal.services.InternalClassTransformationImpl.preloadMemberNames(InternalClassTransformationImpl.java:256) > at > org.apache.tapestry5.internal.services.InternalClassTransformationImpl.(InternalClassTransformationImpl.java:190) > at > org.apache.tapestry5.internal.services.InternalClassTransformationImpl.createChildTransformation(InternalClassTransformationImpl.java:218) > at > org.apache.tapestry5.internal.services.ComponentClassTransformerImpl.transformComponentClass(ComponentClassTransformerImpl.java:161) > at > $ComponentClassTransformer_11bdc667625.transformComponentClass($ComponentClassTransformer_11bdc667625.java) > at > org.apache.tapestry5.internal.services.ComponentInstantiatorSourceImpl.onLoad(ComponentInstantiatorSourceImpl.java:182) > at javassist.Loader.findClass(Loader.java:340) > ... 127 more > -- View this message in context: http://n2.nabble.com/-T5--Class-contains-field%28s%29-%28_%24configAttributeDefinition_14%29-that-are-not-private.-tp733949p734098.html Sent from the Tapestry Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Tapestry5-acegi1.1.0 doesn't work with T5.0.14
Yep, tapestry acegi: http://www.localhost.nu/java/mvn-snapshot tnodev wrote: > > It is not about acegi, but tapestry5-acegi, > > I'm using this repository and there is no 1.1.1-SNAPSHOT > > > localhost.nu > http://www.localhost.nu/java/mvn > > > I think tapestry5-acegi use Tapestry classes with package name > yyy.tapestry.Xxx instead of yyy.tapestry5.Xxx. So I have a no class > found error > > zack.manning a écrit : >> I actually was able to successfully upgrade to T5.0.14 and have >> everything >> working alright in testing with acegi. I am using 1.1.1-SNAPSHOT. >> However, >> I saw your post right after I posted my issue which I think is related to >> aceg W/ 5.0.14i: >> http://www.nabble.com/-T5--Class-contains-field(s)-(_%24configAttributeDefinition_14)-that-are-not-private.-td19057259.html >> >> I didnt get any package name issues with 1.1.1-SNAPSHOT. >> >> zACK >> >> tnodev wrote: >> >>> Hello, >>> >>> it seems that the new version of Tapestry doesn't work with >>> *tapestry5-acegi... >>> ...package name problems... >>> >>> any news of an update of **tapestry5-acegi**? >>> >>> thanks >>> * >>> >>> >>> - >>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>> For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> >>> >>> >> >> > > > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://n2.nabble.com/Tapestry5-acegi1.1.0-doesn%27t-work-with-T5.0.14-tp733663p734157.html Sent from the Tapestry Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: [T5]How to make indentical validation on the client side.
What would be awesome is if you could just specify a validation method name, and the client side validation would execute that method via ajax on the server side (with form data submitted as well). The method would return a specific json response and the client would be updated with a failure message. Of course the method is still there from the server side as well. Similar to an eventlink. Don't know if thats currently available but it would be nice. Zack Filip S. Adamsen wrote: > > Well, he could. But then he wouldn't get all the advantages of using the > proper validation system. > > -Filip > > On 2008-08-19 22:19, zack.manning wrote: >> Maybe I'm missing something but why cant you just create a mixin with >> this >> functionality instead of using a validator? >> >> Zack >> >> >> Filip S. Adamsen wrote: >>> Looking further into this, it doesn't even seem to be possible... >>> >>> Not as far as I can tell, anyhow. But then it's late here. >>> >>> Anyone else? >>> >>> -Filip >>> >>> On 2008-08-19 04:36, luna_guo wrote: >>>> >>>> Filip S. Adamsen-2 wrote: >>>>> Hi, >>>>> >>>>> This should get you started: >>>>> http://wiki.apache.org/tapestry/Tapestry5HowToAddValidators >>>>> >>>>> -Filip >>>>> >>>> I want make a validator named confirm,just used to confirm the retype >>>> password. >>>> Using like this: >>>> >>> validate="confirm=idOfPassword" >>>> ……/> >>>> Now i have a problem: >>>> public void validate(Field field, String constraintValue, >>>> MessageFormatter formatter, String value) throws >>>> ValidationException { >>>>//do what here? >>>> } >>>> } >>>> the constraintValue is just the id of the password field,how can i get >>>> the >>>> password field's real value in a validator? >>>> >>>> /luna >>> - >>> To unsubscribe, e-mail: [EMAIL PROTECTED] >>> For additional commands, e-mail: [EMAIL PROTECTED] >>> >>> >>> >> > > - > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://n2.nabble.com/-T5-How-to-make-indentical-validation-on-the-client-side.-tp730303p734457.html Sent from the Tapestry Users mailing list archive at Nabble.com. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]