0

我已经在 J​​Boss AS 7.3 和 Oracle 11g 上安装了 gvnix geo-petclinic 示例,没有任何问题。

但是当我访问屏幕 Maps -> Mapview 时,我在日志中收到此错误:

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

16:55:17,624 错误 [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'

查看“src/main/java/org/gvnix/domain/Owner_Roo_GvNIXEntityMapLayer.aj”中的代码,我更新了以下方法并运行良好。

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();
}

这是gvNIX中的一个错误?也许它可以修复下一个版本

4

0 回答 0