On Wed, Mar 16, 2011 at 6:42 PM, Gundel, Aaron <[email protected]> wrote: > Hello all, > > > > I’m emailing about an issue I posted on the users list a while ago, and I > was wondering if this was something that I could fix (supposing I’m not > running into designed behavior I’m just not understanding). > > > > When using Oracle, if you have a Date field, this field also contains a > time. This time is not being output when you call > GetFeature/GetFeatureInfo. Miles suggested that the datastore could be > updated to alter the session and correct the problem, using ALTER SESSION > SET NLS_DATE_FORMAT = 'DD-MON-YYYY HH24:MI:SS'; This would at least get the > time out there, although it doesn’t give you much control of the > formatting. > > > > Does anyone have any feedback on whether or not something like this would be > useful? Am I missing an obvious/easy fix? If it is something to change, I > have some time to poke around and try to make it work. If someone could > point me in the right direction in the source code, I’ll make the change and > try to test it out. > > > > Also, in a related question, how does one debug geotools? I think this > question has been asked before, but I couldn’t find any documentation on the > geotools site.
The GeoTools code uses prepared statements to get back dates and has a custom converter to go from the Oracle custom date objects to java dates. There is a very light test that is checking how things are working vs dates and timestampts that should really be improved. All you need is in GeoTools, in particular in the following two modules: http://svn.osgeo.org/geotools/trunk/modules/library/jdbc/ http://svn.osgeo.org/geotools/trunk/modules/plugin/jdbc/jdbc-oracle/ In order to run the oracle tests you'll have to hand modify the classpath of the project to remove the dummy classes we use for compiling the module without using the non redistributable jdbc driver and put the actual jdbc driver instead, and then create a oracle.properties file in $home/.geotools with the connection params to a writable Oracle store: #This is an example fixture. Update the values and remove the .example suffix to enable the test #Sun Jun 20 16:55:13 CEST 2010 dbtype=Oracle port=1521 password=postgis url=jdbc\:oracle\:thin\:@localhost\:1521\:xe host=localhost database=xe driver=oracle.jdbc.driver.OracleDriver username=myuser user=mypassword Then you should be able to run all the tests. Hope this helps Cheers Andrea -- ------------------------------------------------------- Ing. Andrea Aime GeoSolutions S.A.S. Tech lead Via Poggio alle Viti 1187 55054 Massarosa (LU) Italy phone: +39 0584 962313 fax: +39 0584 962313 mob: +39 333 8128928 http://www.geo-solutions.it http://geo-solutions.blogspot.com/ http://www.youtube.com/user/GeoSolutionsIT http://www.linkedin.com/in/andreaaime http://twitter.com/geowolf ------------------------------------------------------- ------------------------------------------------------------------------------ Colocation vs. Managed Hosting A question and answer guide to determining the best fit for your organization - today and in the future. http://p.sf.net/sfu/internap-sfd2d _______________________________________________ Geoserver-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-devel
