I have not gotten TurbineSecurity.getAuthenticatedUser() to work.
Robert Lee <[email protected]> Thu, 04 Apr 2013 16:04:19 -0400
| Newsgroups | gmane.comp.jakarta.turbine.user |
|---|---|
| Message-ID | <[email protected]> |
--------------050301070708070608020200
Content-Type: multipart/alternative;
boundary="------------030102030807010709030500"
--------------030102030807010709030500
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
Using Turbine-4 M1, Torque 3.3, and MySQL connector 5.1.21 running in
Tomcat 7.0.39
I get an Exception, Failed to retrieve users, thrown from line 238 in
TorqueUserManager.retrieveList()
when executing TurbineSecurity.getAuthenticatedUser("user");
When I try
criteria.clear();
criteria.addSelectColumn("TURBINE_USER.LOGIN_NAME");
List userList = TurbineUserPeer.doSelect(criteria);
I get
com.workingdogs.village.DataSetException: Bad conversion:
java.lang.NumberFormatException: For input string: "admin"
from the line
336 obj.setUserId(row.getValue(offset + 0).asInt());
in 329 public static void populateObject(Record row, int Offset,
TurbineUser obj)
which is called from
296 public static TurbineUser row2Object(Record row, int offset, Class cls)
TURBINE_USER is defined as
+----------------+-------------+------+-----+---------------------+-----------------------------+
| Field | Type | Null | Key | Default |
Extra |
+----------------+-------------+------+-----+---------------------+-----------------------------+
| USER_ID | int(11) | NO | PRI | NULL
| |
| LOGIN_NAME | varchar(64) | NO | UNI | NULL
| |
| PASSWORD_VALUE | varchar(16) | NO | | NULL
| |
| FIRST_NAME | varchar(64) | NO | | NULL
| |
| LAST_NAME | varchar(64) | NO | | NULL
| |
| EMAIL | varchar(64) | YES | | NULL
| |
| CONFIRM_VALUE | varchar(16) | YES | | NULL
| |
| MODIFIED | timestamp | NO | | CURRENT_TIMESTAMP | on
update CURRENT_TIMESTAMP |
| CREATED | timestamp | NO | | 0000-00-00 00:00:00
| |
| LAST_LOGIN | timestamp | NO | | 0000-00-00 00:00:00
| |
| OBJECTDATA | mediumblob | YES | | NULL
| |
+----------------+-------------+------+-----+---------------------+-----------------------------+
11 rows in set (1.16 sec)b
and contains
+---------+--------------+----------------+------------+-----------+-------+---------------+---------------------+---------------------+---------------------+------------+
| USER_ID | LOGIN_NAME | PASSWORD_VALUE | FIRST_NAME | LAST_NAME |
EMAIL | CONFIRM_VALUE | MODIFIED | CREATED |
LAST_LOGIN | OBJECTDATA |
+---------+--------------+----------------+------------+-----------+-------+---------------+---------------------+---------------------+---------------------+------------+
| 1 | admin | password | Turbine | Admin |
NULL | NULL | 2013-04-01 09:26:38 | 0000-00-00 00:00:00 |
0000-00-00 00:00:00 | NULL |
| 2 | user | password | Turbine | User |
NULL | NULL | 2013-04-01 09:26:38 | 0000-00-00 00:00:00 |
0000-00-00 00:00:00 | NULL |
| 3 | TurbineUser1 | password | Turbine | Usera |
NULL | NULL | 2013-04-01 09:26:38 | 0000-00-00 00:00:00 |
0000-00-00 00:00:00 | NULL |
| 4 | TurbineUser2 | password | Turbine | Userb |
NULL | NULL | 2013-04-01 09:26:38 | 0000-00-00 00:00:00 |
0000-00-00 00:00:00 | NULL |
+---------+--------------+----------------+------------+-----------+-------+---------------+---------------------+---------------------+---------------------+------------+
4 rows in set (0.01 sec)
I surmise that the row is being read incorrectly and that the first row
(at least) did not include the USER_ID column. But it does convince me
that I should be able to get to the database. The problem I really want
to solve is getAuthenticatedUser("user")
TR.props contains
services.SecurityService.classname=org.apache.turbine.services.security.torque.TorqueSecurityService
services.SecurityService.user.manager =
org.apache.turbine.services.security.torque.TorqueUserManager
#services.SecurityService.user.class =
org.apache.turbine.services.security.torque.TorqueUser
#services.SecurityService.group.class =
org.apache.turbine.services.security.torque.TorqueGroup
#services.SecurityService.permission.class =
org.apache.turbine.services.security.torque.TorquePermission
#services.SecurityService.role.class =
org.apache.turbine.services.security.torque.TorqueRole
services.SecurityService.userPeer.class=org.apache.turbine.om.security.peer.TurbineUserPeer
Can some give me an some ideas on debugging this?
--------------030102030807010709030500
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Using Turbine-4 M1, Torque 3.3, and MySQL connector 5.1.21 running
in Tomcat 7.0.39<br>
<br>
I get an Exception, Failed to retrieve users, thrown from line 238
in TorqueUserManager.retrieveList()<br>
when executing TurbineSecurity.getAuthenticatedUser("user");<br>
<br>
When I try<br>
criteria.clear();<br>
criteria.addSelectColumn("TURBINE_USER.LOGIN_NAME");<br>
List userList = TurbineUserPeer.doSelect(criteria);<br>
I get <br>
com.workingdogs.village.DataSetException: Bad conversion:
java.lang.NumberFormatException: For input string: "admin"<br>
from the line<br>
336 obj.setUserId(row.getValue(offset + 0).asInt());<br>
in 329 public static void populateObject(Record row, int Offset,
TurbineUser obj)<br>
which is called from <br>
296 public static TurbineUser row2Object(Record row, int offset,
Class cls)<br>
<br>
TURBINE_USER is defined as<br>
<small><tt>+----------------+-------------+------+-----+---------------------+-----------------------------+</tt><tt><br>
</tt><tt>| Field | Type | Null | Key |
Default | Extra |</tt><tt><br>
</tt><tt>+----------------+-------------+------+-----+---------------------+-----------------------------+</tt><tt><br>
</tt><tt>| USER_ID | int(11) | NO | PRI |
NULL | |</tt><tt><br>
</tt><tt>| LOGIN_NAME | varchar(64) | NO | UNI |
NULL | |</tt><tt><br>
</tt><tt>| PASSWORD_VALUE | varchar(16) | NO | |
NULL | |</tt><tt><br>
</tt><tt>| FIRST_NAME | varchar(64) | NO | |
NULL | |</tt><tt><br>
</tt><tt>| LAST_NAME | varchar(64) | NO | |
NULL | |</tt><tt><br>
</tt><tt>| EMAIL | varchar(64) | YES | |
NULL | |</tt><tt><br>
</tt><tt>| CONFIRM_VALUE | varchar(16) | YES | |
NULL | |</tt><tt><br>
</tt><tt>| MODIFIED | timestamp | NO | |
CURRENT_TIMESTAMP | on update CURRENT_TIMESTAMP |</tt><tt><br>
</tt><tt>| CREATED | timestamp | NO | | 0000-00-00
00:00:00 | |</tt><tt><br>
</tt><tt>| LAST_LOGIN | timestamp | NO | | 0000-00-00
00:00:00 | |</tt><tt><br>
</tt><tt>| OBJECTDATA | mediumblob | YES | |
NULL | |</tt><tt><br>
</tt><tt>+----------------+-------------+------+-----+---------------------+-----------------------------+</tt><tt><br>
</tt><tt>11 rows in set (1.16 sec)</tt>b<br>
<big>and contains</big><br>
<tt>+---------+--------------+----------------+------------+-----------+-------+---------------+---------------------+---------------------+---------------------+------------+</tt><tt><br>
</tt><tt>| USER_ID | LOGIN_NAME | PASSWORD_VALUE | FIRST_NAME |
LAST_NAME | EMAIL | CONFIRM_VALUE | MODIFIED |
CREATED | LAST_LOGIN | OBJECTDATA |</tt><tt><br>
</tt><tt>+---------+--------------+----------------+------------+-----------+-------+---------------+---------------------+---------------------+---------------------+------------+</tt><tt><br>
</tt><tt>| 1 | admin | password | Turbine |
Admin | NULL | NULL | 2013-04-01 09:26:38 |
0000-00-00 00:00:00 | 0000-00-00 00:00:00 | NULL |</tt><tt><br>
</tt><tt>| 2 | user | password | Turbine |
User | NULL | NULL | 2013-04-01 09:26:38 |
0000-00-00 00:00:00 | 0000-00-00 00:00:00 | NULL |</tt><tt><br>
</tt><tt>| 3 | TurbineUser1 | password | Turbine |
Usera | NULL | NULL | 2013-04-01 09:26:38 |
0000-00-00 00:00:00 | 0000-00-00 00:00:00 | NULL |</tt><tt><br>
</tt><tt>| 4 | TurbineUser2 | password | Turbine |
Userb | NULL | NULL | 2013-04-01 09:26:38 |
0000-00-00 00:00:00 | 0000-00-00 00:00:00 | NULL |</tt><tt><br>
</tt><tt>+---------+--------------+----------------+------------+-----------+-------+---------------+---------------------+---------------------+---------------------+------------+</tt><tt><br>
</tt><tt>4 rows in set (0.01 sec)<br>
<br>
<big>I surmise that the row is being read incorrectly and that
the first row (at least) did not include the USER_ID column.
But it does convince me that I should be able to get to the
database. The problem I really want to solve is
getAuthenticatedUser("user")<br>
<br>
TR.props contains<br>
<small>services.SecurityService.classname=org.apache.turbine.services.security.torque.TorqueSecurityService<br>
services.SecurityService.user.manager =
org.apache.turbine.services.security.torque.TorqueUserManager<br>
<br>
<br>
<br>
#services.SecurityService.user.class =
org.apache.turbine.services.security.torque.TorqueUser<br>
#services.SecurityService.group.class =
org.apache.turbine.services.security.torque.TorqueGroup<br>
#services.SecurityService.permission.class =
org.apache.turbine.services.security.torque.TorquePermission<br>
#services.SecurityService.role.class =
org.apache.turbine.services.security.torque.TorqueRole<br>
<br>
services.SecurityService.userPeer.class=org.apache.turbine.om.security.peer.TurbineUserPeer<br>
</small><br>
Can some give me an some ideas on debugging this?<br>
<br>
<br>
</big></tt></small>
</body>
</html>
--------------030102030807010709030500--
--------------050301070708070608020200
Content-Type: text/plain; charset=us-ascii
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
--------------050301070708070608020200--