Hi.
Recently, I've downloaded the latest jetspeed and finally brought it
running on my Win2k box. However, it always fails when I browse to 'Edit
Account' with an error saying there's no such a column 'USERID.' So
I jumped into the EditAccount.java source code and found the following line:
crit.add ( TurbineUserPeer.getColumnName("USERID"),
((TurbineUser)data.getUser()).getId() );
This line should be something like:
crit.add ( TurbineUserPeer.getColumnName(mapBuilder.getUserId()),
((TurbineUser)data.getUser()).getId() );
So I wrote a patch for this file (
org/apache/jetspeed/modules/screens/EditAccount.java )
--- EditAccount.java.orig Tue Dec 5 22:27:27 2000
+++ EditAccount.java Mon Dec 11 23:19:24 2000
@@ -66,6 +66,8 @@
import org.apache.turbine.om.security.TurbineUser;
import org.apache.turbine.util.db.*;
import org.apache.turbine.util.db.pool.*;
+import org.apache.turbine.util.db.map.TurbineMapBuilder;
+import org.apache.turbine.om.peer.BasePeer;
import com.workingdogs.village.*;
import org.apache.ecs.*;
import org.apache.ecs.html.*;
@@ -102,10 +104,12 @@
String lastname = null;
String email = null;
+ TurbineMapBuilder mapBuilder = (TurbineMapBuilder)
BasePeer.getMapBuilder();
+
// for security, get information about the user from the database
// instead of what we already have cached.
Criteria crit = new Criteria();
- crit.add ( TurbineUserPeer.getColumnName("USERID"),
((TurbineUser)data.getUser()).getId() );
+ crit.add ( TurbineUserPeer.getColumnName(mapBuilder.getUserId()),
((TurbineUser)data.getUser()).getId() );
Vector output = TurbineUserPeer.doSelect(crit);
if ( output.size() > 0 )
{
With this patch, the EditAccount just works fine...
BRI Inc.
System Administrator
Kazuhiro Sakai
Email: [EMAIL PROTECTED]
--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Archives and Other: <http://marc.theaimsgroup.com/?l=jetspeed>
Problems?: [EMAIL PROTECTED]