You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Gert-Jan Braas <br...@wyldebeast-wunderliebe.com> on 2002/02/15 12:18:24 UTC

Getting a new user in TURBINE_USER

Hi,

I'm using Turbine 2.1 and wat to use it's security module in an
application.

I'm experiencing problem while getting new users into TURBINE_USER.

Postgres 7.1.3 is beeing used as the data store.

Java 1.3.x is the JVM and the systems this is been used on are
Linux with 2.4 kernels on i386 and powerpc

This is the stacktrace:
==================================================
[Thu Feb 14 17:50:14 CET 2002] -- DEBUG -- Refreshing UI manager
[Thu Feb 14 17:50:14 CET 2002] -- ERROR -- Cannot load skin: default
[Thu Feb 14 17:50:19 CET 2002] -- ERROR -- Het usr object:fghfgh pipo
deClown
[Thu Feb 14 17:50:19 CET 2002] -- DEBUG -- SELECT TURBINE_USER.USER_ID,
TURBINE_USER.LOGIN_NAME, TURBINE_USER.PASSWORD_VALUE,
TURBINE_USER.FIRST_NAME, TURBINE_USER.LAST_NAME, TURBINE_USER.EMAIL,
TURBINE_USER.CONFIRM_VALUE, TURBINE_USER.MODIFIED, TURBINE_USER.CREATED,
TURBINE_USER.LAST_LOGIN, TURBINE_USER.OBJECTDATA FROM TURBINE_USER WHERE
(TURBINE_USER.LOGIN_NAME='fghfgh')
[Thu Feb 14 17:50:19 CET 2002] -- INFO -- Forced id retrieval - no
available vector
[Thu Feb 14 17:50:19 CET 2002] -- DEBUG -- BasePeer.doUpdate:
whereClause=TABLE_NAME='TURBINE_USER'
[Thu Feb 14 17:50:19 CET 2002] -- ERROR -- Couldn't create account: db
problem
        Exception:  org.apache.turbine.util.security.DataBackendException:
Failed to create account 'fghfgh': Bad conversion:
java.lang.NumberFormatException:
<AC><ED>^@^Esr^@^Sjava.util.Hashtable^S<BB>^O%!J<E4><B8>^C^@^BF^@
loadFactorI^@   thresholdxp?@^@^@^@^@^@^@^@^@^@^A^@^@^@^@x
        Stack Trace follows:
        com.workingdogs.village.DataSetException: Bad conversion:
java.lang.NumberFormatException: <AC><ED>^@^Esr^@^Sjava.util.Hashtable^S
<BB>^O%!J<E4><B8>^C^@^BF^@
loadFactorI^@   thresholdxp?@^@^@^@^@^@^@^@^@^@^A^@^@^@^@x
        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 'fghfgh': Bad conversion:
java.lang.NumberFormatException:
<AC><ED>^@^Esr^@^Sjava.util.Hashtable^S<BB>^O%!J<E4><B8>^C^@^BF^@
loadFactorI^@   thresholdxp?@^@^@^@^@^@^@^@^@^@^A^@^@^@^@x
        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
com.wyldebeast_wunderliebe.expertfinder.servlets.actions.AddExpert.doPerform(AddExpert.java:79)

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

After analysing some code i came to the conclusion that the workingdog
checks for collumns beein empty at insert time. It then set's a field to
NULL. In this case it is the USER_ID field.

I checked the mail archives, and someone said it was a problem with
postgresql(and arrays). The same error also comes up with mysql though.

The turbine example project that uses the security also displays the same
troubles. Any tables we populate ourselves do get into the database with
ID's from the IDBroker

If anyone could point me to some documentation on how to solve this
problem, (or just come up with a plain solution :-) ) I would surely
appreciate it.

Gert-Jan Braas


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


JAVA exception when adding a new user in TURBINE_USER on PostgreSQL 7.1.3

Posted by Bertrand Habib <bi...@database59.ch>.
Hello all and Gert-Jan,
I posted yesterday a similar issue under (wrong) object: "Exception:  
java.lang.reflect.InvocationTargetException" (14 feb)
This exception raised by trying to add reccords to any table in a freesh 
builded turbine 'newapp'.
In my configuration, Turbine connects to a remote PostgreSQL server.
I hope somebody knows a more or less simple way to work arround this 
problem.

Bertrand



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


Re: Getting a new user in TURBINE_USER

Posted by Daniel Rall <dl...@finemaltcoding.com>.
Hey Colm, I've incorported your PostgreSQL changes into the
jakarta-turbine-torque CVS.  Are any documentation updates needed as a
result of this change?  Here's the latest from CVS:

