Hi everyone,
I'm running out of ideas.
I use the following jars to read some shapefiles:
geoapi-2.0.jar
gt2-api.jar
gt2-main.jar
gt2-referencing.jar
gt2-shapefile.jar

And here comes the strange thing. If I run the application inside eclipse, 
everything runns smooth, but if I run it outside, I get the following 
exception:
 java.lang.NullPointerException
        at 
org.geotools.feature.DefaultAttributeTypeFactory.createAttributeType(DefaultAttributeTypeFactory.java:85)
        at 
org.geotools.feature.DefaultAttributeTypeFactory.createAttributeType(DefaultAttributeTypeFactory.java:152)
        at 
org.geotools.feature.AttributeTypeFactory.newAttributeType(AttributeTypeFactory.java:94)
        at 
org.geotools.data.shapefile.ShapefileDataStore.readAttributes(ShapefileDataStore.java:611)
        at 
org.geotools.data.shapefile.ShapefileDataStore.getSchema(ShapefileDataStore.java:557)
        at 
org.geotools.data.shapefile.ShapefileDataStore.getSchema(ShapefileDataStore.java:551)
        at 
org.geotools.data.shapefile.ShapefileDataStore.getFeatureSource(ShapefileDataStore.java:797)
        at 
jgrass.io.EsriShapefileReader.hasMoreData(EsriShapefileReader.java:114)
        at jgrass.map.GrassMap.hasMoreData(GrassMap.java:278)
        at bsh.commands.d.shapefile.d_shapefile.invoke(d_shapefile.java:284)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at bsh.Reflect.invokeOnMethod(Unknown Source)
        at bsh.Reflect.invokeStaticMethod(Unknown Source)
        at bsh.Name.invokeMethod(Unknown Source)
        at bsh.BSHMethodInvocation.eval(Unknown Source)
        at bsh.BSHPrimaryExpression.eval(Unknown Source)
        at bsh.BSHPrimaryExpression.eval(Unknown Source)
        at bsh.Interpreter.eval(Unknown Source)
        at bsh.Interpreter.eval(Unknown Source)
        at jgrass.engine.GrassEngineLocal.run(GrassEngineLocal.java:377)


I had that exception before also running in eclipse when I had not the 
referencing jar in the path, but after adding it to the classpath it worked 
properly.

When running the application outside the ide, I put all the jars in the 
classpath, so I really can't understand what the problem is.

Can anyone help me out?

Thanks,
Andrea



-- 
____________________________________________________________________________
HydroloGIS - Environmental Open Source Solutions
www.hydrologis.com

Andrea Antonello
Environmental Engineer
mobile:  +393288497722

"Let it be as much a great honour to take as to give learning,
if you want to be called wise."
Skuggsja' - The King's mirror - 1240 Reykjavik
____________________________________________________________________________




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to