Hey Brian, Attached is a zip of the policy. Apologies for the many files. :) There's a lot of inheritance going on, so I figured it'd be easier to just attach the entire policy for completeness sake.
Let me know if you see anything wrong with how RangeBeginningTime is specified. It appears to be correct from what I can see, but maybe I might be missing something here. The L0a_Radar product type is defined under policy/smap-product/product-types.xml. policy/smap-product/product-type-element-map.xml shows what parent L0a_Radar maps to. Regarding the 2nd problem, great to hear that this is resolved in the trunk. I will definitely check this out. Thanks, Mike From: Brian Foster <[email protected]<mailto:[email protected]>> Reply-To: <[email protected]<mailto:[email protected]>> Date: Fri, 11 May 2012 21:25:14 +0000 To: <[email protected]<mailto:[email protected]>> Subject: Re: Query Tool Bugs? I think there are 2 different problems here... see comment below inline: On May 10, 2012, at 01:28 PM, "Cayanan, Michael D (388J)" <[email protected]<mailto:[email protected]>> wrote: Hi All, I'm having several issues with the Query Tool and wondering if anyone has run into these issues before: First, I'm having an issue when giving the Query Tool a query containing multiple conditions: Below is a command-line run of my query: ./query_tool --url http://localhost:9000 --sql -query "SELECT * FROM L0a_Radar WHERE RangeBeginningDate>'2007-01-01' AND RangeBeginningTime>'12:00:00.000Z'" log4j:WARN No appenders could be found for logger (org.apache.commons.httpclient.HttpClient). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. org.apache.xmlrpc.XmlRpcException: java.lang.Exception: org.apache.oodt.cas.filemgr.structs.exceptions.CatalogException: Failed to perform complex query : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTERSECT (SELECT DISTINCT product_id FROM L0a_Radar_metadata WHERE element_id =' at line 1 can you post your policy files... Looks like you may have a problem with RangeBeginningTime at org.apache.xmlrpc.XmlRpcClientResponseProcessor.decodeException(XmlRpcClientResponseProcessor.java:104) at org.apache.xmlrpc.XmlRpcClientResponseProcessor.decodeResponse(XmlRpcClientResponseProcessor.java:71) at org.apache.xmlrpc.XmlRpcClientWorker.execute(XmlRpcClientWorker.java:73) at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:194) at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:185) at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java:178) at org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient.complexQuery(XmlRpcFileManagerClient.java:952) at org.apache.oodt.cas.filemgr.tools.QueryTool.performSqlQuery(QueryTool.java:251) at org.apache.oodt.cas.filemgr.tools.QueryTool.main(QueryTool.java:241) Exception in thread "main" org.apache.oodt.cas.filemgr.structs.exceptions.CatalogException: java.lang.Exception: org.apache.oodt.cas.filemgr.structs.exceptions.CatalogException: Failed to perform complex query : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'INTERSECT (SELECT DISTINCT product_id FROM L0a_Radar_metadata WHERE element_id =' at line 1 at org.apache.oodt.cas.filemgr.system.XmlRpcFileManagerClient.complexQuery(XmlRpcFileManagerClient.java:958) at org.apache.oodt.cas.filemgr.tools.QueryTool.performSqlQuery(QueryTool.java:251) at org.apache.oodt.cas.filemgr.tools.QueryTool.main(QueryTool.java:241) I tried surrounding the entire condition with quotes, but still no luck: ./query_tool --url http://localhost:9000 --sql -query "SELECT * FROM L0a_Radar WHERE "RangeBeginningDate>'2007-01-01' AND RangeBeginningTime>'12:00:00.000Z'"" Ambiguous output redirect. I'm assuming this is a syntax thing, although I don't know what the tool is expecting. My second issue that I'm running into is in regards to querying of dates. I tried the following query below and got the following output: ./query_tool --url http://localhost:9000 --sql -query "SELECT * FROM L0a_Radar WHERE RangeBeginningDate>'2007-03-02'" log4j:WARN No appenders could be found for logger (org.apache.commons.httpclient.HttpClient). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: -1 at java.lang.AbstractStringBuilder.substring(AbstractStringBuilder.java:881) at java.lang.StringBuffer.substring(StringBuffer.java:416) at org.apache.oodt.cas.filemgr.tools.QueryTool.performSqlQuery(QueryTool.java:255) at org.apache.oodt.cas.filemgr.tools.QueryTool.main(QueryTool.java:241) This is an issue which was resolve in the truck... has to do with no results being found... use SqlQuery CLI action. For this particular product, I have 1 product in my catalog where the RangeBeginningDate is equal to '2007-03-01'. Not sure if that factors into why an exception is being thrown here. When I use an earlier date on my query, the tool returns a result as expected: ./query_tool --url http://localhost:9000 --sql -query "SELECT * FROM L0a_Radar WHERE RangeBeginningDate>'2007-01-01'" log4j:WARN No appenders could be found for logger (org.apache.commons.httpclient.HttpClient). log4j:WARN Please initialize the log4j system properly. log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info. /Users/mcayanan/smap/staging,2007-03-01,23:30:25.000Z,314,L0a_Radar,V20517SGS0706023302501.VCD,V20517SGS0706023302501.VCD,2012-05-08T14:27:59.385-07:00,L0a_Radar,23:30:25.000Z,2007-03-01 Thanks, Mike
filemgr-policy.tar.gz
Description: filemgr-policy.tar.gz