# Taken from java.sql.Types in the IBM 1.3 JDK
# JDBC to PostgreSQL mappings.

BIT =
TINYINT = int2
SMALLINT = int2
INTEGER = integer
BIGINT = int8
FLOAT = float
REAL = float
BOOLEANCHAR = boolean

DOUBLE =
NUMERIC =
DECIMAL =
CHAR = varchar
VARCHAR = varchar
LONGVARCHAR = bytea
DATE = date
TIME = time
TIMESTAMP = timestamp
BINARY = bytea
VARBINARY = bytea
LONGVARBINARY = bytea
NULL =
OTHER =
JAVA_OBJECT =
DISTINCT =
STRUCT =
ARRAY =
BLOB =
CLOB = text
REF =

AUTOINCREMENT = serial
NOTNULL = NOT NULL

primaryKeyInsideTableDirective = true
indexInsideTableDirective = false

removeNotNullWithAutoIncrement = true

suppressDefaults = false
idMethod=sequence


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


Not all jar files copied in weblogic

Posted by Gary Bisaga <ga...@maximus.com>.
Hi, I'm trying to get Turbine 2.2b1 working with weblogic 6.1 and I'm having
a weird weblogic (I think) problem. I've read everything I can find in this
group about running Turbine on weblogic already.

1. First, my web application was working perfectly under Catalina.
2. As mentioned in previous postings to this group, I modified the web.xml
file to have:

    <servlet-mapping>
      <servlet-name>garyapp</servlet-name>
      <url-pattern>/</url-pattern>
    </servlet-mapping>

3. I copied the whole tree (\tdk\webapps\garyapp) under weblogic
(\bea\wlserver6.1\config\mydomain\applications\garyapp). I'm not using a WAR
file, just files right on the disk.
4. I modified the weblogic config.xml file as follows:

    <Application Deployed="true" Name="garyapp"
Path=".\config\mydomain\applications">
        <WebAppComponent Name="garyapp" Targets="myserver" URI="garyapp"/>
    </Application>

5. Now, I run weblogic and enter http://localhost/garyapp/servlet/garyapp. I
get the following exception:

---------------------------- START EXCEPTION -------------------------------
<Feb 15, 2002 12:43:22 PM EST> <Error> <HTTP>
<[WebAppServletContext(7243997,gar
yapp,/garyapp)] Servlet failed with ServletException
javax.servlet.ServletException: Servlet class: 'org.apache.turbine.Turbine'
coul
d not be loaded - the requested  class wasn't found in the classpath:
'C:\bea\wl
server6.1\config\mydomain\applications\garyapp;C:\bea\wlserver6.1\.\config\m
ydom
ain\applications\garyapp\WEB-INF\classes;C:\bea\wlserver6.1\.\config\mydomai
n\ap
plications\garyapp\WEB-INF\_tmp_war_myserver_myserver_garyapp\WEB-INF\lib\cl
asse
s1224673.jar;C:\bea\wlserver6.1\.\config\mydomain\applications\garyapp\WEB-I
NF\_
tmp_war_myserver_myserver_garyapp\WEB-INF\lib\hsql24674.jar;C:\bea\wlserver6
.1\.
\config\mydomain\applications\garyapp\WEB-INF\_tmp_war_myserver_myserver_gar
yapp
\WEB-INF\lib\httpunit24675.jar;C:\bea\wlserver6.1\.\config\mydomain\applicat
ions
\garyapp\WEB-INF\_tmp_war_myserver_myserver_garyapp\WEB-INF\lib\idb24676.jar
;C:\
bea\wlserver6.1\.\config\mydomain\applications\garyapp\WEB-INF\_tmp_war_myse
rver
_myserver_garyapp\WEB-INF\lib\jdbc2_0-stdext24677.jar;C:\bea\wlserver6.1\.\c
onfi
g\mydomain\applications\garyapp\WEB-INF\_tmp_war_myserver_myserver_garyapp\W
EB-I
NF\lib\oro24678.jar;C:\bea\wlserver6.1\.\config\mydomain\applications\garyap
p\WE
B-INF\_tmp_war_myserver_myserver_garyapp\WEB-INF\lib\postgresql24679.jar;C:\
bea\
wlserver6.1\.\config\mydomain\applications\garyapp\WEB-INF\_tmp_war_myserver
_mys
erver_garyapp\WEB-INF\lib\sapdbc24680.jar;C:\bea\wlserver6.1\.\config\mydoma
in\a
pplications\garyapp\WEB-INF\_tmp_war_myserver_myserver_garyapp\WEB-INF\lib\S
TT24
681.jar;C:\bea\wlserver6.1\.\config\mydomain\applications\garyapp\WEB-INF\_t
mp_w
ar_myserver_myserver_garyapp\WEB-INF\lib\xmlrpc24682.jar'
        at
