Re: [opennms-devel] About bugs 2261 and 2337
Alejandro Galue <[email protected]>
| Newsgroups | gmane.network.opennms.bugs |
|---|---|
| Message-ID | <[email protected]> |
Thanks, I will try it next week. Alejandro. On Mar 22, 2008, at 1:13 PM, DJ Gregor wrote: > Alejandro, > > I don't know if you noticed, but Ben fixed this by going at it a > different way, by eliminating the use of to_timestamp altogether and > using Java SQL Timesamp objects: > > http://bugzilla.opennms.org/show_bug.cgi?id=2261#c6 > > > - djg > > On Thu, 13 Mar 2008 16:11:30 -0430, "Alejandro Galue" > <[email protected]> said: >> Hello All, >> >> First off all, in my opinion, this two bugs are related >> (same Exception with postgresql and Filters) >> >> I did some tests and now I'm more confused. I add a comment >> on org.opennms.web.event.EventFactory.getEvents to display >> a log message with the generated SQL (just before >> preparedStatement), and add a comment on >> org.opennms.web.event.filter.BeforeDateFilter.bindParams, >> to see which parameters is passed to preparedStatement. >> >> The generated SQL is: >> >> jetty.log:2008-03-13 16:00:41,630 INFO [btpool0-3] >> JettyServer: FILTER_SQL_TEST: SELECT events.*, >> node.nodelabel, service.servicename FROM node >> RIGHT OUTER JOIN events ON (events.nodeid = >> node.nodeid) LEFT OUTER JOIN service ON >> (service.serviceid = events.serviceid) WHERE >> EVENTACKUSER IS NULL AND EVENTTIME < to_timestamp(?, ?) AND >> EVENTDISPLAY='Y' ORDER BY EVENTID DESC LIMIT 10 OFFSET 0 >> >> and, the parameters to bind are: >> >> jetty.log:2008-03-13 16:00:41,630 INFO [btpool0-3] >> JettyServer: FILTER_SQL_TEST: Thu Mar 13 16:00:00 VET 2008, >> 'Dy Mon DD HH24:MI:SS Tz YYYY' >> >> If I manually edit the SQL and run it directly on >> postgresql, it works. The query was: >> >> SELECT events.*, node.nodelabel, service.servicename >> FROM node RIGHT OUTER JOIN events ON >> (events.nodeid = node.nodeid) LEFT OUTER JOIN service >> ON (service.serviceid = events.serviceid) >> WHERE EVENTACKUSER IS NULL AND EVENTTIME < >> to_timestamp('Thu Mar 13 16:00:00 VET 2008', 'Dy Mon DD >> HH24:MI:SS Tz YYYY') AND EVENTDISPLAY='Y' ORDER BY EVENTID >> DESC LIMIT 10 OFFSET 0 >> >> So, if the syntax are write, the problem could be the >> binding or the postgresql driver. >> >> I modified EventConstants.POSTGRES_DATE_FORMAT to remove >> quotes, but the log still show me the quotes (and yes, I >> generate a new opennms-services jar, overwrite the old one >> on opennms/lib and restart opennms). >> >> What is happening here? >> >> Regards, >> Alejandro. >> >> ------------------------------------------------------------------------- >> This SF.net email is sponsored by: Microsoft >> Defy all challenges. Microsoft(R) Visual Studio 2008. >> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >> _______________________________________________ >> Please read the OpenNMS Mailing List FAQ: >> http://www.opennms.org/index.php/Mailing_List_FAQ >> >> opennms-devel mailing list >> >> To *unsubscribe* or change your subscription options, see the >> bottom of >> this page: >> https://lists.sourceforge.net/lists/listinfo/opennms-devel > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Please read the OpenNMS Mailing List FAQ: > http://www.opennms.org/index.php/Mailing_List_FAQ > > opennms-devel mailing list > > To *unsubscribe* or change your subscription options, see the bottom > of this page: > https://lists.sourceforge.net/lists/listinfo/opennms-devel Alejandro Galue Sync Consultores Tel. 212 7628555 212 7623012 Fax 212 7626671 Cel 414 1344723 [email protected] Alejandro Galue Sync Consultores Tel. 212 7628555 212 7623012 Fax 212 7626671 Cel 414 1344723 [email protected] ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Please read the OpenNMS Mailing List FAQ: http://www.opennms.org/index.php/Mailing_List_FAQ opennms-devel mailing list To *unsubscribe* or change your subscription options, see the bottom of this page: https://lists.sourceforge.net/lists/listinfo/opennms-devel