You can subscribe to this list here.
2009 |
Jan
|
Feb
|
Mar
(1) |
Apr
(41) |
May
(41) |
Jun
(50) |
Jul
(14) |
Aug
(21) |
Sep
(37) |
Oct
(8) |
Nov
(4) |
Dec
(135) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2010 |
Jan
(145) |
Feb
(110) |
Mar
(216) |
Apr
(101) |
May
(42) |
Jun
(42) |
Jul
(23) |
Aug
(17) |
Sep
(33) |
Oct
(15) |
Nov
(18) |
Dec
(6) |
2011 |
Jan
(8) |
Feb
(10) |
Mar
(8) |
Apr
(41) |
May
(48) |
Jun
(62) |
Jul
(7) |
Aug
(9) |
Sep
(7) |
Oct
(11) |
Nov
(49) |
Dec
(1) |
2012 |
Jan
(17) |
Feb
(63) |
Mar
(4) |
Apr
(13) |
May
(17) |
Jun
(21) |
Jul
(10) |
Aug
(10) |
Sep
|
Oct
|
Nov
|
Dec
(16) |
2013 |
Jan
(10) |
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
(5) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(5) |
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
From: Vladimir G. <vla...@du...> - 2010-01-07 23:10:57
|
On Jan 7, 2010, at 11:08 AM, Rutger Vos wrote: >> The plan, as Hilmar, you, and I decided at the beginning of the >> conference call on Monday, is to re-direct postgres tables to use >> hibernate_sequence, instead of their individual sequences, for new PK >> IDs. (The other solution we discussed would be to change Java code >> (or Hibernate XML mappings?) to use the tables' individual sequences >> instead of hibernate_sequence.) > > Wait, I'm confused, is that the plan? I thought the plan was the other > way around: we use the tables' individual sequences, which means we > set the hibernate mode for generating IDs to "NATIVE" instead of > "SEQUENCE". Am I the only one who understood this exactly the wrong > way around? That's what transpired from our discussion on Monday, before other people called in; we felt that prior email discussion did not reach a definite conclusion. The outcome was influenced, as I recall, by Youjun's and Hilmar's observations that using a common sequence for all the tables is common practice in the Oracle world and a necessity in the MySQL world (keeping in mind a possibility of switching away from Postgres in the future), as well as the fact that this is how TB code works now and were not sure that nothing depended on this arrangement. A volunteer to resume and lead the discussion to determine the more correct among the two (or more?) solutions? My only reason for having held Youjun from proceeding one way or the other was the concern for messing up the only db instance we had. We'll soon have additional instances, so this will not be a roadblock. --Vladimir |
From: Rutger V. <rut...@gm...> - 2010-01-07 16:08:49
|
> The plan, as Hilmar, you, and I decided at the beginning of the > conference call on Monday, is to re-direct postgres tables to use > hibernate_sequence, instead of their individual sequences, for new PK > IDs. (The other solution we discussed would be to change Java code > (or Hibernate XML mappings?) to use the tables' individual sequences > instead of hibernate_sequence.) Wait, I'm confused, is that the plan? I thought the plan was the other way around: we use the tables' individual sequences, which means we set the hibernate mode for generating IDs to "NATIVE" instead of "SEQUENCE". Am I the only one who understood this exactly the wrong way around? -- 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 |
From: Vladimir G. <vla...@du...> - 2010-01-06 16:03:08
|
On Jan 5, 2010, at 3:12 PM, youjun guo wrote: > Hi, Vladimir, > > There are quit a few unit test failed due to the hibernate sequence > problem, do you want to join me and work on them? What is the plan > or solution in your mind? > The plan, as Hilmar, you, and I decided at the beginning of the conference call on Monday, is to re-direct postgres tables to use hibernate_sequence, instead of their individual sequences, for new PK IDs. (The other solution we discussed would be to change Java code (or Hibernate XML mappings?) to use the tables' individual sequences instead of hibernate_sequence.) Since the plan constitutes a significant adjustment to the DB schema, we should take care against messing up our only database instance, currently treebasedev. So, Jon is now working on creating and populating another database instance (treebaseprod), that we will use as an "untouchable" production instance while we proceed with risky development work on treebasedev. That is, we started moving towards the infrastructure we have earlier outlined at http://sourceforge.net/apps/mediawiki/treebase/index.php?title=Infrastructure_and_Deployment_plan . (There will be changes to names, ports, etc. -- I'll let everyone know as soon as they are done.) So, we have to postpone these particular unit tests until these two db instances are in place. As part of the above work, we are figuring out how to move the DB connection info (url, username, password) from the WAR file into tomcat's JNDI configuration. I'll be in touch as soon as we are ready to make TB code adjustments to achieve that. --Vladimir |
From: youjun g. <you...@ya...> - 2010-01-05 20:13:04
|
Hi, Vladimir, There are quit a few unit test failed due to the hibernate sequence problem, do you want to join me and work on them? What is the plan or solution in your mind? Youjun On Mon, Dec 21, 2009 at 1:42 PM, Vladimir Gapeyev <vla...@du... > wrote: > It would be very helpful for my introduction to the project if I could > participate in repairing some of the unit tests. I would need some > hand-holding in the beginning, though. > Youjun, when you identify some tests from category #1, could you pass > 2-3 simpler ones to me and could we talk then about what I should do > to fix them? > --Vladimir > > > On Dec 21, 2009, at 10:09 AM, youjun guo wrote: > > > Hilmar and All, > > > > There are 10 failed test and 29 errors need to be fixed on > > TreeBASE. The possibly cause include: > > > > 1. main java code change without synchronizing with the test suite; > > 2. database schema change without synchronizing with the test suite; > > 3. testing recode was lost from the database table; > > 4. other issue like mesquite > > > > I think one developer can fix 4-5 of them per working day, because > > most of us will not work from Dec 23rd to Jan 3rd, I expect the > > whole work can be done by Jan 8th-10th. > > > > Rutger, can I send you those failed test that related to mesquite? > > There maybe 2-3 of them. I can finish the rest unless by working on > > them I found my estimation about the due day is too optimistic. > > > > I will let you know then. > > > > Thanks > > > > 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: youjun g. <you...@ya...> - 2010-01-05 20:07:39
|
Hi, Rutger, Right now, most of the failed unit test are fixed. There are still 17 left, among those, these following 7 may related to Mesquite or Nexus. Will you be able to work on them?. Youjun ------------------------------------------------------------------------------- 1. Test set: org.cipres.treebase.domain.matrix.MatrixTest <<< FAILURE! testGenerateNexusBlock(org.cipres.treebase.domain.matrix.MatrixTest) Time elapsed: 2.203 sec <<< FAILURE! junit.framework.AssertionFailedError at junit.framework.Assert.fail(Assert.java:47) at junit.framework.Assert.assertTrue(Assert.java:20) at junit.framework.Assert.assertTrue(Assert.java:27) at org.cipres.treebase.domain.matrix.MatrixTest.testGenerat ------------------------------------------------------------------------------- 2. Test set: org.cipres.treebase.service.matrix.RowSegmentServiceImplTest <<< FAILURE! testCreateRowSegments(org.cipres.treebase.service.matrix.RowSegmentServiceImplTest) Time elapsed: 2.625 sec <<< ERROR! java.lang.NullPointerException at org.cipres.treebase.service.study.SubmissionServiceImpl.addNexusFilesJDBC(SubmissionServiceImpl.java:610) 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.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy81.addNexusFilesJDBC(Unknown Source) at org.cipres.treebase.service.matrix.RowSegmentServiceImplTest.testCreateRowSegments(RowSegmentServiceImplTest.java:182) ------------------------------------------------------------------------------- 3. Test set: org.cipres.treebase.dao.tree.PhyloTreeDAOTest <<< FAILURE! testFindTreeBlocksByNexusFileName(org.cipres.treebase.dao.tree.PhyloTreeDAOTest) Time elapsed: 0.203 sec <<< ERROR! org.springframework.dao.EmptyResultDataAccessException: Incorrect result size: expected 1, actual 0 at org.springframework.dao.support.DataAccessUtils.requiredSingleResult(DataAccessUtils.java:71) at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:422) at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:426) at org.cipres.treebase.dao.tree.PhyloTreeDAOTest.testFindTreeBlocksByNexusFileName(PhyloTreeDAOTest.java:536) ------------------------------------------------------------------------------- 4. Test set: org.cipres.treebase.service.nexus.NexusParserTest <<< FAILURE! testLoadPhyloDataSet(org.cipres.treebase.service.nexus.NexusParserTest) Time elapsed: 0.125 sec <<< ERROR! java.lang.NullPointerException at org.cipres.communication.Facilitator.registryIsColocated(Facilitator.java:190) at org.cipres.communication.Facilitator.initializeORB(Facilitator.java:137) at org.cipres.communication.Facilitator.initialize(Facilitator.java:108) at org.cipres.datatypes.PhyloDataset.initializeFromStringOrFile(PhyloDataset.java:170) at org.cipres.datatypes.PhyloDataset.initialize(PhyloDataset.java:208) at org.cipres.datatypes.PhyloDataset.<init>(PhyloDataset.java:117) at org.cipres.treebase.service.nexus.NexusParserTest.testLoadPhyloDataSet(NexusParserTest.java:33) ------------------------------------------------------------------------------- 5. Test set: org.cipres.treebase.service.study.StudyServiceImplTest <<< FAILURE! testGenerateReconstructedNexusFile(org.cipres.treebase.service.study.StudyServiceImplTest) Time elapsed: 0.079 sec <<< ERROR! java.lang.NullPointerException at org.cipres.treebase.service.study.StudyServiceImplTest.testGenerateReconstructedNexusFile(StudyServiceImplTest.java:506) ------------------------------------------------------------------------------- 6. Test set: org.cipres.treebase.service.study.SubmissionServiceImplTest <<< FAILURE! testProcessNexusFile(org.cipres.treebase.service.study.SubmissionServiceImplTest) Time elapsed: 0.61 sec <<< ERROR! java.lang.NullPointerException at org.cipres.treebase.service.study.SubmissionServiceImpl.addNexusFilesJDBC(SubmissionServiceImpl.java:610) 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.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy81.addNexusFilesJDBC(Unknown Source) at org.cipres.treebase.service.study.SubmissionServiceImplTest.testProcessNexusFile(SubmissionServiceImplTest.java:226) ------------------------------------------------------------------------------- 7. Test set: org.cipres.treebase.domain.nexus.NexusMesquiteDataSetTest <<< FAILURE! testMesqutieFolderDir(org.cipres.treebase.domain.nexus.NexusMesquiteDataSetTest) Time elapsed: 0.015 sec <<< ERROR! org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.cipres.treebase.domain.nexus.NexusMesquiteDataSetTest': Unsatisfied dependency expressed through bean property 'fixture': There are 3 beans of type [org.cipres.treebase.domain.nexus.NexusService] available for autowiring by type: [nexusService, nexmlService, rdfaService]. There should have been exactly 1 to be able to autowire property 'fixture' of bean 'org.cipres.treebase.domain.nexus.NexusMesquiteDataSetTest'. Consider using autowiring by name instead. at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType(AbstractAutowireCapableBeanFactory.java:931) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:829) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireBeanProperties(AbstractAutowireCapableBeanFactory.java:274) at org.springframework.test.AbstractDependencyInjectionSpringContextTests.injectDependencies(AbstractDependencyInjectionSpringContextTests.java:179) at org.springframework.test.AbstractDependencyInjectionSpringContextTests.prepareTestInstance(AbstractDependencyInjectionSpringContextTests.java:158) at org.springframework.test.AbstractSingleSpringContextTests.setUp(AbstractSingleSpringContextTests.java:88) at junit.framework.TestCase.runBare(TestCase.java:125) 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.GeneratedMethodAccessor140.invoke(Unknown Source) 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) |
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: Jon A. <jon...@du...> - 2010-01-04 19:10:56
|
I have moved the postgresql volume to a new storage repository with expectations of better performance and stability. As mentioned before I left for vacation, I've created two more instances of tomcat. They can be accessed here: http://treebase-dev.nescent.org:8180/treebase-web http://treebase-dev.nescent.org:8280/treebase-web Good news is that I simply copied the war file from Rutger's home directory and it deployed to both instances with no user environment variables or special tomcat configurations. -Jon ------------------------------------------------------- Jon Auman Systems Administrator National Evolutionary Synthesis Center Duke University http:www.nescent.org jon...@ne... ------------------------------------------------------ |
From: Jon A. <jon...@du...> - 2010-01-04 15:53:45
|
We've been experience problems on treebase-dev which randomly forces the postgresql server offline. Looking through the logs, I see I/O errors which force the postgresql volume offline and then restarts it read-only. Postgresql cannot start on a read-only volume because it needs to right to logs and some temp space. I believe the problem arises from the current VM infrastructure. All VMs are using the same LUN to connect to the iSCSI storage repository. I've got a second repository not in use that contains faster SCSI disks than the SATA disks that we are currently using. I can also tune this new repository for faster I/O. So, in plain English, this means I'll be working on getting this new repository working and moving the postgresql volume to it. It should not take me more than an hour or two. I'll let you know when it's up and that should fix our postgresql issues. Sorry for the inconvenience. -Jon ------------------------------------------------------- Jon Auman Systems Administrator National Evolutionary Synthesis Center Duke University http:www.nescent.org jon...@ne... ------------------------------------------------------ |
From: youjun g. <you...@ya...> - 2010-01-04 14:45:42
|
Rutger, It seems to me that there are more than I estimated test fails and test errors (null point) related to mesquite and nexus i/o (about 10 of them). I expect most of them may disappear once the mesquite is fully function. Right now, our database server is not working, I am not be able to give you the most updated test result. I will send them to you once they are available. I think they may also helpful for your mesquite setting up. Youjun On Mon, Jan 4, 2010 at 7:39 AM, Rutger Vos <rut...@gm...> wrote: > Hi Youjun, > > is this still happening? Last time I saw that NPE was when mesquite > wasn't working. > > Rutger > > On Tue, Dec 22, 2009 at 7:11 PM, youjun guo <you...@ya...> wrote: > > Hi, Rutger, > > > > This unit test error may related to mesquite, please have a look on it. > > > > Youjun > > > > > > > ------------------------------------------------------------------------------- > > Test set: org.cipres.treebase.service.matrix.RowSegmentServiceImplTest > > > ------------------------------------------------------------------------------- > > Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 8.641 sec > > <<< FAILURE! > > > testCreateRowSegments(org.cipres.treebase.service.matrix.RowSegmentServiceImplTest) > > Time elapsed: 8.594 sec <<< ERROR! > > java.lang.NullPointerException > > at > > > org.cipres.treebase.service.study.SubmissionServiceImpl.addNexusFilesJDBC(SubmissionServiceImpl.java:610) > > 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.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) > > at > > > org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) > > at > > > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) > > at > > > org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) > > at > > > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) > > at > > > org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) > > at $Proxy81.addNexusFilesJDBC(Unknown Source) > > at > > > org.cipres.treebase.service.matrix.RowSegmentServiceImplTest.testCreateRowSegments(RowSegmentServiceImplTest.java:182) > > > > > > > > -- > 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 > |
From: Rutger V. <rut...@gm...> - 2010-01-04 13:11:56
|
Sounds good to me. The commented-out line: <!-- property name="passwordEncoder" ref="passwordEncoder"/ --> suggests to me that the daoAuthenticationProvider bean needs to be passed a passwordEncoder bean (presumably implementing a passwordEncoder interface?) which consequently needs to be defined somehow. Does acegi supply us with one for free? On Sat, Dec 26, 2009 at 9:28 PM, Hilmar Lapp <hl...@ne...> wrote: > > On Dec 26, 2009, at 1:41 PM, Vladimir Gapeyev wrote: > > My plan now would be to learn acegi (which, btw, is SpringSecurity starting > with Spring 2.0, which TB2 uses) and what it offers for password hashing -- > unless someone offers more focused guidance on what I should do. > > I'll follow the suggestions at http://acegisecurity.org/suggested.html > > That sounds like a good plan to me. If this can be solved declaratively, all > the better. > -hilmar > -- > =========================================================== > : Hilmar Lapp -:- Durham, NC -:- informatics.nescent.org : > =========================================================== > > > > ------------------------------------------------------------------------------ > 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 |
From: Rutger V. <rut...@gm...> - 2010-01-04 12:54:54
|
Hi Youjun, this is probably superfluous at this point, but I just redeployed the server so your changes should be live. Rutger On Mon, Dec 21, 2009 at 2:33 PM, youjun guo <you...@gm...> wrote: > > Hi, Rutger, > > I just finished on this: > > 2854768 Editors and Administrators Cannot Edit Ready Submissions > > Code already submitted to source forge, please help me to redeploy. > > Youjun -- 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 |
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 |
From: Rutger V. <rut...@gm...> - 2010-01-04 12:39:36
|
Hi Youjun, is this still happening? Last time I saw that NPE was when mesquite wasn't working. Rutger On Tue, Dec 22, 2009 at 7:11 PM, youjun guo <you...@ya...> wrote: > Hi, Rutger, > > This unit test error may related to mesquite, please have a look on it. > > Youjun > > > ------------------------------------------------------------------------------- > Test set: org.cipres.treebase.service.matrix.RowSegmentServiceImplTest > ------------------------------------------------------------------------------- > Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 8.641 sec > <<< FAILURE! > testCreateRowSegments(org.cipres.treebase.service.matrix.RowSegmentServiceImplTest) > Time elapsed: 8.594 sec <<< ERROR! > java.lang.NullPointerException > at > org.cipres.treebase.service.study.SubmissionServiceImpl.addNexusFilesJDBC(SubmissionServiceImpl.java:610) > 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.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) > at > org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) > at > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) > at > org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) > at > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) > at > org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) > at $Proxy81.addNexusFilesJDBC(Unknown Source) > at > org.cipres.treebase.service.matrix.RowSegmentServiceImplTest.testCreateRowSegments(RowSegmentServiceImplTest.java:182) > > -- 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 |
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: 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: Hilmar L. <hl...@ne...> - 2009-12-26 21:28:46
|
On Dec 26, 2009, at 1:41 PM, Vladimir Gapeyev wrote: > My plan now would be to learn acegi (which, btw, is SpringSecurity > starting with Spring 2.0, which TB2 uses) and what it offers for > password hashing -- unless someone offers more focused guidance on > what I should do. > I'll follow the suggestions at http://acegisecurity.org/suggested.html That sounds like a good plan to me. If this can be solved declaratively, all the better. -hilmar -- =========================================================== : Hilmar Lapp -:- Durham, NC -:- informatics.nescent.org : =========================================================== |
From: Vladimir G. <vga...@ne...> - 2009-12-26 18:42:01
|
In search for the place where password hashing should be implemented, I have been having difficulty identifying TB2 code responsible for comparing user-supplied password to the one stored in db. My best guess at the moment is that authentication is handled by the acegi- security package -- based on this in treebase-web/.../treebase- security.xml: <bean id="daoAuthenticationProvider" class="org.acegisecurity.providers.dao.DaoAuthenticationProvider"> <property name="userDetailsService"><ref bean ="userService"/ ></property> <!-- encrypt password instead of storing in clear text in DB --> <!-- property name="passwordEncoder" ref="passwordEncoder"/ --> <!-- the next 2 lines are for debugging purpose --> <!-- property name="userDetailsService" ref="jdbcDaoImpl"/ --> <!-- property name="userDetailsService" ref="myUserServices"/ --> </bean> <!-- bean id="passwordEncoder" class="org.acegisecurity.providers.encoding.ShaPasswordEncoder"/ --> Am I right about acegi? The declarations commented-out above suggest that it could be possible to get password hashing from acegi for free. Does anyone know why this is currently disabled? My plan now would be to learn acegi (which, btw, is SpringSecurity starting with Spring 2.0, which TB2 uses) and what it offers for password hashing -- unless someone offers more focused guidance on what I should do. I'll follow the suggestions at http://acegisecurity.org/suggested.html --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: 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: 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: 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: 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: 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. <vga...@ne...> - 2009-12-23 21:56:10
|
As requested during the last conf call, here is my status: - Tried again to set up a working environment that uses Eclipse WTP, but could not resolve dependencies problems. Will have to use outside- Eclipse WAR deployment, until serendipity strikes... - Studied TB2 schema, made a pretty reasonable diagram. (Would post it to the wiki, but the wiki does not want anything but pictures.) - Explored code base, to figure out where to put password hashing (see below). --Vladimir * class treebase-core/src/main/java/ org.cipres.treebase.domain.admin.User This is the OO representation of the user record from DB. It has methods getPassword() and setPassword(String). The latter is not a good place to hash the password -- when I experimented with altering the password here, the UI responded by claiming that 2 password copies of the password I supply during registration were not identical. (?!) * class treebase-core/src/main/java/ org.cipres.treebase.service.admin.UserServiceImpl The method createUser(User) here checks whether there is an object in DB with the same username or the same password and, if not, persists it into DB. I do not think this is a good place for pass hashing, since I do not see any other code here changing contents of User * class treebase-core/src/main/java/org.cipres.treebase.web.controllers.RegisterUserController This one contains a TODO to implement password encryption. This probably is the place to do password hashing. |
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 |