could it be that you are trying to access the method from outside because it is a private method?
Michaël Michaud schrieb: > Hi, > > This one is very strange. Line 115 seems OK to me. > And constructor LinearComponentExtracter(Collection list) does exist in > JTS 1.11 > > About NoSuchMethodException, javadoc says : > Normally, this error is caught by the compiler; this error can only > occur at run time if the definition of a class has incompatibly changed. > > Notice that LinearComponentExtracter signature has changed from > LinearComponentExtracter(List) to LinearComponentExtracter(Collection) > in JTS 1.11 > (but it still should work) > > You can try to get your linestring elements from one of the new static > methods in LinearComponentExtracter > > Good luck > > Michaël > > > luca marletta a écrit : >> Hi, >> I start to develop a plugin that is a sort of enrichment of >> LineNoderPlugin so I copied code and arrange environment, and test it >> without change >> >> when I execute the code I got this error >> >> java.lang.NoSuchMethodError: >> com.vividsolutions.jts.geom.util.LinearComponentExtracter.<init>(Ljava/util/List;)V >> at >> it.beopen.dbtopo.Tools.LineNoderPlugIn.getLines(LineNoderPlugIn.java:115) >> at it.beopen.dbtopo.Tools.LineNoderPlugIn.run(LineNoderPlugIn.java:95) >> at >> com.vividsolutions.jump.workbench.ui.task.TaskMonitorManager$TaskWrapper.run(TaskMonitorManager.java:151) >> at java.lang.Thread.run(Thread.java:619) >> >> >> here the 115 line >> >> private Collection getLines(Collection inputFeatures) >> { >> List linesList = new ArrayList(); >> LinearComponentExtracter lineFilter = new >> LinearComponentExtracter(linesList); <<<< 115 line >> for (Iterator i = inputFeatures.iterator(); i.hasNext(); ) { >> Feature f = (Feature) i.next(); >> Geometry g = f.getGeometry(); >> g.apply(lineFilter); >> } >> return linesList; >> } >> >> and I have >> import com.vividsolutions.jts.geom.util.LinearComponentExtracter; >> >> correctly loaded and without any error or warning in eclipse >> >> to be sure I added jts from 7 to 11, all >> but it seems that the method doesn't exist >> >> when I compile from svn whit the same external lib >> jump-pilot/core/trunk/src/com/vividsolutions/jump/plugin/edit/LineNoderPlugIn.java >> >> there is no problem and it works >> >> is there another jar to import that is present in svn? >> >> could some one help >> >> today I need to my cent for bothering the list >> >> thanks a lot >> >> luca >> >> >> luca marletta >> www.beopen.it >> >> ------------------------------------------------------------------------------ >> >> _______________________________________________ >> Jump-pilot-devel mailing list >> Jump-pilot-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel >> >> >> > > > ------------------------------------------------------------------------------ > > _______________________________________________ > Jump-pilot-devel mailing list > Jump-pilot-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel > > ------------------------------------------------------------------------------ _______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel