Julien Giovannnoni wrote:
> I use the preferred id generation method ID_TABLE and IDBroker.
> I have no problems to write in the visitor table from Turbine when
> it is a new tuple. The system work right! But If I want to write a new
> tuple in my own tables, I encoured this problem (for all tables):
>
> My request is like some this:
>
> // Request in the Visitor table: does match it!
What do you mean match/not match? I can't understand you.
>
> Criteria cCreateVisitor = new Criteria();
>
> cCreateVisitor.add(TurbineUserPeer.USERNAME, username);
> cCreateVisitor.add(TurbineUserPeer.PASSWORD, password);
> cCreateVisitor.add(TurbineUserPeer.LAST_NAME, surname);
> cCreateVisitor.add(TurbineUserPeer.FIRST_NAME, name);
>
> Object oVisitorid = TurbineUserPeer.doInsert(cCreateVisitor);
> Integer createVisitorid = new Integer(oVisitorid.toString());
>
> int visitorid = createVisitorid.intValue() ;
> System.out.println(visitorid);
Gosh, you don't do this like that in with the new security system!
User newUser = TurbineSecurity.getAnonymousUser();
newUser.setUserName(username);
newUser.setLastName(surname);
newUser.setFirstName(name);
TurbineSecurity.addUser(newUser, password);
> // But this doesn't match (But does match in the compilation form):
>
> Criteria cCreatePerson = new Criteria();
> cCreatePerson.add(PersonPeer.NAME, name);
>
> Object oCreatePerson = PersonPeer.doInsert(cCreatePerson);
> Integer CreatePersonId = new Integer(oCreatePerson.toString());
> int PersonId = CreatePersonId.intValue() ;
>
> The console "say":
>
> Update (select) whereClause=TABLE_NAME='Visitor'
> 472
>
> Update (select) whereClause=TABLE_NAME='person'
>
> java.sql.SQLException: Exhausted Resultset
> at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:293)
Are you really sure that your table has a proper entry
in the ID_TABLE? For me, it looks like the select statement
in the ID Broker returned 0 rows, but the code tried to
read values which caused the exception to be thrown.
Double check the ID_TABLE, please...
Rafal
--
Rafal Krzewski
Senior Internet Developer
mailto:[EMAIL PROTECTED]
+48 22 8534830 http://e-point.pl
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]