weblogic.servlet.internal.ServletStubImpl.prepareServlet(ServletStubI
mpl.java:594)
        at
weblogic.servlet.internal.ServletStubImpl.getServlet(ServletStubImpl.
java:368)
        at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:242)
        at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
pl.java:200)
        at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
rvletContext.java:2495)
        at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
pl.java:2204)
        at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
        at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
>
---------------------------- END EXCEPTION -------------------------------

Now, I know this means it can't find the Turbine servlet. Here's where the
weird part starts. I look at my WEB-INF/lib directory:

 Directory of
C:\bea\wlserver6.1\config\mydomain\applications\garyapp\WEB-INF\li
b

02/13/2002  11:34a      <DIR>          .
02/13/2002  11:34a      <DIR>          ..
01/25/2002  09:44a              45,386 activation-1.0.1.jar
01/07/2002  04:49p           1,124,276 classes12.jar
01/25/2002  09:44a             379,658 ecs-1.4.1.jar
01/25/2002  09:44a             175,666 hsql.jar
01/25/2002  09:44a              76,964 httpunit.jar
01/25/2002  09:44a             236,041 idb.jar
01/25/2002  09:44a              29,937 jakarta-regexp-1.3-dev.jar
01/25/2002  09:44a              84,854 jdbc-se2.0.jar
01/25/2002  09:44a               6,727 jdbc2_0-stdext.jar
01/25/2002  09:44a              98,496 jndi-1.2.1.jar
01/25/2002  09:44a              17,619 jta1.0.1.jar
01/25/2002  09:44a              97,382 junit-3.2.jar
01/25/2002  09:44a             152,037 log4j-1.1.jar
01/25/2002  09:44a             280,984 mail-1.2.jar
01/25/2002  09:44a             109,927 mm.mysql-2.0.4.jar
01/25/2002  09:44a              76,734 oro.jar
01/25/2002  09:44a             194,500 postgresql.jar
01/25/2002  09:44a               4,041 README.txt
01/25/2002  09:44a             208,635 sapdbc.jar
02/13/2002  11:21a             216,879 STT.jar
02/08/2002  12:15p             707,897 turbine-2.2b1.jar
01/25/2002  09:44a             369,494 velocity-1.2-dev.jar
01/25/2002  09:44a              31,326 village-1.5.1.jar
01/25/2002  09:44a             436,094 xalan-1.2.1.jar
01/25/2002  09:44a             840,704 xerces-1.3.0.jar
01/25/2002  09:44a              47,926 xmlrpc.jar
              26 File(s)      6,050,184 bytes
               2 Dir(s)  29,539,246,080 bytes free

Ok, there's turbine-2.2b1.jar. So why isn't the Turbine servlet found? This
directory was copied (with the rest of garyapp) straight over from under
\TDK where it was working fine with Catalina. One clue: I looked at the
_tmp_war directory for this webapp:

 Directory of
C:\bea\wlserver6.1\config\mydomain\applications\garyapp\WEB-INF\_t
mp_war_myserver_myserver_garyapp\WEB-INF\lib

02/15/2002  12:31p      <DIR>          .
02/15/2002  12:31p      <DIR>          ..
02/15/2002  12:31p           1,124,276 classes1263855.jar
02/15/2002  12:31p             175,666 hsql63856.jar
02/15/2002  12:31p              76,964 httpunit63857.jar
02/15/2002  12:31p             236,041 idb63858.jar
02/15/2002  12:31p               6,727 jdbc2_0-stdext63859.jar
02/15/2002  12:31p              76,734 oro63860.jar
02/15/2002  12:31p             194,500 postgresql63861.jar
02/15/2002  12:31p             208,635 sapdbc63862.jar
02/15/2002  12:31p             216,879 STT63863.jar
02/15/2002  12:31p              47,926 xmlrpc63864.jar
              10 File(s)      2,364,348 bytes
               2 Dir(s)  29,539,078,144 bytes free

10 out of 26 files were copied over!?!?

If anybody can help me with this, I'd be most appreciative.

Thanks,
<>< gary


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


