You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Joe Terry <jo...@knowself.com> on 2001/11/02 07:10:54 UTC

Login behavior and the tale of two webs ... public and private ...

Hi Everyone,

When my app initializes I see the following in the velocity.log ...

=============================================================

Thu Nov 01 21:56:16 PST 2001   [info] ResourceManager : found screens/Login.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader
Thu Nov 01 21:56:16 PST 2001   [info] ResourceManager : found layouts/Login.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader
Thu Nov 01 21:56:16 PST 2001   [info] ResourceManager : found navigations/LoginTop.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader
Thu Nov 01 21:56:16 PST 2001   [info] ResourceManager : found navigations/LoginBottom.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader

=============================================================

Notice that my Login.vm screen indeed finds my Login.vm layout. All is well, except I still haven't gotten nested layouts to work. (hierarchical directories of screens and layouts ... I'm all flat)

If I simply press the login button as opposed to selecting a setPage or setAction I get the "homepage" but I still have to log in before any other actions will work.

The result is this ...

=============================================================

Thu Nov 01 22:05:21 PST 2001   [info] ResourceManager : found screens/Login.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader
Thu Nov 01 22:05:21 PST 2001   [info] ResourceManager : found layouts/Default.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader
Thu Nov 01 22:05:21 PST 2001   [info] ResourceManager : found navigations/DefaultTop.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader
Thu Nov 01 22:05:21 PST 2001   [info] ResourceManager : found navigations/ApplicationMenu.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader
Thu Nov 01 22:05:21 PST 2001   [info] ResourceManager : found navigations/DefaultBottom.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader

=============================================================

Notice, because of the failed login, the Login.vm screen is expressed again, but the layout is now the Default.vm layout, bringing with it unwanted navigation as well. This is not the behavior I am looking for...

Question: I want to have "informational" links on the initial "Login" screen that represent a "web" of informational pages, that do _not_ require login.

Then if the user clicks the "Login" button and is not validated, I want them to stay on the "initial" screen, or in that initial "web", and links accessable from that screen. I want a kind of doorway between one world and the next, complete access before login and then additional screens available _only_ after a proper login and I know the identity of the client.

Can someone help with the "pseudocode" version Turbine style with enough detail to get me to the right source files.

I have compiled Turbine and am now using the Jar file created from that build, so I'm ready to do some damage and be able to rebuild the Jar file.

Thanks everyone for your help.

I'm a taker now, but I do plan on giving as soon as I'm able.

Joet


Re: Login behavior and the tale of two webs ... public and private ...

Posted by Joe Terry <jo...@knowself.com>.
Thanks for the response, it was very helpful.

part of my TR.props looks like this ...

==================================================

# Used to set the template homepage if you are using a template
# layout.
#
# Default: /Index.vm

template.homepage=/Index.vm

# This is the default screen to show to people when they first access
# the system. Specify one of the template screens such as VelocityScreen
# to use a template system.
#
# Default: Login

screen.homepage=

# This is the template that is shown on an incorrect login attempt.
# Setting this property will override any value of screen.login specfied
# below.
#
# Default: Login.vm

template.login=/Login.vm

# This is the page that is shown on an incorrect login attempt.  It is
# referenced in the LoginUser action. Note that it will only be used if
# a login template has not been specified (see template.login above).
#
# Default: Login

screen.login=

# This is the template that is used by the respective Template based
# ErrorScreen for displaying the error. If you are not using a Template
based
# ErrorScreen, then this is ignored.
#
# Default: /Error.vm

template.error=/Error.vm

# This is the default error screen.
#
# Default: VelocityErrorScreen

screen.error=VelocityErrorScreen

========================================================

It's essentially standard.

I'll report back any thing more that I find.

Thanks, Again.

Joet




----- Original Message -----
From: <bp...@pacbell.net>
To: "Joe Terry" <jo...@knowself.com>
Cc: "turbine users list" <tu...@jakarta.apache.org>
Sent: Friday, November 02, 2001 9:08 AM
Subject: Re: Login behavior and the tale of two webs ... public and private
...


