Hi All,

I am new to Geotools and trying to create a GML from a simple feature 
collection. I am using the following code

            OutputStream out = new FileOutputStream(new File("C:\\test.gml"));
            GML gml = new GML(Version.WFS1_0);
            gml.encode(out, collection);
            gml.setNamespace("test", "http://test.com";);
            
            out.close();


But it's throwing NullPointerException 

Exception in thread "main" java.lang.NullPointerException
    at 
org.xml.sax.helpers.NamespaceSupport.declarePrefix(NamespaceSupport.java:289)
    at org.geotools.GML.encode(GML.java:297)

Please help me to getrid of this error. 

Thank you,
Krishna.


      
------------------------------------------------------------------------------
Free Software Download: Index, Search & Analyze Logs and other IT data in 
Real-Time with Splunk. Collect, index and harness all the fast moving IT data 
generated by your applications, servers and devices whether physical, virtual
or in the cloud. Deliver compliance at lower cost and gain new business 
insights. http://p.sf.net/sfu/splunk-dev2dev 
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to