turbine-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ludwig Magnusson" <lud...@greenstreetconsulting.se>
Subject StackOverflowError when calling user.save()
Date Tue, 09 Dec 2008 12:35:55 GMT
Hello!

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.

Here is my code:

 

TurbineUser user = new TurbineUser();

user.setEmail("r2@d2.com");

user.setName("R2D2");

user.setPassword("ilovec3po");

user.setFirstName("R2");

user.setLastName("D2");

user.save();

 

This is the stack trace that is printed:

 

Horrible Exception: java.lang.reflect.InvocationTargetException

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

        at java.lang.reflect.Method.invoke(Unknown Source)

        at
org.apache.turbine.util.velocity.VelocityActionEvent.executeEvents(VelocityA
ctionEvent.java:135)

        at
org.apache.turbine.util.velocity.VelocityActionEvent.perform(VelocityActionE
vent.java:78)

        at
org.apache.turbine.modules.actions.VelocityAction.perform(VelocityAction.jav
a:72)

        at
org.apache.turbine.modules.ActionLoader.exec(ActionLoader.java:99)

        at
org.apache.turbine.modules.pages.DefaultPage.doBuild(DefaultPage.java:113)

        at org.apache.turbine.modules.Page.build(Page.java:53)

        at org.apache.turbine.modules.PageLoader.exec(PageLoader.java:101)

        at org.apache.turbine.Turbine.doGet(Turbine.java:789)

        at org.apache.turbine.Turbine.doPost(Turbine.java:884)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:647)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)

        at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:269)

        at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:188)

        at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:213)

        at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:172)

        at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase
.java:433)

        at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127
)

        at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117
)

        at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:108)

        at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)

        at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)

        at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processC
onnection(Http11BaseProtocol.java:665)

        at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.jav
a:528)

        at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWo
rkerThread.java:81)

        at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:689)

        at java.lang.Thread.run(Unknown Source)

Caused by: java.lang.StackOverflowError

        at java.lang.ClassLoader.findBootstrapClass(Native Method)

        at java.lang.ClassLoader.findBootstrapClass0(Unknown Source)

        at java.lang.ClassLoader.loadClass(Unknown Source)

        at java.lang.ClassLoader.loadClass(Unknown Source)

        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)

        at java.lang.ClassLoader.loadClass(Unknown Source)

        at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
a:1301)

        at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.jav
a:1232)

        at java.lang.ClassLoader.loadClassInternal(Unknown Source)

        at
org.apache.commons.lang.exception.NestableException.<init>(NestableException
.java:95)

        at org.apache.torque.TorqueException.<init>(TorqueException.java:79)

        at
org.apache.turbine.services.security.torque.UserPeerManager.doSelect(UserPee
rManager.java:736)

        at
org.apache.turbine.services.security.torque.TorqueUserManager.accountExists(
TorqueUserManager.java:102)

        at
org.apache.turbine.services.security.torque.TorqueUserManager.accountExists(
TorqueUserManager.java:81)

        at
org.apache.turbine.services.security.BaseSecurityService.accountExists(BaseS
ecurityService.java:656)

        at
org.apache.turbine.services.security.TurbineSecurity.accountExists(TurbineSe
curity.java:228)

        at
org.apache.turbine.om.security.TurbineUser.save(TurbineUser.java:634)

        at
org.apache.turbine.services.security.torque.TorqueUserManager.createAccount(
TorqueUserManager.java:460)

        at
org.apache.turbine.services.security.BaseSecurityService.addUser(BaseSecurit
yService.java:827)

        at
org.apache.turbine.services.security.TurbineSecurity.addUser(TurbineSecurity
.java:561)

        at
org.apache.turbine.om.security.TurbineUser.save(TurbineUser.java:640)

        at
org.apache.turbine.services.security.torque.TorqueUserManager.createAccount(
TorqueUserManager.java:460)

        at
org.apache.turbine.services.security.BaseSecurityService.addUser(BaseSecurit
yService.java:827)

        at
org.apache.turbine.services.security.TurbineSecurity.addUser(TurbineSecurity
.java:561)

        at
org.apache.turbine.om.security.TurbineUser.save(TurbineUser.java:640)

 

The four last lines then loop forever (at least for a long while =) )

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?

Any help is appreciated.

/Ludwig


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message