> Joe-
>
> I don't know if you have gone through the "Specification" document, if
> not, it may be found at
> http://jakarta.apache.org/turbine/turbine-2/fsd.html.  This document
> describes the process flow for a typical Turbine request, including checks
> for authenticated users.  In particular there is one paragraph that is
> pertinent to your problem:
>
> ++++++++++++++
>
> Once the user has been validated (the RunData.save() method has been
> called) or not validated, then the SessionValidator action is executed
> from within the Turbine servlet. The SessionValidator action checks to see
> if a user has been logged in. If the user has not been logged in, then the
> Screen is set to be the "Login" screen. If not, then the users last access
> datestamp is updated. *** If you would like to allow the user to view
> multiple pages without the need to login first, you will need to implement
> your own version of SessionValidator that just returns nothing as a
> result. *** Then, for the pages that you will want to make secure, you
> should define a Layout that executes the SessionValidator action to make
> things secure. Then, your Screens should call that "secure" Layout.
>
> +++++++++++++++
>
> It sounds like the *** part will be important when it comes time to
> discern between your public and private pages.  However, this would not be
> the solution to your problem at hand.  TR.props may be the key to solving
> your problem.  There is a section in that file called Framework Settings
> where you set all of you Login, Error, and Homepage info.  In particular,
> there is a property called template.login and one called
> screen.login.  Make sure that you are setting template.login so that the
> LoginUser action (org/apache/turbine/modules/actions/LoginUser.java) knows
> to call setScreenTemplate() instead of setScreen().  Maybe that will do
> it...
>
> -Brian
>
> On Thu, 1 Nov 2001, Joe Terry wrote:
>
> > Hi Everyone,
> >
> > When my app initializes I see the following in the velocity.log ...
> >
> > =============================================================
> >
> > Thu Nov 01 21:56:16 PST 2001   [info] ResourceManager : found
screens/Login.vm with loader
org.apache.velocity.runtime.resource.loader.FileResourceLoader
> > Thu Nov 01 21:56:16 PST 2001   [info] ResourceManager : found
layouts/Login.vm with loader
org.apache.velocity.runtime.resource.loader.FileResourceLoader
> > Thu Nov 01 21:56:16 PST 2001   [info] ResourceManager : found
navigations/LoginTop.vm with loader
org.apache.velocity.runtime.resource.loader.FileResourceLoader
> > Thu Nov 01 21:56:16 PST 2001   [info] ResourceManager : found
navigations/LoginBottom.vm with loader
org.apache.velocity.runtime.resource.loader.FileResourceLoader
> >
> > =============================================================
> >
> > Notice that my Login.vm screen indeed finds my Login.vm layout. All is
well, except I still haven't gotten nested layouts to work. (hierarchical
directories of screens and layouts ... I'm all flat)
> >
> > If I simply press the login button as opposed to selecting a setPage or
setAction I get the "homepage" but I still have to log in before any other
actions will work.
> >
> > The result is this ...
> >
> > =============================================================
> >
> > Thu Nov 01 22:05:21 PST 2001   [info] ResourceManager : found
screens/Login.vm with loader
org.apache.velocity.runtime.resource.loader.FileResourceLoader
> > Thu Nov 01 22:05:21 PST 2001   [info] ResourceManager : found
layouts/Default.vm with loader
org.apache.velocity.runtime.resource.loader.FileResourceLoader
> > Thu Nov 01 22:05:21 PST 2001   [info] ResourceManager : found
navigations/DefaultTop.vm with loader
org.apache.velocity.runtime.resource.loader.FileResourceLoader
> > Thu Nov 01 22:05:21 PST 2001   [info] ResourceManager : found
navigations/ApplicationMenu.vm with loader
org.apache.velocity.runtime.resource.loader.FileResourceLoader
> > Thu Nov 01 22:05:21 PST 2001   [info] ResourceManager : found
navigations/DefaultBottom.vm with loader
org.apache.velocity.runtime.resource.loader.FileResourceLoader
> >
> > =============================================================
> >
> > Notice, because of the failed login, the Login.vm screen is expressed
again, but the layout is now the Default.vm layout, bringing with it
unwanted navigation as well. This is not the behavior I am looking for...
> >
> > Question: I want to have "informational" links on the initial "Login"
screen that represent a "web" of informational pages, that do _not_ require
login.
> >
> > Then if the user clicks the "Login" button and is not validated, I want
them to stay on the "initial" screen, or in that initial "web", and links
accessable from that screen. I want a kind of doorway between one world and
the next, complete access before login and then additional screens available
_only_ after a proper login and I know the identity of the client.
> >
> > Can someone help with the "pseudocode" version Turbine style with enough
detail to get me to the right source files.
> >
> > I have compiled Turbine and am now using the Jar file created from that
build, so I'm ready to do some damage and be able to rebuild the Jar file.
> >
> > Thanks everyone for your help.
> >
> > I'm a taker now, but I do plan on giving as soon as I'm able.
> >
> > Joet
> >
> >
>
> --
> ===========================
> Brian Lawler
>


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


