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

ByteBuffer error in binary version 5.29.1 on Windows Server 2019 #1291

Open
Codevya opened this issue Jan 30, 2023 · 1 comment
Open

ByteBuffer error in binary version 5.29.1 on Windows Server 2019 #1291

Codevya opened this issue Jan 30, 2023 · 1 comment

Comments

@Codevya
Copy link

Codevya commented Jan 30, 2023

Describe the bug
Although it works fine on Windows 10/11 and Linux, the latest version of the binary gives the following error:

Exception in thread "main" java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
at org.dcm4che3.tool.jpg2dcm.Jpg2Dcm.copy(Jpg2Dcm.java:287)
at org.dcm4che3.tool.jpg2dcm.Jpg2Dcm.convert(Jpg2Dcm.java:272)
at org.dcm4che3.tool.jpg2dcm.Jpg2Dcm.convert(Jpg2Dcm.java:203)
at org.dcm4che3.tool.jpg2dcm.Jpg2Dcm.main(Jpg2Dcm.java:134)

To Reproduce
Steps to reproduce the behavior:

  1. Use bare metal windows server 2019
  2. launch jpg2dcm.bat from powershell
  3. Get the error
  4. dicom file is still created but unreadable

Screenshots
image

Desktop (please complete the following information):

  • OS: Windows server 2019 Standard Edition

Additional context
Using the version 5.29.0 works fine out of the box

@nroduit
Copy link
Member

nroduit commented Apr 16, 2023

I guess it's related to this issue and that using Java 8 is the cause.

The solution is to either upgrade to Java 11 or 17 or propose a code fix using StreamUtils.safeBufferType(bb).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants