I am a self-confessed newbee working with turbine 2.1 on
Win2k with mysql.
I have been trying to make turbine do a few different things
over the last couple of days and I am becoming increasingly
frustrated by my lack of progress.
I abandoned my attempt at modifying turbine's security such
that TURBINE_USER.EMAIL was used for the user name
rather than TURBINE_USER.LOGIN_NAME. It looked
like this would be a simple matter of overriding
org.apache.turbine.util.db.map.TurbineMapBuilder.getUsername()
and referencing the overriding class as database.maps.builder
in TR.properties but with this change in place some of the
authorisation process code uses LOGIN_NAME and some
of it uses EMAIL and thus it did not work. I was really
impressed with the architecture when I made this change
but disappointed when it turned out that it didn't seem to
be consistently applied in the authorisation code.
Most recently I am experiencing problems attempting to modify
the login process. In newapp an incorrect login switches from
the Login.vm layout to the Default.vm layout (undesirable
behaviour) and a correct login takes you to the screen Index.vm
with the layout Default.vm (desirable behaviour). Gary Murphy
indicated that the switch back to the Default.vm layout for
incorrect logins is "deep in the Flux" but that unfortunately the
solution (or at least the reason for the switch) is lost in the mists
of time. I have actually cloned newapp to myapp for my
modifications, but somehow, with no modification to
TR.properties the behaviour is strangely different in that a
correct login now leaves me on the Login.vm screen with the
Login.vm template instead of switching me to Index.vm - i.e.
I have lost the desirable behaviour above. I have confirmed
that my login has been accepted -
$data.getUser().getFirstName() in the DefaultTop.vm
navigation displays the appropriate value. Without doing
anything else, approximately 5 to 20 seconds later the
following exception appears in the Catalina console window:
java.lang.NoClassDefFoundError: com/workingdogs/village/KeyDef
at org.apache.turbine.om.peer.BasePeer.doUpdate(BasePeer.java:1631)
at org.apache.turbine.om.peer.BasePeer.doUpdate(BasePeer.java:1578)
at
org.apache.turbine.om.security.peer.TurbineUserPeer.doUpdate(TurbineUserPeer.java:463)
at
org.apache.turbine.services.security.db.DBUserManager.store(DBUserManager.java:272)
at
org.apache.turbine.services.security.BaseSecurityService.saveUser(BaseSecurityService.java:379)
at
org.apache.turbine.services.security.TurbineSecurity.saveUser(TurbineSecurity.java:261)
at
org.apache.turbine.om.security.TurbineUser.valueUnbound(TurbineUser.java:649)
at
org.apache.catalina.session.StandardSession.removeAttribute(StandardSession.java:953)
at org.apache.catalina.session.StandardSession.expire(StandardSession.java:551)
at
org.apache.catalina.session.StandardManager.processExpires(StandardManager.java:744)
at org.apache.catalina.session.StandardManager.run(StandardManager.java:815)
at java.lang.Thread.run(Thread.java:484)
This class appears to exist in village-1.5.1.jar so I don't see
why the exception is occurring or if it relates to my screen
transition problem.
Introducing my own LoginUser class with:
data.setScreenTemplate(TurbineResources.getString(
TurbineConstants.TEMPLATE_HOMEPAGE));
at the end of doPerform() (where template.homepage is
defined as /Index.vm in TR.properties) makes no difference.
Not being able to move past the login screen is slowly driving
me insane. Can anyone give me a clue as to what might be
wrong here?
One last problem. When I shutdown tomcat, I get a bunch
(5 to be exact) of exceptions like this one:
[Tue Jun 19 23:41:59 GMT+10:00 2001] -- ERROR -- TurbineUser.valueUnbobund(): Failed
to save user object
[Tue Jun 19 23:41:59 GMT+10:00 2001] -- ERROR --
Exception: org.apache.turbine.util.security.DataBackendException: Failed to save
user object
Stack Trace follows:
java.lang.NullPointerException
at org.apache.turbine.om.peer.BasePeer.doUpdate(BasePeer.java:1635)
at org.apache.turbine.om.peer.BasePeer.doUpdate(BasePeer.java:1578)
at
org.apache.turbine.om.security.peer.TurbineUserPeer.doUpdate(TurbineUserPeer.java:463)
at org.apache.turbine.services.security.db.DBUserManager.store(DBUserManager.java:272)
rethrown as org.apache.turbine.util.security.DataBackendException: Failed to save user
object
at org.apache.turbine.services.security.db.DBUserManager.store(DBUserManager.java:276)
at
org.apache.turbine.services.security.BaseSecurityService.saveUser(BaseSecurityService.java:379)
at
org.apache.turbine.services.security.TurbineSecurity.saveUser(TurbineSecurity.java:261)
at org.apache.turbine.om.security.TurbineUser.valueUnbound(TurbineUser.java:649)
at
org.apache.catalina.session.StandardSession.removeAttribute(StandardSession.java:953)
at org.apache.catalina.session.StandardSession.expire(StandardSession.java:551)
at org.apache.catalina.session.StandardManager.unload(StandardManager.java:541)
at org.apache.catalina.session.StandardManager.stop(StandardManager.java:648)
at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1184)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:3303)
at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:983)
at org.apache.catalina.core.StandardHost.remove(StandardHost.java:718)
at org.apache.catalina.startup.HostConfig.undeployApps(HostConfig.java:422)
at org.apache.catalina.startup.HostConfig.stop(HostConfig.java:402)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:234)
at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:155)
at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1151)
at org.apache.catalina.core.ContainerBase.stop(ContainerBase.java:1163)
at org.apache.catalina.core.StandardService.stop(StandardService.java:400)
at org.apache.catalina.core.StandardServer.stop(StandardServer.java:487)
at org.apache.catalina.startup.Catalina.start(Catalina.java:749)
at org.apache.catalina.startup.Catalina.execute(Catalina.java:653)
at org.apache.catalina.startup.Catalina.process(Catalina.java:177)
at java.lang.reflect.Method.invoke(Native Method)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:196)
Again, anyone have any clues as to what the problem might be?
Thanks for any help.
Scott
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]