One Star

a problem with"Duplicate local variable currentGeom"

Hello,everyone
i'm a new here.
and now i would like to make an intersection between two shapefile with ?tMap?,
One is the territorial boundary (polygon),
And the other one is the distribution of the customers (point) which are converted from a CSV.
here is the expression that i use: GeoOperation.INTERSECTS(row7.the_geom,row6.the_geom )
but i met a problem:
Duplicate local variable currentGeom
Duplicate local variable currentGeomType
Does anyone can help me ?
sorry for my poor english...
Thanks
Miao
7 REPLIES
One Star

Re: a problem with"Duplicate local variable currentGeom"

Hi Miao
Welcome to Talend Community!
I'm afraid this issue is due to your custom routine.
Click "Code" tag and check the source code of this job.
Or attach this export job and email me.
Regards,
Pedro
One Star

Re: a problem with"Duplicate local variable currentGeom"

Hi Miao
Welcome to Talend Community!
I'm afraid this issue is due to your custom routine.
Click "Code" tag and check the source code of this job.
Or attach this export job and email me.
Regards,
Pedro

hello Pedro,
thank you for your help,
but I can't export my job, it seems that there are some compile errors, and I have to fix them before I export the job.
and I have saw the code, it's very complicated, I think that I am not able to fix it.
there are the two lines where are the problems :
Geometry currentGeom = row_sShapefileOutput_2_FI.the_geom;
String currentGeomType = currentGeom

Can you tell me what can I do now??
Thank you very much
and Best regards,
Miao
One Star

Re: a problem with"Duplicate local variable currentGeom"

Hi Miao
I have replied your email.
Do you receive it?
Regards,
Pedro
One Star

Re: a problem with"Duplicate local variable currentGeom"

Hi
After I debug the java code in your job, I think this issue is due to sShapeFileOutput.
When you use it twice, it will duplicate variables "currentGeom", "currentGeomType".
You'd better correct this custom component.
Regards,
Pedro
One Star

Re: a problem with"Duplicate local variable currentGeom"

hi
i have a feedback for you.
since I have deactivated one of the two "sShapeFileOutput", and I've reactivated it;
and finally my job worked; And I've got both of the Shapefile.
I don't understand why, but it works now.
thank you for your help,
Miao
Hi
After I debug the java code in your job, I think this issue is due to sShapeFileOutput.
When you use it twice, it will duplicate variables "currentGeom", "currentGeomType".
You'd better correct this custom component.
Regards,
Pedro
One Star

Re: a problem with"Duplicate local variable currentGeom"

Hi Miao
Thank you for your feedback.
Still this must be due to this custom component.
Anyway. Glad to know It works fine. Smiley Wink
Regards,
Pedro
Four Stars

Re: a problem with"Duplicate local variable currentGeom"

Hi
I have error like "Duplicate local variable murl" while trying to delete a record using tMDMDelete component.
Please let me know if anyone have solution for this.
Thanks
Praneeth