unitsofmeasurement / indriya

JSR 385 - Reference Implementation
Other
118 stars 40 forks source link

Add support for GeoTools #263

Closed shalomcrown closed 3 years ago

shalomcrown commented 4 years ago

Trying to use GeoTools with uom-se, I get an exception: java.lang.NoSuchMethodError: tec.uom.se.format.SimpleUnitFormat.getInstance()Ltec/uom/se/format/SimpleUnitFormat

keilw commented 4 years ago

Not sure, what would be special in GeoTools making this happen. @desruisseaux any idea? Could you provide a sample code where this happens?

desruisseaux commented 4 years ago

I haven't checked. But if not already done, I suggest to run mvn dependency:tree, search for occurrences of unit-api and verify that they are all the same version.

keilw commented 4 years ago

That's a good point, has GeoTools already upgraded to either Indriya 1.x or 2.x via JSR 385?

ddcruver commented 4 years ago

GeoTools upgrade from JSR 276 (which was rejected before it was finished) to JSR-363.

JSR 363 is known as Units 1.0. JSR-385 is Units 2.0

Indriya 2.0 is the reference implementation for JSR-385. I don't thnk Indriya 1.0 really exist, I think it started at 2.0 to avoid it being confused as a Unit 1.0 implementation.

keilw commented 4 years ago

There is an Indriya 1.x, the most recent version is 1.3, but until 2.0 it implements JSR 363, it is a backport allowing easier transition towards Indriya 2.

keilw commented 4 years ago

Is there still an action item here?

tianhongguo commented 4 years ago

Trying to use GeoTools with uom-se, I get an exception: java.lang.NoSuchMethodError: tec.uom.se.format.SimpleUnitFormat.getInstance()Ltec/uom/se/format/SimpleUnitFormat

hello!I had the same problem!Have you solved it?if yes, Tell me how to solve it!Thanks!

keilw commented 4 years ago

You should not use uom-se anymore, If you can't change to Unit-API 2.0 yet although it has been available and Final for over a year, please use Indriya 1.3, that is the latest JSR 363 implementation.

keilw commented 3 years ago

Is this related to #316?