db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Quinton McCombs <qmcco...@nequalsone.com>
Subject [SOURCE] Issue #TRQS83 modified
Date Tue, 21 Jan 2003 23:40:32 GMT

Issue TRQS83 has just been modified by user quintonm

You can view the issue detail at the following URL:
     <http://scarab.werken.com/issue/id/TRQS83>

The following modifications were made to this issue:

This message is from the turbine-user list.

From: Ryan Clifton 
Sent: Tuesday, January 21, 2003 11:54 AM
To: Turbine Users List
Subject: RE: Using IDBroker with existing Oracle sequences


I'm still using Oracle and I'm getting closer, but the IDBroker is still causing me headaches.
 Below I have a bunch of relevant info about my set up.  Any ideas?  Thanks again!  -Ryan

Now when I call save() i get the following error:

org.apache.torque.TorqueException: IdGenerator for table 'PERSON' is null
        at org.apache.torque.util.BasePeer.doInsert(BasePeer.java:690)
	  ...

I have searched the mail archive and found that previous people with this problem had the
adapter set up incorrectly, however my config for oracle is:

torque.database.default=ryan_test torque.database.ryan_test.adapter=oracle

The following code throws the error (the first lines are to verify that my connection is working..
it is):

	  Person person1 = new Person();
        person1 = PersonPeer.retrieveByPK(new NumberKey(1));
        _log.info("Person1:" + person1.getfName());

        person1.setfName("Ryan");
        person1.setlName("Clifton");
        person1.setNew(true);
        person1.setModified(true);
-->     person1.save();

Here is what I get in the logs:

931 [main] DEBUG torque.Torque  - Adding a dummy entry for default, mapped onto ryan_test
.1212 [Thread-3] DEBUG oid.IDBroker  - IDBroker thread was started. 3846 [main] DEBUG util.BasePeer
 - SELECT PERSON.ID, PERSON.FNAME, PERSON.LNAME FROM PERSON WHERE PERSON.ID=1 3876 [main]
DEBUG util.BasePeer  - Elapsed time=30 ms 4026 [main] INFO testcase.TorqueTestCase  - Person1:com.win.core.dao.Person@1f
E..
Time: 3.074
There was 1 error:
1) testPersonDBO(com.win.core.testcase.TorqueTestCase)
org.apache.torque.TorqueException: IdGenerator for table 'PERSON' is null
        at org.apache.torque.util.BasePeer.doInsert(BasePeer.java:690)
        at com.win.core.dao.BasePersonPeer.doInsert(BasePersonPeer.java:216)
        at com.win.core.dao.BasePersonPeer.doInsert(BasePersonPeer.java:565)
        at com.win.core.dao.BasePerson.save(BasePerson.java:695)
        at com.win.core.dao.BasePerson.save(BasePerson.java:657)
        at com.win.core.dao.BasePerson.save(BasePerson.java:637)
        at com.win.core.testcase.TorqueTestCase.testPersonDBO(TorqueTestCase.jav
a:67)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at com.win.core.testcase.TorqueTestCase.main(TorqueTestCase.java:28)

FAILURES!!!
Tests run: 3,  Failures: 0,  Errors: 1

  




Mime
View raw message