Hi, I must manage the interoperability between 2 data models. So, i would like to map the fields between two shapefiles. I used the component tMap and I mapped the necessary fields of the input shapefile with the fields of the output shapefile (which will be created). The two shapefiles have a multilinestring geometry. When I execute the job, I have a NullPointerException but each field is nullable and I check if the field is null or not. Error : connecting to socket on port 3646 connected Exception in component sShapefileOutput_1_SO java.lang.NullPointerException at org.geotools.data.shapefile.ShapefileDataStore.createSchema(ShapefileDataStore.java:963) at org.geotools.data.shapefile.ShapefileDataStore.createSchema(ShapefileDataStore.java:113) at ng2grace.ngtograce_0_1.NGToGrace.sShapefileInput_1_GIProcess(NGToGrace.java:2518) at ng2grace.ngtograce_0_1.NGToGrace.runJobInTOS(NGToGrace.java:3473) at ng2grace.ngtograce_0_1.NGToGrace.main(NGToGrace.java:3339) disconnected I tried to put "null" in each empty field but it doesn't change anything. Thank you for your help. PS: I enclosed the job's scheme and the tMap configuration.
Hi, You are not mapping two Shapefiles in this job but you are creating a shapefile from a first one, with different schemas mapped thanks to a tMap component...with empty columns...(e.g. NPE in the error log). Are you sure you would like to map fields between shapefiles?? or just create a new shapefile from fields of another one?? Cheers, Mathieu
Thank you for yours responses. @Fxp: The geometry column is missing (I noticed it) but I choose "multilinestring" in the shapefileOutput configuration, so I thought it was enough. @mcoudert: I just want to create a new shapefile from another one. Concerning the empty columns, I tried to put "null" but I already had the NPE error. Cheers, Nicolas Edit : If i add a Geometry column , i have this new error : Exception in component sShapefileOutput_1_SO java.io.IOException: Unable to write : routines.system.Document at org.geotools.data.shapefile.ShapefileDataStore.createDbaseHeader(ShapefileDataStore.java:1217) at org.geotools.data.shapefile.ShapefileDataStore.createSchema(ShapefileDataStore.java:1003) at org.geotools.data.shapefile.ShapefileDataStore.createSchema(ShapefileDataStore.java:113) at ng2grace.ngtograce_0_1.NGToGrace.sShapefileInput_1_GIProcess(NGToGrace.java:2557) at ng2grace.ngtograce_0_1.NGToGrace.runJobInTOS(NGToGrace.java:3527) at ng2grace.ngtograce_0_1.NGToGrace.main(NGToGrace.java:3393)