[Gvsig_desarrolladores] problemas migración de extension de 1.1.2 a 1.11

Antonio Araque antonio.araque en e-sig.es
Mar Jul 12 10:54:13 CEST 2011


Me autocorrijo, he puesto que debería estar en la extensión extJDBC (un
lapsus…) y quería decir extGDBMS.

 

De: gvsig_desarrolladores-bounces en listserv.gva.es
[mailto:gvsig_desarrolladores-bounces en listserv.gva.es] En nombre de Antonio
Araque
Enviado el: martes, 12 de julio de 2011 10:10
Para: 'Lista de Desarrolladores de gvSIG'
Asunto: [Gvsig_desarrolladores] problemas migración de extension de 1.1.2 a
1.11

 

Buenas!!!!

 

Estoy intentando migrar una extensión que ya tenia desarrollada para la
versión 1.1.2, a la actual versión estable 1.11. Antes de tirarme “al barro”
he optado por coger un ejemplo del manual de desarrolladores y probarlo
sobre la versión 1.11, pero me aparecen una serie de problemas. Después de
quitarle una serie de errores que eran evidentes, por el tema de los
import…., me aparecen otros errores que no consigo quitar:

 

//@Override

      public void point(PointEvent event) throws BehaviorException {

            ViewPort vp = mc.getViewPort();

            Point2D pReal = vp.toMapPoint(event.getPoint());

 

        FLayers lyrs = mc.getMapContext().getLayers();

        FLyrVect lyrProvin = (FLyrVect) lyrs.getLayer("Provin.shp");      

        //try {

            SelectableDataSource ds =lyrProvin.getRecordset(); //error: The
method getRecordset() from the type FLyrVect refers to the missing type
ReadDriverException

            int idField = ds.getFieldIndexByName("NOM_PROVIN"); //error: The
method getFieldIndexByName(String) from the type SelectableDataSource refers
to the missing type ReadDriverException

            

                  FBitSet bs = lyrProvin.queryByPoint(pReal, 10.0); //error:
The method queryByPoint(Point2D, double) from the type FLyrVect refers to
the missing type ReadDriverException 

                  if (dlg == null)

                  {

                        dlg = new DlgProvin();                   

                  }

                  dlg = (DlgProvin)
PluginServices.getMDIManager().addWindow(dlg);

                  for (int i=bs.nextSetBit(0); i >=0; i=bs.nextSetBit(i+1))

                  {

                        long idRec = i;

                        String nom = ds.getFieldValue(idRec,
idField).toString(); // The method getFieldValue(long, int) from the type
SelectableDataSource refers to the missing type Value

                        dlg.setProvinName(nom);

                  }

 

            /*} catch (DriverLoadException e) {

                  e.printStackTrace();

                  NotificationManager.addError(e);

            }*/

 

            

            

      }

 

 

Si despliego los errores, me aparece algo como esto:

 

Multiple markers at this line

                - The type
com.hardcode.gdbms.driver.exceptions.ReadDriverException cannot be resolved.
It is indirectly referenced from 

                 required .class files

                - The method getRecordset() from the type FLyrVect refers to
the missing type ReadDriverException.

 

La solución que se me ocurre es añadir al Build Path la librería
com.hardcode.gdbms.driver, que debería estar alojada en extJDBC, pero
nada…sigue sin funcionar.

 

Alguien sabe como limpiar esos errores??

 

Gracias.

 

Antonio Araque.

------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: http://listserv.gva.es/pipermail/gvsig_desarrolladores/attachments/20110712/8f2f5ab6/attachment.htm 


Más información sobre la lista de distribución gvSIG_desarrolladores