Return-Path: Delivered-To: apmail-turbine-user-archive@www.apache.org Received: (qmail 90087 invoked from network); 9 Dec 2008 16:05:36 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Dec 2008 16:05:36 -0000 Received: (qmail 43184 invoked by uid 500); 9 Dec 2008 16:05:48 -0000 Delivered-To: apmail-turbine-user-archive@turbine.apache.org Received: (qmail 43173 invoked by uid 500); 9 Dec 2008 16:05:48 -0000 Mailing-List: contact user-help@turbine.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Turbine Users List" Delivered-To: mailing list user@turbine.apache.org Received: (qmail 43162 invoked by uid 99); 9 Dec 2008 16:05:48 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Dec 2008 08:05:48 -0800 X-ASF-Spam-Status: No, hits=-1.0 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [195.47.247.213] (HELO csmtp3.b-one.net) (195.47.247.213) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Dec 2008 16:04:18 +0000 Received: from GreenStreet (h59ec0d32.stgertrud.dyn.perspektivbredband.net [89.236.13.50]) by csmtp3.b-one.net (Postfix) with ESMTP id C8E9D386001D for ; Tue, 9 Dec 2008 17:05:05 +0100 (CET) From: "Ludwig Magnusson" To: "'Turbine Users List'" References: <001401c959fa$aeb58ec0$0c20ac40$@se> <002c01c95a11$d636cfb0$82a46f10$@org> In-Reply-To: <002c01c95a11$d636cfb0$82a46f10$@org> Subject: RE: StackOverflowError when calling user.save() Date: Tue, 9 Dec 2008 17:04:54 +0100 Message-ID: <002501c95a17$dfd0a3b0$9f71eb10$@se> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AclZ+q5F4aNHAVXNRs+9W+9BhuwgMAAFosnQAAFnKbA= Content-Language: sv X-Virus-Checked: Checked by ClamAV on apache.org Thank you, it is a little bit clearer now.=20 One thing I don't understand however is this: In http://turbine.apache.org/turbine/turbine-2.3.3/services/torque-security-= ser vice.html there is an exapmple of an extended user class. It looks lie = this: public class ExtendedUser extends TorqueUser { public ExtendedUser() { super(); } public ExtendedUser(Persistent obj) { super(obj); } public String getPhone() {.... How is this class created? Do I write it myself or is it created via the = ant script? The thing that confuses me is that it extends TorqueUser and not BaseExtendedUser. How do I make that connection? /Ludwig -----Original Message----- From: Juergen Hoffmann [mailto:hoffmann@apache.org]=20 Sent: den 9 december 2008 16:22 To: 'Turbine Users List' Subject: AW: StackOverflowError when calling user.save() Hi Ludwig, so not use the TurbineUser Directly. Please use TurbineSecurity Object = for that. Please read=20 http://turbine.apache.org/turbine/turbine-2.3.3/apidocs/org/apache/turbin= e/s ervices/security/TurbineSecurity.html http://turbine.apache.org/turbine/turbine-2.3.3/services/torque-security-= ser vice.html It will make everything a lot clearer Kind regards Juergen > -----Urspr=FCngliche Nachricht----- > Von: Ludwig Magnusson [mailto:ludwig@greenstreetconsulting.se] > Gesendet: Dienstag, 9. Dezember 2008 13:36 > An: user@turbine.apache.org > Betreff: StackOverflowError when calling user.save() >=20 > Hello! >=20 > I'm setting up a turbine/torque site and I am having trouble with my > user om > class. Calling the save method initiates a circular pattern of method > calls. > After a few seconds the JVM thorws a StackOverflowError. At first I > thought > it might have something to do with my configuration on extending the > turbine > user but I tried to do it with the turbine user class > (org.apache.turbine.om.security.TurbineUser) and the same error = occurs. >=20 > Here is my code: >=20 >=20 >=20 > TurbineUser user =3D new TurbineUser(); >=20 > user.setEmail("r2@d2.com"); >=20 > user.setName("R2D2"); >=20 > user.setPassword("ilovec3po"); >=20 > user.setFirstName("R2"); >=20 > user.setLastName("D2"); >=20 > user.save(); >=20 >=20 >=20 > This is the stack trace that is printed: >=20 >=20 >=20 > Horrible Exception: java.lang.reflect.InvocationTargetException >=20 > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >=20 > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) >=20 > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown > Source) >=20 > at java.lang.reflect.Method.invoke(Unknown Source) >=20 > at > = org.apache.turbine.util.velocity.VelocityActionEvent.executeEvents(Velo > cityA > ctionEvent.java:135) >=20 > at > = org.apache.turbine.util.velocity.VelocityActionEvent.perform(VelocityAc > tionE > vent.java:78) >=20 > at > = org.apache.turbine.modules.actions.VelocityAction.perform(VelocityActio > n.jav > a:72) >=20 > at > org.apache.turbine.modules.ActionLoader.exec(ActionLoader.java:99) >=20 > at > = org.apache.turbine.modules.pages.DefaultPage.doBuild(DefaultPage.java:1 > 13) >=20 > at org.apache.turbine.modules.Page.build(Page.java:53) >=20 > at > org.apache.turbine.modules.PageLoader.exec(PageLoader.java:101) >=20 > at org.apache.turbine.Turbine.doGet(Turbine.java:789) >=20 > at org.apache.turbine.Turbine.doPost(Turbine.java:884) >=20 > at = javax.servlet.http.HttpServlet.service(HttpServlet.java:647) >=20 > at = javax.servlet.http.HttpServlet.service(HttpServlet.java:729) >=20 > at > = org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic > ation > FilterChain.java:269) >=20 > at > = org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil > terCh > ain.java:188) >=20 > at > = org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal > ve.ja > va:213) >=20 > at > = org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal > ve.ja > va:172) >=20 > at > = org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authenticato > rBase > .java:433) >=20 > at > = org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav > a:127 > ) >=20 > at > = org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav > a:117 > ) >=20 > at > = org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve > .java > :108) >=20 > at > = org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java: > 174) >=20 > at > = org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:8 > 75) >=20 > at > = org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.pro > cessC > onnection(Http11BaseProtocol.java:665) >=20 > at > = org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoin > t.jav > a:528) >=20 > at > = org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollo > werWo > rkerThread.java:81) >=20 > at > = org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo > l.jav > a:689) >=20 > at java.lang.Thread.run(Unknown Source) >=20 > Caused by: java.lang.StackOverflowError >=20 > at java.lang.ClassLoader.findBootstrapClass(Native Method) >=20 > at java.lang.ClassLoader.findBootstrapClass0(Unknown Source) >=20 > at java.lang.ClassLoader.loadClass(Unknown Source) >=20 > at java.lang.ClassLoader.loadClass(Unknown Source) >=20 > at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) >=20 > at java.lang.ClassLoader.loadClass(Unknown Source) >=20 > at > = org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoade > r.jav > a:1301) >=20 > at > = org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoade > r.jav > a:1232) >=20 > at java.lang.ClassLoader.loadClassInternal(Unknown Source) >=20 > at > = org.apache.commons.lang.exception.NestableException.(NestableExce > ption > .java:95) >=20 > at > org.apache.torque.TorqueException.(TorqueException.java:79) >=20 > at > = org.apache.turbine.services.security.torque.UserPeerManager.doSelect(Us > erPee > rManager.java:736) >=20 > at > = org.apache.turbine.services.security.torque.TorqueUserManager.accountEx > ists( > TorqueUserManager.java:102) >=20 > at > = org.apache.turbine.services.security.torque.TorqueUserManager.accountEx > ists( > TorqueUserManager.java:81) >=20 > at > = org.apache.turbine.services.security.BaseSecurityService.accountExists( > BaseS > ecurityService.java:656) >=20 > at > = org.apache.turbine.services.security.TurbineSecurity.accountExists(Turb > ineSe > curity.java:228) >=20 > at > org.apache.turbine.om.security.TurbineUser.save(TurbineUser.java:634) >=20 > at > = org.apache.turbine.services.security.torque.TorqueUserManager.createAcc > ount( > TorqueUserManager.java:460) >=20 > at > = org.apache.turbine.services.security.BaseSecurityService.addUser(BaseSe > curit > yService.java:827) >=20 > at > = org.apache.turbine.services.security.TurbineSecurity.addUser(TurbineSec > urity > .java:561) >=20 > at > org.apache.turbine.om.security.TurbineUser.save(TurbineUser.java:640) >=20 > at > = org.apache.turbine.services.security.torque.TorqueUserManager.createAcc > ount( > TorqueUserManager.java:460) >=20 > at > = org.apache.turbine.services.security.BaseSecurityService.addUser(BaseSe > curit > yService.java:827) >=20 > at > = org.apache.turbine.services.security.TurbineSecurity.addUser(TurbineSec > urity > .java:561) >=20 > at > org.apache.turbine.om.security.TurbineUser.save(TurbineUser.java:640) >=20 >=20 >=20 > The four last lines then loop forever (at least for a long while =3D) = ) >=20 > I took a look in the code for TorqueUserManager and the last thing > done in > the createAccount-method is to save the user object wich does indeed > start > the process over again. Is this correct? >=20 > Any help is appreciated. >=20 > /Ludwig --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@turbine.apache.org For additional commands, e-mail: user-help@turbine.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@turbine.apache.org For additional commands, e-mail: user-help@turbine.apache.org