Re: Login behavior and the tale of two webs ... public and private ...

Posted by bp...@pacbell.net.
Joe-

I don't know if you have gone through the "Specification" document, if
not, it may be found at
http://jakarta.apache.org/turbine/turbine-2/fsd.html.  This document
describes the process flow for a typical Turbine request, including checks
for authenticated users.  In particular there is one paragraph that is
pertinent to your problem:

++++++++++++++

Once the user has been validated (the RunData.save() method has been
called) or not validated, then the SessionValidator action is executed
from within the Turbine servlet. The SessionValidator action checks to see
if a user has been logged in. If the user has not been logged in, then the
Screen is set to be the "Login" screen. If not, then the users last access
datestamp is updated. *** If you would like to allow the user to view
multiple pages without the need to login first, you will need to implement
your own version of SessionValidator that just returns nothing as a
result. *** Then, for the pages that you will want to make secure, you
should define a Layout that executes the SessionValidator action to make
things secure. Then, your Screens should call that "secure" Layout.

+++++++++++++++

It sounds like the *** part will be important when it comes time to
discern between your public and private pages.  However, this would not be
the solution to your problem at hand.  TR.props may be the key to solving
your problem.  There is a section in that file called Framework Settings
where you set all of you Login, Error, and Homepage info.  In particular,
there is a property called template.login and one called
screen.login.  Make sure that you are setting template.login so that the
LoginUser action (org/apache/turbine/modules/actions/LoginUser.java) knows
to call setScreenTemplate() instead of setScreen().  Maybe that will do
it...

-Brian

On Thu, 1 Nov 2001, Joe Terry wrote:

> Hi Everyone,
> 
> When my app initializes I see the following in the velocity.log ...
> 
> =============================================================
> 
> Thu Nov 01 21:56:16 PST 2001   [info] ResourceManager : found screens/Login.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader
> Thu Nov 01 21:56:16 PST 2001   [info] ResourceManager : found layouts/Login.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader
> Thu Nov 01 21:56:16 PST 2001   [info] ResourceManager : found navigations/LoginTop.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader
> Thu Nov 01 21:56:16 PST 2001   [info] ResourceManager : found navigations/LoginBottom.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader
> 
> =============================================================
> 
> Notice that my Login.vm screen indeed finds my Login.vm layout. All is well, except I still haven't gotten nested layouts to work. (hierarchical directories of screens and layouts ... I'm all flat)
> 
> If I simply press the login button as opposed to selecting a setPage or setAction I get the "homepage" but I still have to log in before any other actions will work.
> 
> The result is this ...
> 
> =============================================================
> 
> Thu Nov 01 22:05:21 PST 2001   [info] ResourceManager : found screens/Login.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader
> Thu Nov 01 22:05:21 PST 2001   [info] ResourceManager : found layouts/Default.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader
> Thu Nov 01 22:05:21 PST 2001   [info] ResourceManager : found navigations/DefaultTop.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader
> Thu Nov 01 22:05:21 PST 2001   [info] ResourceManager : found navigations/ApplicationMenu.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader
> Thu Nov 01 22:05:21 PST 2001   [info] ResourceManager : found navigations/DefaultBottom.vm with loader org.apache.velocity.runtime.resource.loader.FileResourceLoader
> 
> =============================================================
> 
> Notice, because of the failed login, the Login.vm screen is expressed again, but the layout is now the Default.vm layout, bringing with it unwanted navigation as well. This is not the behavior I am looking for...
> 
> Question: I want to have "informational" links on the initial "Login" screen that represent a "web" of informational pages, that do _not_ require login.
> 
> Then if the user clicks the "Login" button and is not validated, I want them to stay on the "initial" screen, or in that initial "web", and links accessable from that screen. I want a kind of doorway between one world and the next, complete access before login and then additional screens available _only_ after a proper login and I know the identity of the client.
> 
> Can someone help with the "pseudocode" version Turbine style with enough detail to get me to the right source files.
> 
> I have compiled Turbine and am now using the Jar file created from that build, so I'm ready to do some damage and be able to rebuild the Jar file.
> 
> Thanks everyone for your help.
> 
> I'm a taker now, but I do plan on giving as soon as I'm able.
> 
> Joet
> 
> 