Re: Getting a new user in TURBINE_USER

Posted by Colm McCartan <co...@owl.co.uk>.

Gert-Jan Braas wrote:

> Hi,
> 
> I'm using Turbine 2.1 and wat to use it's security module in an
> application.
> 
> I'm experiencing problem while getting new users into TURBINE_USER.
> 
> Postgres 7.1.3 is beeing used as the data store.
> 
> Java 1.3.x is the JVM and the systems this is been used on are
> Linux with 2.4 kernels on i386 and powerpc
> 
> This is the stacktrace:
> ==================================================
> [Thu Feb 14 17:50:14 CET 2002] -- DEBUG -- Refreshing UI manager
> [Thu Feb 14 17:50:14 CET 2002] -- ERROR -- Cannot load skin: default
> [Thu Feb 14 17:50:19 CET 2002] -- ERROR -- Het usr object:fghfgh pipo
> deClown
> [Thu Feb 14 17:50:19 CET 2002] -- DEBUG -- SELECT TURBINE_USER.USER_ID,
> TURBINE_USER.LOGIN_NAME, TURBINE_USER.PASSWORD_VALUE,
> TURBINE_USER.FIRST_NAME, TURBINE_USER.LAST_NAME, TURBINE_USER.EMAIL,
> TURBINE_USER.CONFIRM_VALUE, TURBINE_USER.MODIFIED, TURBINE_USER.CREATED,
> TURBINE_USER.LAST_LOGIN, TURBINE_USER.OBJECTDATA FROM TURBINE_USER WHERE
> (TURBINE_USER.LOGIN_NAME='fghfgh')
> [Thu Feb 14 17:50:19 CET 2002] -- INFO -- Forced id retrieval - no
> available vector
> [Thu Feb 14 17:50:19 CET 2002] -- DEBUG -- BasePeer.doUpdate:
> whereClause=TABLE_NAME='TURBINE_USER'
> [Thu Feb 14 17:50:19 CET 2002] -- ERROR -- Couldn't create account: db
> problem
>         Exception:  org.apache.turbine.util.security.DataBackendException:
> Failed to create account 'fghfgh': Bad conversion:
> java.lang.NumberFormatException:
> <AC><ED>^@^Esr^@^Sjava.util.Hashtable^S<BB>^O%!J<E4><B8>^C^@^BF^@
> loadFactorI^@   thresholdxp?@^@^@^@^@^@^@^@^@^@^A^@^@^@^@x
>         Stack Trace follows:
>         com.workingdogs.village.DataSetException: Bad conversion:
> java.lang.NumberFormatException: <AC><ED>^@^Esr^@^Sjava.util.Hashtable^S
> <BB>^O%!J<E4><B8>^C^@^BF^@
> loadFactorI^@   thresholdxp?@^@^@^@^@^@^@^@^@^@^A^@^@^@^@x
>         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 'fghfgh': Bad conversion:
> java.lang.NumberFormatException:
> <AC><ED>^@^Esr^@^Sjava.util.Hashtable^S<BB>^O%!J<E4><B8>^C^@^BF^@
> loadFactorI^@   thresholdxp?@^@^@^@^@^@^@^@^@^@^A^@^@^@^@x
>         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
> com.wyldebeast_wunderliebe.expertfinder.servlets.actions.AddExpert.doPerform(AddExpert.java:79)
> 
> ==================================================
> 

Gert,

I would recommend that you update your postgresql.jar to the latest version (I 
can mail you it off-list if you like) and perform some updates to the db.props 
under tdk\share\conf\torque\templates\sql\base\postgresql. Then rebuild your app.

Heres what my db.props looks like:
------------------------------------------------------------
BIT =
TINYINT =
SMALLINT =
INTEGER = integer
BIGINT = int8
FLOAT =
REAL =


DOUBLE =
NUMERIC =
DECIMAL =
CHAR = varchar
VARCHAR = varchar
LONGVARCHAR = bytea
DATE =
TIME =
TIMESTAMP = timestamp
BINARY = bytea
VARBINARY = bytea
LONGVARBINARY = bytea
NULL =
OTHER =
JAVA_OBJECT =
DISTINCT =
STRUCT =
ARRAY =
BLOB =
CLOB = text
REF =
------------------------------------------------------------

These problems are often associated with the lack of support for bytea types in 
older versions of postgres - this is why you need both new type-mappings and the 
new driver classes.

HTH
................................................................
colm mccartan
panasonic owl uk
colmm@owl.co.uk
(44) 131 561 1035


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