首页 / 浏览问题 / 组件GIS / 问题详情
本地IDEA测试BDT方法报错
4EXP 2024年03月21日
请问该问题是怎样导致的,该如何解决。

报错信息如下

Exception in thread "main" java.lang.VerifyError: Bad type on operand stack
Exception Details:
  Location:
    org/geotools/jdbc/JDBCDataStore.mergeEnvelope(Lorg/geotools/geometry/jts/ReferencedEnvelope;Lorg/geotools/geometry/jts/ReferencedEnvelope;)Lorg/geotools/geometry/jts/ReferencedEnvelope; @43: invokevirtual
  Reason:
    Type 'org/geotools/geometry/jts/ReferencedEnvelope' (current frame, stack[1]) is not assignable to 'org/locationtech/jts/geom/Envelope'
  Current Frame:
    bci: @43
    flags: { }
    locals: { 'org/geotools/jdbc/JDBCDataStore', 'org/geotools/geometry/jts/ReferencedEnvelope', 'org/geotools/geometry/jts/ReferencedEnvelope', 'org/opengis/referencing/crs/CoordinateReferenceSystem', 'org/opengis/referencing/crs/CoordinateReferenceSystem' }
    stack: { 'org/geotools/geometry/jts/ReferencedEnvelope', 'org/geotools/geometry/jts/ReferencedEnvelope' }
  Bytecode:
    0x0000000: 2bc6 000a 2bb6 04ab 9900 052c b02c c600
    0x0000010: 0a2c b604 ab99 0005 2bb0 2bb6 04ac 4e2c
    0x0000020: b604 ac3a 042d c700 0a2c 2bb6 04b0 2cb0
    0x0000030: 1904 c700 0a2b 2bb6 04b0 2bb0 2d19 04b8
    0x0000040: 04b4 9a00 0a2c 2d04 b604 b84d 2b2c b604
    0x0000050: b02b b0                                
  Stackmap Table:
    same_frame(@11)
    same_frame(@13)
    same_frame(@24)
    same_frame(@26)
    append_frame(@48,Object[#1123],Object[#1123])
    same_frame(@60)
    same_frame(@76)

    at org.geotools.jdbc.JDBCDataStoreFactory.createDataStore(JDBCDataStoreFactory.java:298)
    at org.geotools.jdbc.JDBCDataStoreFactory.createDataStore(JDBCDataStoreFactory.java:49)
    at org.geotools.data.DataAccessFinder.getDataStore(DataAccessFinder.java:130)
    at org.geotools.data.DataStoreFinder.getDataStore(DataStoreFinder.java:89)
    at com.supermap.bdt.rddprovider.jdbc.PostGISFeatureRDDProvider.rdd(PostGISFeatureRDDProvider.scala:53)
    at OperateData.loadPGFrddData(OperateData.scala:309)
    at MainMethod$.main(MainMethod.scala:44)
    at MainMethod.main(MainMethod.scala)

1个回答

您好,您那边使用的BDT的版本是多少呢?调试代码看下是哪句代码抛的异常?
9,242EXP 2024年03月21日

版本是11.0.1

1.代码里面的连接参数在iDesktopX桌面软件里面试试看是否能正常打开?

2.工程里面或者计算机是否有依赖其他geotools的相关依赖,造成冲突?

3.确定下Scala和spark的版本是多少?
...