You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Bill <bh...@collaborativefusion.com> on 2002/11/14 13:27:02 UTC

More fun extending user

Problem Description:

Followed the how-to and added several fields to user object. Am able to
successfully login to system using default user account ('turbine') and
can manipulate the user using defined methods.  Now i am building a
registration page for creating new users.  My registration page takes an
email address, a password value, a retyped password value, and a boolean
that determines if the user agreed to the usage agreement.  These values
are validated (i.e. email address fits a prescribed regular expression,
password values match, etc) and then my user management class (separate
from action class) is called to create an account.  The method invoked,
createMemberAccount(String email, String password, Context context),
fails at this line:

TurbineSecurity.addUser(user, password);

This method throws a DataBackendException and the top of the stack trace
looks like this:

org.apache.turbine.util.security.DataBackendException: Failed to create
account 'bhalpin@cf.com': Bad conversion:
java.lang.NumberFormatException: ’

This unfortunately is all of the trace I could capture.  The exception
is not being logged properly, and this is all of the trace that
Exception.toString() provides.

Questions:

1.  What class actually defines addUser()?  I've only found it in
interfaces so far which arent very helpful for tracking down the
exception.

2.  Why is the stack trace garbled?

3.  I rethrow the exception in the application specific user manager
class so it will be picked up by the calling layer but it never ends up
in any of the logs.  Shouldnt the action class log that exception?

4.  Would someone, using the extended user in 2.1, mind sharing some
snippets that highlight how they implemented their method for adding
users to the system?

Thanks

-b



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>