Looks like you need to make sure the gt-shape jar and friends are on the class 
path. 

The GeoTools class has a utility method (and an about dialog) which will help 
you check what the runtime configuration looks like. 

-- 
Jody Garnett


On Monday, 28 November 2011 at 7:26 PM, Harshad S wrote:

> Hello all,
> 
>             I am trying to make an applet out of my geotools application and 
> deploy it on Tomcat6. I just wanted to know if someone has faced this error 
> before. When I run the applet in Eclipse, it runs well. Once I deploy it on 
> Tomcat server and run it on the shell using appletviewer, it gives a 
> NullPointerException on the line where I read a shapefile from the File 
> system. (Using a FileDataStore to read contents from the 'File' object). 
> Apparently, my datastore object remains null.
> 
>             My applet has all the permissions to access the file system as 
> specified in the policy file. Please let me know if you know  a fix for this. 
> Here is the exact code where the error lies.
> 
>               File file = new File("tl_2010_48015_roads.shp");
>                 FileDataStore store = null;
>              
>         try {
>             store = FileDataStoreFinder.getDataStore(file);   // store 
> remains NULL
>             
>         } catch (IOException e) {
>             // TODO Auto-generated catch block
>             e.printStackTrace();
>         }
>         
>     Just for reference, my Web project has the following structure. 
> 
>     Proj-Name
>          JAVA Resources
>             src ( here is my Geotools code)
>          WebContent
>             index.html
>             shpfiles( where my shapefile is present)
>  
> 
> 
> Thank You.
> Harshad Shrikhande
> Researcher R&D
> TCS Innovations Infra Lab, Chennai
> Tata Consultancy Services
> Cell:- 7200605821
> Mailto: [email protected] (mailto:[email protected])
> Website: http://www.tcs.com
> ____________________________________________
> Experience certainty. IT Services
> Business Solutions
> Outsourcing
> ____________________________________________
> =====-----=====-----=====
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain 
> confidential or privileged information. If you are 
> not the intended recipient, any dissemination, use, 
> review, distribution, printing or copying of the 
> information contained in this e-mail message 
> and/or attachments to it are strictly prohibited. If 
> you have received this communication in error, 
> please notify us by reply e-mail or telephone and 
> immediately and permanently delete the message 
> and any attachments. Thank you
> 
> 
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure 
> contains a definitive record of customers, application performance, 
> security threats, fraudulent activity, and more. Splunk takes this 
> data and makes sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-novd2d
> 
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected] 
> (mailto:[email protected])
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
> 
> 


------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to