From: youjun g. <you...@ya...> - 2009-12-23 13:12:04
|
Hilmar and Bill, In our database, the current hibernate_sequence value (1416) is much smaller than max id value of table taxonlabel and phylotreenode, that make primer key conflict when hibernate try to insert new data into this two table. It need to be change to a bigger number so that the current value big than max phylotreenode_id. I tried but the server said only the owner can alter it. Enjoy your holiday to all! Youjun |
From: Hilmar L. <hl...@ne...> - 2009-12-23 15:06:36
|
The owner of what? And change where? Is that a database object? -hilmar Sent from away On Dec 23, 2009, at 7:42 AM, youjun guo <you...@ya...> wrote: > Hilmar and Bill, > > In our database, the current hibernate_sequence value (1416) is much > smaller than max id value of table taxonlabel and phylotreenode, > that make primer key conflict when hibernate try to insert new data > into this two table. > > It need to be change to a bigger number so that the current value > big than max phylotreenode_id. > > I tried but the server said only the owner can alter it. > > Enjoy your holiday to all! > > Youjun |
From: youjun g. <you...@ya...> - 2009-12-23 16:57:59
|
Vladimir, Look at the end of this error massage which I got minutes ago, hibernate get this id from sequence: TAXONLABEL_ID =14220 that is far less than the max id in the table and it is already exist. To make change on the sequence run this sql query: alter sequence hibernate_sequence restart with 300000. 300000 just a example, you can find the max id in these tables and make it the bigest + 1. Youjun Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 4.047 sec <<< FAILURE! testAddDelete(org.cipres.treebase.service.matrix.MatrixServiceImplTest) Time elapsed: 1.016 sec <<< ERROR! org.springframework.dao.DataIntegrityViolationException: Could not execute JDBC batch update; nested exception is org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update Caused by: org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:71) at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43) at org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:253) at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:92) at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:87) at org.hibernate.jdbc.AbstractBatcher.prepareBatchStatement(AbstractBatcher.java:222) at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2229) at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2665) at org.hibernate.action.EntityInsertAction.execute(EntityInsertAction.java:60) at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:263) at org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:167) at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:298) at org.hibernate.event.def.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:27) at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1000) at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338) at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:106) at org.springframework.orm.hibernate3.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:578) at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:662) at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:632) at org.springframework.test.AbstractTransactionalSpringContextTests.endTransaction(AbstractTransactionalSpringContextTests.java:293) at org.cipres.treebase.service.matrix.MatrixServiceImplTest.testAddDelete(MatrixServiceImplTest.java:232) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:69) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at junit.framework.TestSuite.runTest(TestSuite.java:208) at junit.framework.TestSuite.run(TestSuite.java:203) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:213) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127) at org.apache.maven.surefire.Surefire.run(Surefire.java:177) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:338) at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:997) Caused by: java.sql.BatchUpdateException: Batch entry 0 insert into TAXONLABEL (VERSION, LINKED, STUDY_ID, TaxonLabel, TAXONVARIANT_ID, TAXONLABEL_ID) values (0, 0, NULL, testAddDelete test 0.3318026555702662, NULL, 14220) was aborted. Call getNextException to see the cause. |
From: Vladimir G. <vla...@du...> - 2009-12-23 15:29:18
|
In the schema, both taxonlabel and phylotreenode use their own sequences (taxonlabel_id_sequence and phylotreenode_id_sequence) whose current values are in sync with the tables. What is the purpose of the hibernate_sequence sequence? --VG On Dec 23, 2009, at 7:42 AM, youjun guo wrote: > Hilmar and Bill, > > In our database, the current hibernate_sequence value (1416) is much > smaller than max id value of table taxonlabel and phylotreenode, > that make primer key conflict when hibernate try to insert new data > into this two table. > > It need to be change to a bigger number so that the current value > big than max phylotreenode_id. > > I tried but the server said only the owner can alter it. > > Enjoy your holiday to all! > > Youjun > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast > and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > Treebase-devel mailing list > Tre...@li... > https://lists.sourceforge.net/lists/listinfo/treebase-devel |
From: youjun g. <you...@ya...> - 2009-12-23 16:38:08
|
Hilmar & Vladimir, When hibernate insert a record into the database, it need to create a unique id (primer_key) for it. In treebase hibernate use sequence. yes It is a database object in treebase-dev. hibernate will ask for a key from this sequence object. By default hibernate will looking for a sequence object named "hibernate_sequence" unless some other sequence are explicitly appointed in hibernate configuration (NOT DATABASE SETUP). In the treebase code, I didn't find any other sequence defined in the hibernate configuration. I assume it will use default that is "hibernate_sequence". Most importantly the testing code do complain primer key conflict in these two tables, And the key hibernate got from the sequence do exist in the tables already. Only the owner of the treebase-dev can make change of the sequence. Youjun On Wed, Dec 23, 2009 at 10:29 AM, Vladimir Gapeyev < vla...@du...> wrote: > In the schema, both taxonlabel and phylotreenode use their own > sequences (taxonlabel_id_sequence and phylotreenode_id_sequence) whose > current values are in sync with the tables. What is the purpose of > the hibernate_sequence sequence? --VG > > > On Dec 23, 2009, at 7:42 AM, youjun guo wrote: > > > Hilmar and Bill, > > > > In our database, the current hibernate_sequence value (1416) is much > > smaller than max id value of table taxonlabel and phylotreenode, > > that make primer key conflict when hibernate try to insert new data > > into this two table. > > > > It need to be change to a bigger number so that the current value > > big than max phylotreenode_id. > > > > I tried but the server said only the owner can alter it. > > > > Enjoy your holiday to all! > > > > Youjun > > > ------------------------------------------------------------------------------ > > This SF.Net email is sponsored by the Verizon Developer Community > > Take advantage of Verizon's best-in-class app development support > > A streamlined, 14 day to market process makes app distribution fast > > and easy > > Join now and get one step closer to millions of Verizon customers > > http://p.sf.net/sfu/verizon-dev2dev > > _______________________________________________ > > Treebase-devel mailing list > > Tre...@li... > > https://lists.sourceforge.net/lists/listinfo/treebase-devel > > > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and > easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > Treebase-devel mailing list > Tre...@li... > https://lists.sourceforge.net/lists/listinfo/treebase-devel > |
From: Hilmar L. <hl...@ne...> - 2009-12-23 17:21:02
|
Youjun - this smells like a hibernate misconfiguration. You can tell hibernate that the database will assign the primary key, rather than hibernate assigning it itself. More importantly, it needs to be consistent with the database. If the database has sequence definitions and auto-increment (SERIAL or DEFAULT('nextval XXXX' in PostgreSQL) for the primary key, then hibernate has got to be using them as well (i.e., database and not hibernate assigns primary keys). If hibernate assigns primary keys, then the database tables must not have auto-increment rules on its primary key columns. Right now it looks like the database has auto-increment rules *and* hibernate tries to do its own thing? -hilmar On Dec 23, 2009, at 11:37 AM, youjun guo wrote: > Hilmar & Vladimir, > > When hibernate insert a record into the database, it need to create > a unique id (primer_key) for it. > > In treebase hibernate use sequence. yes It is a database object in > treebase-dev. hibernate will ask for a key from this sequence object. > > By default hibernate will looking for a sequence object named > "hibernate_sequence" unless some other sequence are explicitly > appointed in hibernate configuration (NOT DATABASE SETUP). > > In the treebase code, I didn't find any other sequence defined in > the hibernate configuration. I assume it will use default that is > "hibernate_sequence". > > Most importantly the testing code do complain primer key conflict in > these two tables, And the key hibernate got from the sequence do > exist in the tables already. > > Only the owner of the treebase-dev can make change of the sequence. > > Youjun > > > > On Wed, Dec 23, 2009 at 10:29 AM, Vladimir Gapeyev <vla...@du... > > wrote: > In the schema, both taxonlabel and phylotreenode use their own > sequences (taxonlabel_id_sequence and phylotreenode_id_sequence) whose > current values are in sync with the tables. What is the purpose of > the hibernate_sequence sequence? --VG > > > On Dec 23, 2009, at 7:42 AM, youjun guo wrote: > > > Hilmar and Bill, > > > > In our database, the current hibernate_sequence value (1416) is much > > smaller than max id value of table taxonlabel and phylotreenode, > > that make primer key conflict when hibernate try to insert new data > > into this two table. > > > > It need to be change to a bigger number so that the current value > > big than max phylotreenode_id. > > > > I tried but the server said only the owner can alter it. > > > > Enjoy your holiday to all! > > > > Youjun > > > ------------------------------------------------------------------------------ > > This SF.Net email is sponsored by the Verizon Developer Community > > Take advantage of Verizon's best-in-class app development support > > A streamlined, 14 day to market process makes app distribution fast > > and easy > > Join now and get one step closer to millions of Verizon customers > > http://p.sf.net/sfu/verizon-dev2dev > > _______________________________________________ > > Treebase-devel mailing list > > Tre...@li... > > https://lists.sourceforge.net/lists/listinfo/treebase-devel > > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast > and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > Treebase-devel mailing list > Tre...@li... > https://lists.sourceforge.net/lists/listinfo/treebase-devel > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast > and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > Treebase-devel mailing list > Tre...@li... > https://lists.sourceforge.net/lists/listinfo/treebase-devel -- =========================================================== : Hilmar Lapp -:- Durham, NC -:- informatics.nescent.org : =========================================================== |
From: youjun g. <you...@ya...> - 2009-12-23 18:03:39
|
Hilmar, Sounds like you prefer the treebase hibernate id generator to be setup as "NATIVE", which tells hibernate to use the database native id generate rules. Both "SEQUENCE " and "NATIVE" are widely used in hibernate applications, and I am fine with any one of these. I don't know if there is any historical reasons for current setup, because sometime developers want to explicitly operate on the id field in their code. "NATIVE" setup will prevent this. Youjun On Wed, Dec 23, 2009 at 12:20 PM, Hilmar Lapp <hl...@ne...> wrote: > Youjun - this smells like a hibernate misconfiguration. You can tell > hibernate that the database will assign the primary key, rather than > hibernate assigning it itself. > > More importantly, it needs to be consistent with the database. If the > database has sequence definitions and auto-increment (SERIAL or > DEFAULT('nextval XXXX' in PostgreSQL) for the primary key, then hibernate > has got to be using them as well (i.e., database and not hibernate assigns > primary keys). If hibernate assigns primary keys, then the database tables > must not have auto-increment rules on its primary key columns. > > Right now it looks like the database has auto-increment rules *and* > hibernate tries to do its own thing? > > -hilmar > > On Dec 23, 2009, at 11:37 AM, youjun guo wrote: > > Hilmar & Vladimir, > > When hibernate insert a record into the database, it need to create a > unique id (primer_key) for it. > > In treebase hibernate use sequence. yes It is a database object in > treebase-dev. hibernate will ask for a key from this sequence object. > > By default hibernate will looking for a sequence object named > "hibernate_sequence" unless some other sequence are explicitly appointed in > hibernate configuration (NOT DATABASE SETUP). > > In the treebase code, I didn't find any other sequence defined in the > hibernate configuration. I assume it will use default that is > "hibernate_sequence". > > Most importantly the testing code do complain primer key conflict in these > two tables, And the key hibernate got from the sequence do exist in the > tables already. > > Only the owner of the treebase-dev can make change of the sequence. > > Youjun > > > > On Wed, Dec 23, 2009 at 10:29 AM, Vladimir Gapeyev < > vla...@du...> wrote: > >> In the schema, both taxonlabel and phylotreenode use their own >> sequences (taxonlabel_id_sequence and phylotreenode_id_sequence) whose >> current values are in sync with the tables. What is the purpose of >> the hibernate_sequence sequence? --VG >> >> >> On Dec 23, 2009, at 7:42 AM, youjun guo wrote: >> >> > Hilmar and Bill, >> > >> > In our database, the current hibernate_sequence value (1416) is much >> > smaller than max id value of table taxonlabel and phylotreenode, >> > that make primer key conflict when hibernate try to insert new data >> > into this two table. >> > >> > It need to be change to a bigger number so that the current value >> > big than max phylotreenode_id. >> > >> > I tried but the server said only the owner can alter it. >> > >> > Enjoy your holiday to all! >> > >> > Youjun >> > >> ------------------------------------------------------------------------------ >> > This SF.Net email is sponsored by the Verizon Developer Community >> > Take advantage of Verizon's best-in-class app development support >> > A streamlined, 14 day to market process makes app distribution fast >> > and easy >> > Join now and get one step closer to millions of Verizon customers >> > http://p.sf.net/sfu/verizon-dev2dev >> > _______________________________________________ >> > Treebase-devel mailing list >> > Tre...@li... >> > https://lists.sourceforge.net/lists/listinfo/treebase-devel >> >> >> >> ------------------------------------------------------------------------------ >> This SF.Net email is sponsored by the Verizon Developer Community >> Take advantage of Verizon's best-in-class app development support >> A streamlined, 14 day to market process makes app distribution fast and >> easy >> Join now and get one step closer to millions of Verizon customers >> http://p.sf.net/sfu/verizon-dev2dev >> _______________________________________________ >> Treebase-devel mailing list >> Tre...@li... >> https://lists.sourceforge.net/lists/listinfo/treebase-devel >> > > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and > easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev_______________________________________________ > Treebase-devel mailing list > Tre...@li... > https://lists.sourceforge.net/lists/listinfo/treebase-devel > > > -- > =========================================================== > : Hilmar Lapp -:- Durham, NC -:- informatics.nescent.org : > =========================================================== > > > > |
From: Vladimir G. <vla...@du...> - 2009-12-23 17:25:37
|
I think we need someone who is more aware about what is going on in TB2 (Rutger? Bill?) to resolve this. Since the postgres sequence taxonlabel_id_sequence is declared in the schema as the sequence for the taxonlabel table and since they are perfectly in sync with each other, I presume that doing anything to hibernate_sequence would be a mistake. --Vladimir On Dec 23, 2009, at 11:37 AM, youjun guo wrote: > Hilmar & Vladimir, > > When hibernate insert a record into the database, it need to create > a unique id (primer_key) for it. > > In treebase hibernate use sequence. yes It is a database object in > treebase-dev. hibernate will ask for a key from this sequence object. > > By default hibernate will looking for a sequence object named > "hibernate_sequence" unless some other sequence are explicitly > appointed in hibernate configuration (NOT DATABASE SETUP). > > In the treebase code, I didn't find any other sequence defined in > the hibernate configuration. I assume it will use default that is > "hibernate_sequence". > > Most importantly the testing code do complain primer key conflict in > these two tables, And the key hibernate got from the sequence do > exist in the tables already. > > Only the owner of the treebase-dev can make change of the sequence. > > Youjun > > > > On Wed, Dec 23, 2009 at 10:29 AM, Vladimir Gapeyev <vla...@du... > > wrote: > In the schema, both taxonlabel and phylotreenode use their own > sequences (taxonlabel_id_sequence and phylotreenode_id_sequence) whose > current values are in sync with the tables. What is the purpose of > the hibernate_sequence sequence? --VG > > > On Dec 23, 2009, at 7:42 AM, youjun guo wrote: > > > Hilmar and Bill, > > > > In our database, the current hibernate_sequence value (1416) is much > > smaller than max id value of table taxonlabel and phylotreenode, > > that make primer key conflict when hibernate try to insert new data > > into this two table. > > > > It need to be change to a bigger number so that the current value > > big than max phylotreenode_id. > > > > I tried but the server said only the owner can alter it. > > > > Enjoy your holiday to all! > > > > Youjun > > > ------------------------------------------------------------------------------ > > This SF.Net email is sponsored by the Verizon Developer Community > > Take advantage of Verizon's best-in-class app development support > > A streamlined, 14 day to market process makes app distribution fast > > and easy > > Join now and get one step closer to millions of Verizon customers > > http://p.sf.net/sfu/verizon-dev2dev > > _______________________________________________ > > Treebase-devel mailing list > > Tre...@li... > > https://lists.sourceforge.net/lists/listinfo/treebase-devel > > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast > and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > Treebase-devel mailing list > Tre...@li... > https://lists.sourceforge.net/lists/listinfo/treebase-devel > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast > and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > Treebase-devel mailing list > Tre...@li... > https://lists.sourceforge.net/lists/listinfo/treebase-devel |
From: youjun g. <you...@ya...> - 2009-12-23 18:19:17
|
Vladimir, Based on the error massage I send to you, I am quite sure, right now, treebase code simply ignored those xxxx_id_sequence you mentioned in the treebase_dev. Those sequences only work for insert via database like commandline but not working for treebase code. The hibernate only look at it own configuration unless you tell it to do something else in its configration. Youjun On Wed, Dec 23, 2009 at 12:25 PM, Vladimir Gapeyev < vla...@du...> wrote: > I think we need someone who is more aware about what is going on in TB2 > (Rutger? Bill?) to resolve this. > > Since the postgres sequence taxonlabel_id_sequence is declared in the > schema as the sequence for the taxonlabel table and since they are perfectly > in sync with each other, I presume that doing anything to hibernate_sequence > would be a mistake. > > --Vladimir > > > On Dec 23, 2009, at 11:37 AM, youjun guo wrote: > > Hilmar & Vladimir, > > When hibernate insert a record into the database, it need to create a > unique id (primer_key) for it. > > In treebase hibernate use sequence. yes It is a database object in > treebase-dev. hibernate will ask for a key from this sequence object. > > By default hibernate will looking for a sequence object named > "hibernate_sequence" unless some other sequence are explicitly appointed in > hibernate configuration (NOT DATABASE SETUP). > > In the treebase code, I didn't find any other sequence defined in the > hibernate configuration. I assume it will use default that is > "hibernate_sequence". > > Most importantly the testing code do complain primer key conflict in these > two tables, And the key hibernate got from the sequence do exist in the > tables already. > > Only the owner of the treebase-dev can make change of the sequence. > > Youjun > > > > On Wed, Dec 23, 2009 at 10:29 AM, Vladimir Gapeyev < > vla...@du...> wrote: > >> In the schema, both taxonlabel and phylotreenode use their own >> sequences (taxonlabel_id_sequence and phylotreenode_id_sequence) whose >> current values are in sync with the tables. What is the purpose of >> the hibernate_sequence sequence? --VG >> >> >> On Dec 23, 2009, at 7:42 AM, youjun guo wrote: >> >> > Hilmar and Bill, >> > >> > In our database, the current hibernate_sequence value (1416) is much >> > smaller than max id value of table taxonlabel and phylotreenode, >> > that make primer key conflict when hibernate try to insert new data >> > into this two table. >> > >> > It need to be change to a bigger number so that the current value >> > big than max phylotreenode_id. >> > >> > I tried but the server said only the owner can alter it. >> > >> > Enjoy your holiday to all! >> > >> > Youjun >> > >> ------------------------------------------------------------------------------ >> > This SF.Net email is sponsored by the Verizon Developer Community >> > Take advantage of Verizon's best-in-class app development support >> > A streamlined, 14 day to market process makes app distribution fast >> > and easy >> > Join now and get one step closer to millions of Verizon customers >> > http://p.sf.net/sfu/verizon-dev2dev >> > _______________________________________________ >> > Treebase-devel mailing list >> > Tre...@li... >> > https://lists.sourceforge.net/lists/listinfo/treebase-devel >> >> >> >> ------------------------------------------------------------------------------ >> This SF.Net email is sponsored by the Verizon Developer Community >> Take advantage of Verizon's best-in-class app development support >> A streamlined, 14 day to market process makes app distribution fast and >> easy >> Join now and get one step closer to millions of Verizon customers >> http://p.sf.net/sfu/verizon-dev2dev >> _______________________________________________ >> Treebase-devel mailing list >> Tre...@li... >> https://lists.sourceforge.net/lists/listinfo/treebase-devel >> > > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and > easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev_______________________________________________ > Treebase-devel mailing list > Tre...@li... > https://lists.sourceforge.net/lists/listinfo/treebase-devel > > > > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and > easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > Treebase-devel mailing list > Tre...@li... > https://lists.sourceforge.net/lists/listinfo/treebase-devel > > |
From: Hilmar L. <hl...@ne...> - 2009-12-24 02:14:08
|
Is there a possibility that the data migration (import) uses the database sequence but the application does not?Or would the import use the hibernate settings too? -hilmar Sent from away On Dec 23, 2009, at 1:19 PM, youjun guo <you...@ya...> wrote: > Vladimir, > > Based on the error massage I send to you, I am quite sure, right > now, treebase code simply ignored those xxxx_id_sequence you > mentioned in the treebase_dev. Those sequences only work for insert > via database like commandline but not working for treebase code. > > The hibernate only look at it own configuration unless you tell it > to do something else in its configration. > > Youjun > > On Wed, Dec 23, 2009 at 12:25 PM, Vladimir Gapeyev <vla...@du... > > wrote: > I think we need someone who is more aware about what is going on in > TB2 (Rutger? Bill?) to resolve this. > > Since the postgres sequence taxonlabel_id_sequence is declared in > the schema as the sequence for the taxonlabel table and since they > are perfectly in sync with each other, I presume that doing anything > to hibernate_sequence would be a mistake. > > --Vladimir > > > On Dec 23, 2009, at 11:37 AM, youjun guo wrote: > >> Hilmar & Vladimir, >> >> When hibernate insert a record into the database, it need to create >> a unique id (primer_key) for it. >> >> In treebase hibernate use sequence. yes It is a database object in >> treebase-dev. hibernate will ask for a key from this sequence object. >> >> By default hibernate will looking for a sequence object named >> "hibernate_sequence" unless some other sequence are explicitly >> appointed in hibernate configuration (NOT DATABASE SETUP). >> >> In the treebase code, I didn't find any other sequence defined in >> the hibernate configuration. I assume it will use default that is >> "hibernate_sequence". >> >> Most importantly the testing code do complain primer key conflict >> in these two tables, And the key hibernate got from the sequence do >> exist in the tables already. >> >> Only the owner of the treebase-dev can make change of the sequence. >> >> Youjun >> >> >> >> On Wed, Dec 23, 2009 at 10:29 AM, Vladimir Gapeyev <vla...@du... >> > wrote: >> In the schema, both taxonlabel and phylotreenode use their own >> sequences (taxonlabel_id_sequence and phylotreenode_id_sequence) >> whose >> current values are in sync with the tables. What is the purpose of >> the hibernate_sequence sequence? --VG >> >> >> On Dec 23, 2009, at 7:42 AM, youjun guo wrote: >> >> > Hilmar and Bill, >> > >> > In our database, the current hibernate_sequence value (1416) is >> much >> > smaller than max id value of table taxonlabel and phylotreenode, >> > that make primer key conflict when hibernate try to insert new data >> > into this two table. >> > >> > It need to be change to a bigger number so that the current value >> > big than max phylotreenode_id. >> > >> > I tried but the server said only the owner can alter it. >> > >> > Enjoy your holiday to all! >> > >> > Youjun >> > >> --- >> --- >> --- >> --------------------------------------------------------------------- >> > This SF.Net email is sponsored by the Verizon Developer Community >> > Take advantage of Verizon's best-in-class app development support >> > A streamlined, 14 day to market process makes app distribution fast >> > and easy >> > Join now and get one step closer to millions of Verizon customers >> > http://p.sf.net/sfu/verizon-dev2dev >> > _______________________________________________ >> > Treebase-devel mailing list >> > Tre...@li... >> > https://lists.sourceforge.net/lists/listinfo/treebase-devel >> >> >> --- >> --- >> --- >> --------------------------------------------------------------------- >> This SF.Net email is sponsored by the Verizon Developer Community >> Take advantage of Verizon's best-in-class app development support >> A streamlined, 14 day to market process makes app distribution fast >> and easy >> Join now and get one step closer to millions of Verizon customers >> http://p.sf.net/sfu/verizon-dev2dev >> _______________________________________________ >> Treebase-devel mailing list >> Tre...@li... >> https://lists.sourceforge.net/lists/listinfo/treebase-devel >> >> --- >> --- >> --- >> --------------------------------------------------------------------- >> This SF.Net email is sponsored by the Verizon Developer Community >> Take advantage of Verizon's best-in-class app development support >> A streamlined, 14 day to market process makes app distribution fast >> and easy >> Join now and get one step closer to millions of Verizon customers >> http://p.sf.net/sfu/verizon-dev2dev >> _______________________________________________ >> Treebase-devel mailing list >> Tre...@li... >> https://lists.sourceforge.net/lists/listinfo/treebase-devel > > > --- > --- > --- > --------------------------------------------------------------------- > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast > and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > Treebase-devel mailing list > Tre...@li... > https://lists.sourceforge.net/lists/listinfo/treebase-devel > > > --- > --- > --- > --------------------------------------------------------------------- > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast > and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > Treebase-devel mailing list > Tre...@li... > https://lists.sourceforge.net/lists/listinfo/treebase-devel |
From: Vladimir G. <vla...@du...> - 2009-12-23 18:55:25
|
Ok, you could be right about the current state of things. (For my education: where is that setting that instructs Hibernate on "NATIVE" vs "SEQUENCE"?) Then, how do we know which tables (besides the 2 you mentioned) we should take into account for computing the MAX value, to be set as the new seed for hibernate_sequence? Another concern: resetting hibernate_sequence now is likely to affect the subsequent TB1->TB2 import that we plan to do for the release. Someone must have given thought to all these issues already. All the reasons to relax and enjoy the holidays! --VG On Dec 23, 2009, at 1:19 PM, youjun guo wrote: > Vladimir, > > Based on the error massage I send to you, I am quite sure, right > now, treebase code simply ignored those xxxx_id_sequence you > mentioned in the treebase_dev. Those sequences only work for insert > via database like commandline but not working for treebase code. > > The hibernate only look at it own configuration unless you tell it > to do something else in its configration. > > Youjun > > On Wed, Dec 23, 2009 at 12:25 PM, Vladimir Gapeyev <vla...@du... > > wrote: > I think we need someone who is more aware about what is going on in > TB2 (Rutger? Bill?) to resolve this. > > Since the postgres sequence taxonlabel_id_sequence is declared in > the schema as the sequence for the taxonlabel table and since they > are perfectly in sync with each other, I presume that doing anything > to hibernate_sequence would be a mistake. > > --Vladimir > > > On Dec 23, 2009, at 11:37 AM, youjun guo wrote: > >> Hilmar & Vladimir, >> >> When hibernate insert a record into the database, it need to create >> a unique id (primer_key) for it. >> >> In treebase hibernate use sequence. yes It is a database object in >> treebase-dev. hibernate will ask for a key from this sequence object. >> >> By default hibernate will looking for a sequence object named >> "hibernate_sequence" unless some other sequence are explicitly >> appointed in hibernate configuration (NOT DATABASE SETUP). >> >> In the treebase code, I didn't find any other sequence defined in >> the hibernate configuration. I assume it will use default that is >> "hibernate_sequence". >> >> Most importantly the testing code do complain primer key conflict >> in these two tables, And the key hibernate got from the sequence do >> exist in the tables already. >> >> Only the owner of the treebase-dev can make change of the sequence. >> >> Youjun >> >> >> >> On Wed, Dec 23, 2009 at 10:29 AM, Vladimir Gapeyev <vla...@du... >> > wrote: >> In the schema, both taxonlabel and phylotreenode use their own >> sequences (taxonlabel_id_sequence and phylotreenode_id_sequence) >> whose >> current values are in sync with the tables. What is the purpose of >> the hibernate_sequence sequence? --VG >> >> >> On Dec 23, 2009, at 7:42 AM, youjun guo wrote: >> >> > Hilmar and Bill, >> > >> > In our database, the current hibernate_sequence value (1416) is >> much >> > smaller than max id value of table taxonlabel and phylotreenode, >> > that make primer key conflict when hibernate try to insert new data >> > into this two table. >> > >> > It need to be change to a bigger number so that the current value >> > big than max phylotreenode_id. >> > >> > I tried but the server said only the owner can alter it. >> > >> > Enjoy your holiday to all! >> > >> > Youjun >> > >> ------------------------------------------------------------------------------ >> > This SF.Net email is sponsored by the Verizon Developer Community >> > Take advantage of Verizon's best-in-class app development support >> > A streamlined, 14 day to market process makes app distribution fast >> > and easy >> > Join now and get one step closer to millions of Verizon customers >> > http://p.sf.net/sfu/verizon-dev2dev >> > _______________________________________________ >> > Treebase-devel mailing list >> > Tre...@li... >> > https://lists.sourceforge.net/lists/listinfo/treebase-devel >> >> >> ------------------------------------------------------------------------------ >> This SF.Net email is sponsored by the Verizon Developer Community >> Take advantage of Verizon's best-in-class app development support >> A streamlined, 14 day to market process makes app distribution fast >> and easy >> Join now and get one step closer to millions of Verizon customers >> http://p.sf.net/sfu/verizon-dev2dev >> _______________________________________________ >> Treebase-devel mailing list >> Tre...@li... >> https://lists.sourceforge.net/lists/listinfo/treebase-devel >> >> ------------------------------------------------------------------------------ >> This SF.Net email is sponsored by the Verizon Developer Community >> Take advantage of Verizon's best-in-class app development support >> A streamlined, 14 day to market process makes app distribution fast >> and easy >> Join now and get one step closer to millions of Verizon customers >> http://p.sf.net/sfu/verizon-dev2dev >> _______________________________________________ >> Treebase-devel mailing list >> Tre...@li... >> https://lists.sourceforge.net/lists/listinfo/treebase-devel > > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast > and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > Treebase-devel mailing list > Tre...@li... > https://lists.sourceforge.net/lists/listinfo/treebase-devel > > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast > and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > Treebase-devel mailing list > Tre...@li... > https://lists.sourceforge.net/lists/listinfo/treebase-devel |
From: youjun g. <you...@ya...> - 2009-12-23 20:07:02
|
Vladimir, Simply put, each class under org.cipres.treebase.domian is mapped to a table in treebase-dev, the id generate for example in taxonlabel class is like this: @AttributeOverride(name = "id", column = @Column(name = "TAXONLABEL_ID")) and in its supper class which is AbstractPersistedObject: @Id @GeneratedValue(strategy = GenerationType.SEQUENCE) This tells hibernate to use default sequence (hibernate_sequence) to generate the id (because it did not specify any sequence name). because right now the current value of the sequence is 14XXX so next query it will return 14XXX + 1, they are all taken in these two tables. Any insert to these two tables from treebase gui will fail. Now all the possible solution are: 1. Switch to native setup, it may break the code some how, and I saw some developers reported online that hibernate native setup may not function well on posgresql. 2. Restart hibernate_sequence with a larger number, make it larger enough will prevent those problems you worry about. It will cause some incoherent. 3. Explicitly assign a sequence to each domain class (a lot of work, there are about 70 of such sequence), and treebase inherit domain structure make it a little bit more complex. Youjun |
From: Hilmar L. <hl...@ne...> - 2009-12-24 02:41:39
|
Just to repeat, I'll leave choosing the better alternative to you guys, but if you choose to let hibernate assign the primary key, then all auto-increment definitions in the database need to be disabled. That's a schema change. -hilmar Sent from away On Dec 23, 2009, at 3:06 PM, youjun guo <you...@ya...> wrote: > Vladimir, > > Simply put, each class under org.cipres.treebase.domian is mapped to > a table in treebase-dev, the id generate for example in taxonlabel > class is like this: > > @AttributeOverride(name = "id", column = @Column(name = > "TAXONLABEL_ID")) > > and in its supper class which is AbstractPersistedObject: > > @Id > @GeneratedValue(strategy = GenerationType.SEQUENCE) > > This tells hibernate to use default sequence (hibernate_sequence) to > generate the id (because it did not specify any sequence name). > because right now the current value of the sequence is 14XXX so next > query it will return 14XXX + 1, they are all taken in these two > tables. Any insert to these two tables from treebase gui will fail. > > Now all the possible solution are: > > 1. Switch to native setup, it may break the code some how, and I saw > some developers reported online that hibernate native setup may not > function well on posgresql. > > 2. Restart hibernate_sequence with a larger number, make it larger > enough will prevent those problems you worry about. It will cause > some incoherent. > > 3. Explicitly assign a sequence to each domain class (a lot of work, > there are about 70 of such sequence), and treebase inherit domain > structure make it a little bit more complex. > > Youjun > > > > > > > > > --- > --- > --- > --------------------------------------------------------------------- > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast > and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > Treebase-devel mailing list > Tre...@li... > https://lists.sourceforge.net/lists/listinfo/treebase-devel |
From: William P. <wil...@ya...> - 2009-12-25 13:49:25
|
On Dec 23, 2009, at 12:25 PM, Vladimir Gapeyev wrote: > I think we need someone who is more aware about what is going on in TB2 (Rutger? Bill?) to resolve this. Rutger would know. One of the early bugs after the DB2->Pg migration was that new records generated an uncaught exception because sequences had not been setup -- so Rutger went through an added sequence definitions for various tables. It's not impossible that sequences were added some for tables where Hibernate was already taking care of this, causing a clash. Personally, I would favor having Pg take care of all the sequences, since I guess this would make it easier for alternative connections to the database to add records, bypassing the Java. (not that this is recommended, condoned, or in any way planned for the future -- But it gives us that flexibility, no?) But obviously I leave this up to the experts (y'all). bp |
From: youjun g. <you...@ya...> - 2009-12-25 16:11:59
|
Dear All, One thing need to be explained is that hibernate never bypass postgresql to generator any primer key ever. All the sequences include hibernate_sequence are existing object in treebse-dev. "hibernate_sequence" is just a name of the sequence it can be named anything else. The only difference is: method 1. use one single sequence for all the domain table; method 2. assigned each domain table a induvadule sequnce. Right now, the treebase-dev use method 2, but treebase code use method 1. That's the porblem. For changing the treebase code to method 2, we need more hands since there are 70 classes need to be modify( I can send out a instruction for what need to be done). I have tried a native id generator setup and hoped it can save the labor, but It is not like mysql, even with a native setup postgresql still need hiberbate to specify sequence name unless the defualt name (hibernate_sequence) is used. Also, for method 2, from now on, all these 70 sequence need to maintain the synchronizing with data insert and data migration of their table. I found some of them already lose the synchronise . Ok, First thing last, right now the treebase-dev refuse connection. Youjun On Fri, Dec 25, 2009 at 8:42 AM, William Piel <wil...@ya...> wrote: > > On Dec 23, 2009, at 12:25 PM, Vladimir Gapeyev wrote: > > > I think we need someone who is more aware about what is going on in TB2 > (Rutger? Bill?) to resolve this. > > Rutger would know. > > One of the early bugs after the DB2->Pg migration was that new records > generated an uncaught exception because sequences had not been setup -- so > Rutger went through an added sequence definitions for various tables. It's > not impossible that sequences were added some for tables where Hibernate was > already taking care of this, causing a clash. > > Personally, I would favor having Pg take care of all the sequences, since I > guess this would make it easier for alternative connections to the database > to add records, bypassing the Java. (not that this is recommended, condoned, > or in any way planned for the future -- But it gives us that flexibility, > no?) But obviously I leave this up to the experts (y'all). > > bp > > > > > > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and > easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > Treebase-devel mailing list > Tre...@li... > https://lists.sourceforge.net/lists/listinfo/treebase-devel > |
From: Vladimir G. <vla...@du...> - 2009-12-26 15:03:58
|
On Dec 25, 2009, at 11:11 AM, youjun guo wrote: > method 1. use one single sequence for all the domain table; > method 2. assigned each domain table a induvadule sequnce. I would be in favor of using per-table postgresql sequences to generate IDs. I just think that, whatever solution we are inclined for, we should first make a good effort to understand what is going on. E.g., - As Bill alludes, different tables/objects might have been set up to use different methods of sequence generation. Then, our fix might have to be different for each method. - Is it possible that the single hibernate_sequence for all stored objects was used to ensure that there is a unique identifier for each stored object? Is there code that may depend on this? (e.g., some kind of audit?) > Also, for method 2, from now on, all these 70 sequence need to > maintain the synchronizing with data insert and data migration of > their table. I found some of them already lose the synchronise . I would guess the loss of id synch has happened for those tables xxx whose xxx_id_sequence value after TB1 import was below the hibernate_sequence value. The remaining tables (as you encountered for taxonlabel and phylotreenode) just refused to insert new rows (since ids generated for them by hibernate_sequence were clashing with existing rows). --Vladimir |
From: Vladimir G. <vla...@du...> - 2009-12-26 15:12:17
|
On Dec 25, 2009, at 8:42 AM, William Piel wrote: > One of the early bugs after the DB2->Pg migration was that new > records generated an uncaught exception because sequences had not > been setup -- so Rutger went through an added sequence definitions > for various tables. It's not impossible that sequences were added > some for tables where Hibernate was already taking care of this, > causing a clash. Bill, have new studies been entered into the DB after Rutger created the sequences? My reason for asking: The tables for which Youjun encountered the problem in unit tests (taxonlabel and phylotreenode) are among the ones, I'd guess, that get multiple new rows with a new study. I'd then expect that submitting a new study would have produced the same error Youjun has encountered. If it had not, it could indicate that the tests use a data access method not used by the main code. --Vladimir |
From: William P. <wil...@ya...> - 2010-01-04 21:10:08
|
This is mainly for Vladimir's benefit: I have created the dump file for the migration here: http://www.treebase.org/treebase/migration/Dec-09/dump_Dec09_utf8.zip This only contains metadata about studies added since Jan 09. As this file is being parsed by Mark Jason's migration scripts, whenever a matrix or analysis result is referenced, the scripts will go fetch either a matrix or a tree file and pass it through headless Mesquite. The matrix and tree files are all in these directories: http://www.treebase.org/treebase/migration/Dec-09/trees.zip http://www.treebase.org/treebase/migration/Dec-09/characters.zip So for the scripts to work, they must access both the dump_Dec09_utf8.txt file and the trees/ and characters/ directories. The trees/ and characters/ directories actually contain *all* trees and *all* matrices in TreeBASE1, even if the dump_Dec09_utf8.txt file will only reference those that are new to TreeBASE2. Once these data have been imported, the taxon_variant and taxa tables can be imported and the taxon_labels (that were generated as a result of the headless Mesquite parsing the various files) can each be linked to their respective taxon_variant record (though not all are linkable -- some 25% are orphaned). The general model is this: [taxonlabel] >-- [taxonvariant] >-- [taxon] i.e., many taxon label records map to a taxon variant record, and many taxon variant records map to a taxon record. The contents of the taxonlabel table are generated by extracting labels from parsed tree files and parsed matrix files. You can get the taxon intel files here: http://www.treebase.org/treebase/migration/Dec-09/TI_for_Dec09_utf8.zip The tables that these data will go in are scoped to the entire database, so this action should not be viewed as incremental, but rather as a complete refresh. To begin with, I think the taxonvariant_id column in the taxonlabel table should be set to NULL for all records because these values will be completely refreshed. The taxonvariant table and taxon table should be erased and replaced with my new data from TI_for_Dec09_utf8.zip. And then Mark Jason's scripts should go through each value in the taxonlabel column of the taxonlabel table, look it up in my taxon_labels.tab file (which is compressed inside TI_for_Dec09_utf8.zip), and use the taxon_variant_id to map the taxonlabel table to the taxonvariant table. I don't know how Mark Jason has implemented this exactly, but it seems to me that the only way for this to work is if TreeBASE2 uses my taxon_variant_id and taxon_id values instead of autoincrementing its own, seeing as my taxon_labels.tab file is key for mapping the taxonlabel table with the taxonvariant table. This is something to lookout for, else if IDs are created de novo, it will be hard to run through the taxonlabel table and know what value to put in the taxonvariant_id FK. -- Note that we will probably also do a final Jan10 migration, to deal with data that has been added since early December. But this should not take long. -- Finally, of course, keep in mind that the "dev" data is actually "production" data, so be sure to do a pg_dump before running any data migration scripts. regards, Bill |
From: William P. <wil...@ya...> - 2009-12-29 21:57:36
|
On Dec 26, 2009, at 10:12 AM, Vladimir Gapeyev wrote: > Bill, have new studies been entered into the DB after Rutger created the sequences? probably yes -- just a few new studies for testing the submission system. But until Rutger had solved the Mesquite problem, no new phylotree records would have been created successfully. bp ps. I wonder if all this is related to a bug that Rutger had reported at our last phone conference -- that he got the Mesquite parser working except for the result that it was creating twice as many records as it should? (could that happen if two sequence systems are in operation on the same table & row?) |
From: youjun g. <you...@ya...> - 2009-12-30 15:40:09
|
> > I wonder if all this is related to a bug that Rutger had reported at our > last phone conference. > The code I encounter the problem is unit test of taxonlabel and phylotree dao class. Both focus on testing of single table add and delete operation without entangling with other factors. Again, right now database treebase-dev is not working, it refuse connection. Youjun On Tue, Dec 29, 2009 at 4:57 PM, William Piel <wil...@ya...> wrote: > > On Dec 26, 2009, at 10:12 AM, Vladimir Gapeyev wrote: > > > Bill, have new studies been entered into the DB after Rutger created the > sequences? > > probably yes -- just a few new studies for testing the submission system. > But until Rutger had solved the Mesquite problem, no new phylotree records > would have been created successfully. > > bp > > ps. I wonder if all this is related to a bug that Rutger had reported at > our last phone conference -- that he got the Mesquite parser working except > for the result that it was creating twice as many records as it should? > (could that happen if two sequence systems are in operation on the same > table & row?) > > > > > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and > easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > Treebase-devel mailing list > Tre...@li... > https://lists.sourceforge.net/lists/listinfo/treebase-devel > |
From: Rutger V. <rut...@gm...> - 2010-01-04 12:41:13
|
Hi all, it sounds like Youjun is right: the AbstractPersistedObject needs its id creation to be set to NATIVE, not SEQUENCE so that all of APO's subclasses use their own sequences as defined in their respective tables in the schema as opposed to one called by hibernate. All the symptoms seem to suggest this: insertion from the command line works, but through hibernate it doesn't, as per the exception we're now getting after mesquite started working again. The reason why it was set to SEQUENCE was, simply put, that I wasn't sure what I was doing during the migration from DB2 to Pg. To be honest, I'm still not sure - but Youjun and Hilmar sound authoritative enough to convince me. Rutger On Wed, Dec 30, 2009 at 3:39 PM, youjun guo <you...@ya...> wrote: >> I wonder if all this is related to a bug that Rutger had reported at our >> last phone conference. > > The code I encounter the problem is unit test of taxonlabel and phylotree > dao class. Both focus on testing of single table add and delete operation > without entangling with other factors. > > Again, right now database treebase-dev is not working, it refuse connection. > > Youjun > > On Tue, Dec 29, 2009 at 4:57 PM, William Piel <wil...@ya...> wrote: >> >> On Dec 26, 2009, at 10:12 AM, Vladimir Gapeyev wrote: >> >> > Bill, have new studies been entered into the DB after Rutger created the >> > sequences? >> >> probably yes -- just a few new studies for testing the submission system. >> But until Rutger had solved the Mesquite problem, no new phylotree records >> would have been created successfully. >> >> bp >> >> ps. I wonder if all this is related to a bug that Rutger had reported at >> our last phone conference -- that he got the Mesquite parser working except >> for the result that it was creating twice as many records as it should? >> (could that happen if two sequence systems are in operation on the same >> table & row?) >> >> >> >> >> >> ------------------------------------------------------------------------------ >> This SF.Net email is sponsored by the Verizon Developer Community >> Take advantage of Verizon's best-in-class app development support >> A streamlined, 14 day to market process makes app distribution fast and >> easy >> Join now and get one step closer to millions of Verizon customers >> http://p.sf.net/sfu/verizon-dev2dev >> _______________________________________________ >> Treebase-devel mailing list >> Tre...@li... >> https://lists.sourceforge.net/lists/listinfo/treebase-devel > > > ------------------------------------------------------------------------------ > This SF.Net email is sponsored by the Verizon Developer Community > Take advantage of Verizon's best-in-class app development support > A streamlined, 14 day to market process makes app distribution fast and easy > Join now and get one step closer to millions of Verizon customers > http://p.sf.net/sfu/verizon-dev2dev > _______________________________________________ > Treebase-devel mailing list > Tre...@li... > https://lists.sourceforge.net/lists/listinfo/treebase-devel > > -- Dr. Rutger A. Vos School of Biological Sciences Philip Lyle Building, Level 4 University of Reading Reading RG6 6BX United Kingdom Tel: +44 (0) 118 378 7535 http://www.nexml.org http://rutgervos.blogspot.com |