0

I have installed gvnix geo-petclinic example over JBoss AS 7.3 and Oracle 11g without problems.

But when I access the screen Maps -> Mapview I get this error in logs:

16:55:17,624 WARN [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (http-localhost/127.0.0.1:8080-4) SQL Error: 6553, SQLState: 65000

16:55:17,624 ERROR [org.hibernate.engine.jdbc.spi.SqlExceptionHelper] (http-localhost/127.0.0.1:8080-4) ORA-06553: PLS-306: número o tipos de argumentos erróneos al llamar a 'FROM_SDO_GEOM'

Reviewing code in "src/main/java/org/gvnix/domain/Owner_Roo_GvNIXEntityMapLayer.aj", I update the following method and running fine.

public static List<Owner> Owner.findAllOwnersByBoundingBox(String bbox) {
    TypedQuery<Owner> q = entityManager().createQuery("SELECT o FROM Owner o WHERE  intersects(o.location, :bbox) = true OR  intersects(o.distance, :bbox) = true OR  intersects(o.area, :bbox) = true ", Owner.class);
    //q.setParameter("bbox", String.format("POLYGON((%s))", bbox));
     
    WKTReader fromText = new WKTReader();
    Geometry geom = null;
     try {
        geom = fromText.read(String.format("POLYGON((%s))", bbox));
    } catch (ParseException e) {
         throw new RuntimeException("Not a WKT string:" + bbox);
    }        
    q.setParameter("bbox", geom);
    return q.getResultList();
}

It is a bug in gvNIX? Maybe it could fix for the next version

Community
  • 1
  • 1
jperez82
  • 21
  • 3
  • Have you installed Oracle Spatial? – eruiz Feb 04 '15 at 19:11
  • Yes, I installed Oracle Spatial, and I have verified that correctly inserted into the column location. Also to access the screen details of an owner, are well shows the locations on the map. It is in the screen Map -> mapviewer where it fails. – jperez82 Feb 04 '15 at 19:40
  • 1
    Yes, it seems a bug. You should create the issue in the gvNIX project's bug tracker (https://github.com/DISID/gvnix/issues) – eruiz Feb 05 '15 at 06:43
  • The issue already created: https://github.com/DISID/gvnix/issues/4 – jperez82 Feb 05 '15 at 08:22

0 Answers0