When the toString() method of your class de.myproject.MyClass is called, you get a LazyInitializationException.
This is from Hibernate To get the LazyInitializationException's full explanation, see https://developer.jboss.org/wiki/LazyInitializationExceptionOvercome?_sscc=t http://blog.gmorales.net/2012/03/how-to-solve-orghibernatelazyinitializa.html http://stackoverflow.com/questions/10760320/lazyinitializationexception-encountered-when-using-load-instead-of-get-with-hibe François François Meillet Formation Wicket - Développement Wicket Le 31 oct. 2014 à 12:51, jayeshps <jayeshpsars...@gmail.com> a écrit : > I am getting a no session error while trying to display some details from the > database. I have pasted the error log below > > Root cause: > > org.hibernate.LazyInitializationException: could not initialize proxy - no > Session > at > org.hibernate.proxy.AbstractLazyInitializer.initialize(AbstractLazyInitializer.java:165) > at > org.hibernate.proxy.AbstractLazyInitializer.getImplementation(AbstractLazyInitializer.java:286) > at > org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:185) > at de.myproject.MyClass_$$_jvstb50_11.toString(MyClass_$$_jvstb50_11.java) > at java.lang.String.valueOf(String.java:2981) > at java.lang.StringBuilder.append(StringBuilder.java:131) > at > org.apache.wicket.core.util.lang.PropertyResolver$MethodGetAndSet.getValue(PropertyResolver.java:1151) > at > org.apache.wicket.core.util.lang.PropertyResolver$ObjectAndGetSetter.getValue(PropertyResolver.java:652) > at > org.apache.wicket.core.util.lang.PropertyResolver.getValue(PropertyResolver.java:103) > at > org.apache.wicket.model.AbstractPropertyModel.getObject(AbstractPropertyModel.java:86) > at org.apache.wicket.Component.getDefaultModelObject(Component.java:1590) > at > org.apache.wicket.Component.getDefaultModelObjectAsString(Component.java:1618) > at > org.apache.wicket.markup.html.basic.Label.onComponentTagBody(Label.java:131) > at > org.apache.wicket.markup.html.panel.DefaultMarkupSourcingStrategy.onComponentTagBody(DefaultMarkupSourcingStrategy.java:71) > > Any suggestions would be much appreciated. When I try to print the same > details using JasperReports the pdf file seems to be rendered perfect. But > only the display part on the browser gives this error. > > In MyClass, I use a String value that is stored as an Integer in the > database and I retrieve it using i18n. > > Thanks and Regards, > Jayesh Sarswat > > -- > View this message in context: > http://apache-wicket.1842946.n4.nabble.com/Error-in-java-lang-String-during-Internationalisation-of-a-wicket-project-tp4668192.html > Sent from the Users forum mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org > For additional commands, e-mail: users-h...@wicket.apache.org >