-- 
===========================
Brian Lawler


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


Problems with navigation on templates

Posted by Emmanuel Cuevas <ec...@iac.com.mx>.
Hello everyone !

I'd like to know if I can have 2 screen_placeholders... here is my code, but I want to add
an additional screen_placeholder but I cannot find if this is posible, in the documentation says nothing about this issue...

here is my current code:

<table width="100%">
  <tr>
    <td colspan="2">
      $navigation.setTemplate("/DefaultTop.vm")
    </td>
  </tr>
  <tr>
    <td align="left" valign="top">
      $screen_placeholder
    </td>
    <td width="20" align="right" valign="top">
      $navigation.setTemplate("/Menu.vm")
    </td>
  </tr>
  <tr>
    <td colspan="2">
      $navigation.setTemplate("/DefaultBottom.vm")
    </td>
  </tr>
</table>

It belongs to my Default.vm file, and here is where I want to add the other screen_placeholder.

Any thoughts ???

Thanks in advance !!!

--
Emmanuel Cuevas
Senior Developer

ecuevasr@iac.com.mx

"If you gotta go, go with a smile"
                        The Joker




Re: Turbine newapp fails on Users->AddUser (tdk-2.1, Postgres, FreeBSD)

Posted by Chris Shenton <Ch...@hq.nasa.gov>.
bplawler@pacbell.net writes:

> The unfortunate thing about this new message is that Velocity
> gobbles up the stack trace. [...]  What I have done instead is to
> actually go into the code (getUsers in your case) and catch and dump
> the stack trace to the log file (using StringUtils.stackTrace() ).

Doh!  OK, I'll give it a whirl. I'm a total newbie at this so it's
taking me a lot longer to find my way around than it should.  

Thanks for the pointers.

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


Re: Turbine newapp fails on Users->AddUser (tdk-2.1, Postgres, FreeBSD)

Posted by bp...@pacbell.net.
The unfortunate thing about this new message is that Velocity gobbles up
the stack trace.  It is hard to debug this thing without a proper stack
trace.  Velocity has some setting like "show stack trace", but I have not
had much success using it.  (Perhaps someone on the list could chime in
here on how to get Velocity to dump its caught exception).  What I have
done instead is to actually go into the code (getUsers in your case) and
catch and dump the stack trace to the log file (using
StringUtils.stackTrace() ).  That should give some more hints as to what
is going on...

-B

On Mon, 5 Nov 2001, Chris Shenton wrote:

> bplawler@pacbell.net writes:
> 
> > http://jakarta.apache.org/turbine/turbine-2/howto/postgres-howto.html
> > for a patch that needs to be applied with postgres.
> 
> I applied the patch to Field.java (there's no context diff and the
> line numbers are different so I'm not 100% sure), compiled, installed
> in webapps/newapp/WEB-INF/lib/postgresql.java, restarted Turbine. Then
> did Users->AddUser, and it failed.  But it had a different log message
> than before which sounded somehow less nasty:
> 
>   Error rendering Velocity template: screens/user/FluxUserList.vm: Invocation of method 'getUsers' in  class org.apache.turbine.flux.tools.FluxTool threw exception class org.apache.turbine.util.security.DataBackendException
> 
>   Error rendering Velocity template: screens/user/FluxUserList.vm: Error rendering Velocity template: screens/user/FluxUserList.vm: Invocation of method 'getUsers' in  class org.apache.turbine.flux.tools.FluxTool threw exception class org.apache.turbine.util.security.DataBackendException
> 
> 
> So I check the DB manually, and the user has been created:
> 
>   newapp=# SELECT * FROM turbine_user;
>    user_id | login_name | password_value | first_name | last_name | email  | confirm_value | modified | created |       last_login       | objectdata 
>   ---------+------------+----------------+------------+-----------+--------+---------------+----------+---------+------------------------+------------
>          0 | turbine    | turbine        | turbine    | turbine   |        |               |          |         |                        |           
>        140 | turbot     | turbo          | terbo      | turbeaux  | tirbow |               |          |         | 1969-12-31 19:00:00-05 |      21077
>   (2 rows)
> 
> I don't know why the DB backend now works enough to insert a user, but
> not well enough to retrieve the same.  Any ideas? 
> 
> Thanks.
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 

-- 
===========================
Brian Lawler


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


Re: Turbine newapp fails on Users->AddUser (tdk-2.1, Postgres, FreeBSD)

Posted by Chris Shenton <Ch...@hq.nasa.gov>.
bplawler@pacbell.net writes:

> http://jakarta.apache.org/turbine/turbine-2/howto/postgres-howto.html
> for a patch that needs to be applied with postgres.

I applied the patch to Field.java (there's no context diff and the
line numbers are different so I'm not 100% sure), compiled, installed
in webapps/newapp/WEB-INF/lib/postgresql.java, restarted Turbine. Then
did Users->AddUser, and it failed.  But it had a different log message
than before which sounded somehow less nasty:

  Error rendering Velocity template: screens/user/FluxUserList.vm: Invocation of method 'getUsers' in  class org.apache.turbine.flux.tools.FluxTool threw exception class org.apache.turbine.util.security.DataBackendException

  Error rendering Velocity template: screens/user/FluxUserList.vm: Error rendering Velocity template: screens/user/FluxUserList.vm: Invocation of method 'getUsers' in  class org.apache.turbine.flux.tools.FluxTool threw exception class org.apache.turbine.util.security.DataBackendException


So I check the DB manually, and the user has been created:

  newapp=# SELECT * FROM turbine_user;
   user_id | login_name | password_value | first_name | last_name | email  | confirm_value | modified | created |       last_login       | objectdata 
  ---------+------------+----------------+------------+-----------+--------+---------------+----------+---------+------------------------+------------
         0 | turbine    | turbine        | turbine    | turbine   |        |               |          |         |                        |           
       140 | turbot     | turbo          | terbo      | turbeaux  | tirbow |               |          |         | 1969-12-31 19:00:00-05 |      21077
  (2 rows)

I don't know why the DB backend now works enough to insert a user, but
not well enough to retrieve the same.  Any ideas? 

Thanks.

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


Re: Turbine newapp fails on Users->AddUser (tdk-2.1, Postgres, FreeBSD)

Posted by Chris Shenton <Ch...@hq.nasa.gov>.
Oops, bad form to self-followup, but thought of something else:
Postgres builds its own .jar, different than the one which comes with
Turbine.  I've left the Turbine one in place in the "newapp" lib dir,
and stuffed the Postgres version in there, but with a name it won't find: 

  /usr/local/tdk/webapps/newapp/WEB-INF/lib:
  -r--r--r--  1 root  wheel   76744 Oct 12 12:43 postgresql-from-postgres.jar
  -rw-r--r--  1 root  wheel  194500 Oct 29 14:03 postgresql.jar

Dang. Replacing the Turbine version with the Postgresql one didn't
have any effect.  Guess it's time to try the patch.



BTW, the Turbine page seems to have an out of date CVS mechanism;
Postgres' site now says to use the following:

  cvs -d :pserver:anoncvs@anoncvs.postgresql.org:/projects/cvsroot co -P pgsql
  [password is null]

rather than the info on the page you sent:

         :pserver:anoncvs@postgresql.org:/home/projects/pgsql/cvsroot
password is postgresql.

Thanks.

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


Re: Turbine newapp fails on Users->AddUser (tdk-2.1, Postgres, FreeBSD)

Posted by Chris Shenton <Ch...@hq.nasa.gov>.
bplawler@pacbell.net writes:

> check out
> http://jakarta.apache.org/turbine/turbine-2/howto/postgres-howto.html
> for a patch that needs to be applied with postgres.

Doh!

The section on the JDBC Driver indiates issues with OID vs. Integer,
and Timestamp problems fixed in CVS, suggesting the latest version be
retrieved via CVS.  It doesn't say which versions have these problems
(all?), so it's difficult to tell if my version needs the patch or
not. 

The version I have has different line numbers, so the supplied diff in
the Patch is way off.  Any chance of seeing a context-diff?

I'll see if I can force it and give it a try. Thanks.


PS: Is this Postgres vs. Turbine thing always going to require a
    patch, or is some code going to be tweaked (Pg? Turbine? Village?)
    to make the in the integration smoother?

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


Re: Turbine newapp fails on Users->AddUser (tdk-2.1, Postgres, FreeBSD)

Posted by bp...@pacbell.net.
check out
http://jakarta.apache.org/turbine/turbine-2/howto/postgres-howto.html
for a patch that needs to be applied with postgres.

-B

On Fri, 2 Nov 2001, Chris Shenton wrote:

> I'm a Turbine newbie, just trying to get a handle on what I can do
> with Turbine.  Installed from tdk-2.1 on FreeBSD with Postgres.  Build
> the Newapp fine, and following the tdk-howto to test it.  
> 
> Most of it seems to work except the Users->AddUser option throws an
> exception upon SUBMIT.  Looks like it's failing to convert some string
> to a number but AFAIK doesn't say where.
> 
> Here's the trace from the logs. Any poiners?  (BTW, should that weird
> binary noise be in the logs?).
> 
> Thanks for any help.
> 
> [...]
> [Fri Nov 02 11:36:05 EST 2001] -- INFO -- DBPostgres.toUpperCase(TURBINE_PERMISSION.PERMISSION_NAME), returning UPPER(TURBINE_PERMISSION.PERMISSION_NAME)
> [Fri Nov 02 11:36:27 EST 2001] -- INFO -- Forced id retrieval - no available vector
> [Fri Nov 02 11:36:28 EST 2001] -- ERROR -- Turbine.handleException: null
> [Fri Nov 02 11:36:28 EST 2001] -- ERROR -- 
> 	Exception:  java.lang.reflect.InvocationTargetException
> 	Stack Trace follows:
> 	java.lang.reflect.InvocationTargetException: com.workingdogs.village.DataSetException: Bad conversion: java.lang.NumberFormatException: ’il.security.DataBackendException: Failed to create account 'turban': Bad conversion: java.lang.NumberFormatException: ’..modules.actions.VelocityAction.perform(VelocityAction.java:114)
> 	at org.apache.turbine.modules.ActionLoader.exec(ActionLoader.java:122)
> 	at org.apache.turbine.modules.pages.DefaultPage.doBuild(DefaultPage.java:143)
> 	at org.apache.turbine.modules.Page.build(Page.java:90)
> 	at org.apache.turbine.modules.PageLoader.exec(PageLoader.java:123)
> 	at org.apache.turbine.Turbine.doGet(Turbine.java:447)
> 	at org.apache.turbine.Turbine.doPost(Turbine.java:537)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
> 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:255)
> 	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
> 	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> 	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:225)
> 	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
> 	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
> 	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
> 	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> 	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> 	at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2252)
> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
> 	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
> 	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:446)
> 	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
> 	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> 	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
> 	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
> 	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
> 	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
> 	at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:875)
> 	at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:952)
> 	at java.lang.Thread.run(Thread.java:484)
> 
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 

-- 
===========================
Brian Lawler


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


Turbine newapp fails on Users->AddUser (tdk-2.1, Postgres, FreeBSD)

Posted by Chris Shenton <Ch...@hq.nasa.gov>.
I'm a Turbine newbie, just trying to get a handle on what I can do
with Turbine.  Installed from tdk-2.1 on FreeBSD with Postgres.  Build
the Newapp fine, and following the tdk-howto to test it.  

Most of it seems to work except the Users->AddUser option throws an
exception upon SUBMIT.  Looks like it's failing to convert some string
to a number but AFAIK doesn't say where.

Here's the trace from the logs. Any poiners?  (BTW, should that weird
binary noise be in the logs?).

Thanks for any help.

[...]
[Fri Nov 02 11:36:05 EST 2001] -- INFO -- DBPostgres.toUpperCase(TURBINE_PERMISSION.PERMISSION_NAME), returning UPPER(TURBINE_PERMISSION.PERMISSION_NAME)
[Fri Nov 02 11:36:27 EST 2001] -- INFO -- Forced id retrieval - no available vector
[Fri Nov 02 11:36:28 EST 2001] -- ERROR -- Turbine.handleException: null
[Fri Nov 02 11:36:28 EST 2001] -- ERROR -- 
	Exception:  java.lang.reflect.InvocationTargetException
	Stack Trace follows:
	java.lang.reflect.InvocationTargetException: com.workingdogs.village.DataSetException: Bad conversion: java.lang.NumberFormatException: ¬ísrjava.util.Hashtable»%!Jä¸F
