[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: THREDDS Catalog Generator Error



Hi Mark,

Ken is right, the generator assumes it is given a URL rather than a file name.
However, it doesn't have to be accessible via HTTP. You can just use a "file:"
URL.

Ethan

Mark A Ohrenschall wrote:
> 
> Hello,
> 
> I'm trying to run a simple test of the THREDDS catalog generator, and this is
> what's happening:
> 
> [mao@panther THREDDS]$ /usr/java/j2sdk1.4.1_02/bin/java -classpath 
> cataloggen-0.6.jar:thredds.jar:jdom-b8.jar:dods.1.1.1.jar 
> thredds.cataloggen.CatalogGen mytest.xml
> Catalog NOT read successfully (mytest.xml):
> Message=----Catalog Validation version 0.6.02
> ** InvCatalogFactory.readXML (1) MalformedURLException on URL <mytest.xml> no 
> protocol: mytest.xml
> 
> Exception in thread "main" java.lang.NullPointerException
>         at 
> thredds.cataloggen.CatalogGen.findCatGenConfigMdata(CatalogGen.java:117)
>         at thredds.cataloggen.CatalogGen.<init>(CatalogGen.java:54)
>         at thredds.cataloggen.CatalogGen.main(CatalogGen.java:140)
> [mao@panther THREDDS]$ cat mytest.xml
> <?xml version="1.0" encoding="UTF-8"?>
> <!-- edited with XML Spy v4.3 U (http://www.xmlspy.com) by Mark Ohrenschall 
> (US Dept of Commerce/NOAA/NESDIS) -->
> <!DOCTYPE catalog SYSTEM 
> "http://www.unidata.ucar.edu/projects/THREDDS/xml/CatalogGenConfig.0.5.dtd";>
> <catalog name="my test" version="0.6">
>   <dataset name="my collection" dataType="Grid">
>     <metadata metadataType="CatalogGenConfig">
>       <catalogGenConfig type="Catalog">
>         <datasetSource name="ds source" type="Local" structure="DirTree" 
> accessPoint="/data/www/html/dods/">
>           <resultService name="myserver" serviceType="DODS" 
> base="http://panther.ngdc.noaa.gov/cgi-bin/dods/nph-dods/"; 
> accessPointHeader="/data/www/html/"/>
>           <datasetNamer name="My Test" type="RegExp" addLevel="false" 
> matchPattern="([a-z]+)\.nc$" substitutePattern="My Test $1"/>
>         </datasetSource>
>       </catalogGenConfig>
>     </metadata>
>   </dataset>
> </catalog>
> [mao@panther THREDDS]$
> 
> Any idea why I'm getting the MalformedURLException?
> 
> Thanks,
> 
> Mark

-- 
Ethan R. Davis                       Telephone: (303) 497-8155
Software Engineer                    Fax:       (303) 497-8690
UCAR Unidata Program Center          E-mail:    address@hidden
P.O. Box 3000
Boulder, CO  80307-3000              http://www.unidata.ucar.edu/