You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Chris Shenton <Ch...@hq.nasa.gov> on 2001/11/02 18:09:05 UTC

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

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>


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>