loadFactorI	thresholdxp?@wx
	at com.workingdogs.village.Value.asInt(Value.java:424)
	at com.workingdogs.village.Value.setPreparedStatementValue(Value.java:233)
	at com.workingdogs.village.Record.saveWithInsert(Record.java:325)
	at com.workingdogs.village.Record.save(Record.java:185)
	at com.workingdogs.village.Record.save(Record.java:166)
	at org.apache.turbine.om.peer.BasePeer.insertOrUpdateRecord(BasePeer.java:860)
	at org.apache.turbine.om.peer.BasePeer.doInsert(BasePeer.java:764)
	at org.apache.turbine.om.peer.BasePeer.doInsert(BasePeer.java:657)
rethrown as org.apache.turbine.util.security.DataBackendException: Failed to create account 'turban': Bad conversion: java.lang.NumberFormatException: ¬ísrjava.util.Hashtable»%!Jä¸F
loadFactorI	thresholdxp?@wx
	at org.apache.turbine.services.security.db.DBUserManager.createAccount(DBUserManager.java:404)
	at org.apache.turbine.services.security.BaseSecurityService.addUser(BaseSecurityService.java:392)
	at org.apache.turbine.services.security.TurbineSecurity.addUser(TurbineSecurity.java:430)
	at org.apache.turbine.flux.modules.actions.user.FluxUserAction.doInsert(FluxUserAction.java:133)
	at java.lang.reflect.Method.invoke(Native Method)
	at org.apache.turbine.util.velocity.VelocityActionEvent.executeEvents(VelocityActionEvent.java:166)
	at org.apache.turbine.util.velocity.VelocityActionEvent.perform(VelocityActionEvent.java:114)
	at org.apache.turbine.modules.actions.VelocityAction.perform(VelocityAction.java:114)
	at org.apache.turbine.modules.ActionLoader.exec(ActionLoader.java:122)
	at org.apache.turbine.modules.pages.DefaultPage.doBuild(DefaultPage.java:143)
	at org.apache.turbine.modules.Page.build(Page.java:90)
	at org.apache.turbine.modules.PageLoader.exec(PageLoader.java:123)
	at org.apache.turbine.Turbine.doGet(Turbine.java:447)
	at org.apache.turbine.Turbine.doPost(Turbine.java:537)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:255)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:225)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2252)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:446)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:163)
	at org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at org.apache.catalina.connector.http.HttpProcessor.process(HttpProcessor.java:875)
	at org.apache.catalina.connector.http.HttpProcessor.run(HttpProcessor.java:952)
	at java.lang.Thread.run(Thread.java:484)


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