Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jackson Serialization fails on 2.2 #80

Open
fref opened this issue Jul 6, 2023 · 10 comments
Open

Jackson Serialization fails on 2.2 #80

fref opened this issue Jul 6, 2023 · 10 comments
Labels
dependencies Pull requests that update a dependency file
Milestone

Comments

@fref
Copy link

fref commented Jul 6, 2023

java.lang.NoSuchFieldException: DEKA
	at java.base/java.lang.Class.getField(Class.java:1999)
	at tech.units.indriya.format.SymbolMap.<init>(SymbolMap.java:117)
	at tech.units.indriya.format.SymbolMap.of(SymbolMap.java:143)
	at systems.uom.ucum.format.UCUMFormat$Parsing.<clinit>(UCUMFormat.java:432)
	at systems.uom.ucum.format.UCUMFormat.getInstance(UCUMFormat.java:110)
	at tech.uom.lib.jackson.UnitJacksonModule$UnitJsonSerializer.serialize(UnitJacksonModule.java:128)
	at tech.uom.lib.jackson.UnitJacksonModule$UnitJsonSerializer.serialize(UnitJacksonModule.java:105)

this comes from (javax.measure.MetricPrefix from unit-api-2.2)

    /**
     * US alias for <code>DECA</code>.
     *
     * @param <Q>
     *          type of the quantity measured by the unit.
     * @param unit
     *          any unit.
     * @return <code>unit.times(1e1)</code>.
     * @see #DECA
     */
    public static <Q extends Quantity<Q>> Unit<Q> DEKA(Unit<Q> unit) {
        return unit.prefix(DECA);
    }
@keilw keilw added the dependencies Pull requests that update a dependency file label Jul 7, 2023
@keilw keilw added this to the 2.2 milestone Jul 7, 2023
keilw added a commit that referenced this issue Jul 7, 2023
Updated released dependencies in snapshot
Task-Url: #80
@keilw
Copy link
Member

keilw commented Jul 7, 2023

This needs uom-systems #200 to be done first. As there are no other critical issues in the 2.2 milestone, it should be possible to release it relatively soon, but please give it a few more days. Then the Jackson library also needs a 2.2 based on the 2.2 stack.
In the meantime, please use 2.2-SNAPSHOT of uom-lib-jackson from the snapshot repository. The latest snapshot builds already use the 2.2 final API and RI.

@fref
Copy link
Author

fref commented Jul 12, 2023

Ok. Anything I can do to help?

@hypersonik
Copy link

This needs uom-systems #200 to be done first. As there are no other critical issues in the 2.2 milestone, it should be possible to release it relatively soon, but please give it a few more days. Then the Jackson library also needs a 2.2 based on the 2.2 stack. In the meantime, please use 2.2-SNAPSHOT of uom-lib-jackson from the snapshot repository. The latest snapshot builds already use the 2.2 final API and RI.

Where can I find the snapshot?, it is not available in maven repository, AFAIK.
I don't want to rush you, please take your time, but if there is a snapshot elsewhere I'd like to use it meanwhile.

@keilw
Copy link
Member

keilw commented Jan 15, 2024

It is available in its own SNAPSHOT Repository:

<repository>
      <snapshots>
           <enabled>true</enabled>
       </snapshots>
       <id>ossrh-snapshot</id>
       <name>OSSRH Snapshots</name>
       <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</repository>

You have to add that to your POM.

@lucasvc
Copy link

lucasvc commented Aug 7, 2024

This needs uom-systems #200 to be done first. As there are no other critical issues in the 2.2 milestone, it should be possible to release it relatively soon, but please give it a few more days. Then the Jackson library also needs a 2.2 based on the 2.2 stack. In the meantime, please use 2.2-SNAPSHOT of uom-lib-jackson from the snapshot repository. The latest snapshot builds already use the 2.2 final API and RI.

Has been a year, would be possible to do the milestone release?
Thanks.

@keilw
Copy link
Member

keilw commented Aug 15, 2024

The issue uom-systems #200 is still open, but hope we can deal with it soon. As the active ressources are a bit small, help is always appreciated.

keilw added a commit that referenced this issue Aug 18, 2024
@keilw
Copy link
Member

keilw commented Aug 18, 2024

There have been issues with MavenCentral, but we can deploy there again.
Hopefully that'll get SI Units first released. After that UOM-Systems can follow, and then a new release of uom-libs like Jackson will be possible.

@lucasvc
Copy link

lucasvc commented Aug 24, 2024

The issue uom-systems #200 is still open, but hope we can deal with it soon. As the active ressources are a bit small, help is always appreciated.

Oh sorry, I wrongly understood that this issue could be solved without the other one.

Thanks for taking care anyway <3

@fref
Copy link
Author

fref commented Sep 26, 2024

unitsofmeasurement/uom-systems#200 is about the SI QUETTA, RONNA, QUECTO, RONTO,

but this is about the fact that in the resource bundle of UCUM, we have:
javax.measure.MetricPrefix.DEKA = da

DEKA, documented as a US alias of DECA, in javax.measure.MetricPrefix is a method, but not an enum value

@keilw
Copy link
Member

keilw commented Sep 26, 2024

Yes, that will be changed with 2.2.
DEKA is an alias method, but we do not want to pollute or confuse the number of prefixes by keeping it as an enum.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

No branches or pull requests

4 participants