-
Notifications
You must be signed in to change notification settings - Fork 268
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
Problems with Java 17 #377
Comments
Encountered the same issue, as a workaround you can set the following VM option --add-opens java.base/java.lang=ALL-UNNAMED |
Seems that this will be fixed in the 1.6.0 version. I'm waiting for that to release. |
+1 saw this with eclipse adoptium 17.0.1.12-hotspot. Reverted to openjdk11 and all was fine. |
Any plans on releasing 1.6.0? We use this library extensively and although the workaround is fine its not ideal. |
Hi, |
@elaatifi should we consider this project dead? |
Hi @oliverlockwood , you can see my comment from #372 . Unfortunately it seems dead to me for quite time. 😞 |
after set this ,not good |
I was upgrading an API to Java 17 when I faced exact same issue. In a desperate final attempt I changed the maven version from 3.3.9 to 3.8.5 and the error message changed to the following |
For those using the Gradle JIB-Plugin, solved it as follows: container {
jvmFlags = ['--add-opens=java.base/java.lang=ALL-UNNAMED', '-XX:+UseContainerSupport', '-XX:MaxRAMPercentage=75.0'] |
use below in your VM arg |
okay, seems to be dead. one year later, the 1.6.0 is not yet released. I'll go for another mapper-option. schade. |
Did you fix the issue? I'm still struggling with this issue... @wolfomat |
Hi Team, Any update on new version of orika core which is compatible with JDK17. I am facing same issue. |
Does anyone have experience using Orika mapper and GraalVM native image? |
Any updates on the existing issue? We need a mapper that uses reflections as we need run time mapping based on versioning logic of ours. Any new project or libraries that can be used which handles Java 17 and Spring Boot 3.0.6 and is managed actively. Thanks! |
Any updates ??? |
Unfortunately, no. I have been following Orika Mapper since the start of 2022. There are no updates rolling out. |
Hi I'm facing a similar issue using TMC Beans for the Helsinki MOOC in JAVA. How can I get to the VM Option to use the flag? Unable to make protected native java.lang.Object java.lang.Object.clone() throws java.lang.CloneNotSupportedException accessible: module java.base does not "opens java.lang" to unnamed module @3191379a [java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)] [java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)] [java.lang.reflect.Method.checkCanSetAccessible(Method.java:199)] |
Hello We are using a workaround since last year in order to migrate on jdk17 without --add-opens, this allow the depreciation of Orika without rushing because of jdk17, off course "use it with caution" The workaround is :
snippets : <dependency>
<groupId>ma.glasnost.orika</groupId>
<artifactId>orika-eclipse-tools</artifactId>
<version>1.5.4</version>
</dependency> @Deprecated(forRemoval = true)
public class BidouilleOrikaMapperFactory {
public static MapperFactory defaultMapperFactory() {
return new DefaultMapperFactory.Builder()
.useBuiltinConverters(false)
.converterFactory(new BidouilleOrikaConverterFactory())
.compilerStrategy(new BidouilleOrikaCompilerStrategy())
.build();
}
} @Deprecated(forRemoval = true)
public class BidouilleOrikaCompilerStrategy extends EclipseJdtCompilerStrategy {
@Override
protected void writeSourceFile(String sourceText, String packageName, String className) throws IOException {
}
} see https://github.com/orika-mapper/orika/blob/master/core/src/main/java/ma/glasnost/orika/converter/builtin/BuiltinConverters.java#L77 @Deprecated(forRemoval = true)
public class BidouilleOrikaConverterFactory extends DefaultConverterFactory {
public BidouilleOrikaConverterFactory() {
super();
this.registerConverter(new CopyByReferenceConverter());
this.registerConverter(new EnumConverter());
/*
* Register to/from string converters
*/
this.registerConverter(new FromStringConverter());
this.registerConverter(new ToStringConverter());
/*
* Register common date/time converters
*/
this.registerConverter(new DateAndTimeConverters.DateToXmlGregorianCalendarConverter());
this.registerConverter(new DateAndTimeConverters.DateToTimeConverter());
this.registerConverter(new DateAndTimeConverters.CalendarToXmlGregorianCalendarConverter());
this.registerConverter(new DateAndTimeConverters.XmlGregorianCalendarToTimestampConverter());
this.registerConverter(new DateAndTimeConverters.XmlGregorianCalendarToSqlDateConverter());
this.registerConverter(new DateAndTimeConverters.XmlGregorianCalendarToTimeConverter());
this.registerConverter(new DateAndTimeConverters.LongToXmlGregorianCalendarConverter());
this.registerConverter(new DateAndTimeConverters.DateToCalendarConverter());
this.registerConverter(new DateAndTimeConverters.CalendarToTimeConverter());
this.registerConverter(new DateAndTimeConverters.CalendarToSqlDateConverter());
this.registerConverter(new DateAndTimeConverters.LongToCalendarConverter());
this.registerConverter(new DateAndTimeConverters.TimestampToCalendarConverter());
this.registerConverter(new DateAndTimeConverters.DateToSqlDateConverter());
this.registerConverter(new DateAndTimeConverters.LongToSqlDateConverter());
this.registerConverter(new DateAndTimeConverters.TimeToSqlDateConverter());
this.registerConverter(new DateAndTimeConverters.TimestampToSqlDateConverter());
this.registerConverter(new DateAndTimeConverters.LongToTimeConverter());
this.registerConverter(new DateAndTimeConverters.TimestampToTimeConverter());
this.registerConverter(new DateAndTimeConverters.LongToTimestampConverter());
this.registerConverter(new DateAndTimeConverters.DateToTimestampConverter());
this.registerConverter(new DateAndTimeConverters.LongToDateConverter());
/*
* Register numeric type converter
*/
this.registerConverter(new NumericConverters.BigDecimalToDoubleConverter());
this.registerConverter(new NumericConverters.BigDecimalToFloatConverter());
this.registerConverter(new NumericConverters.BigIntegerToIntegerConverter(false));
this.registerConverter(new NumericConverters.BigIntegerToLongConverter(false));
this.registerConverter(new NumericConverters.IntegerToShortConverter(false));
this.registerConverter(new NumericConverters.LongToIntegerConverter(false));
this.registerConverter(new NumericConverters.LongToShortConverter(false));
this.registerConverter(new NumericConverters.FloatToShortConverter(false));
this.registerConverter(new NumericConverters.FloatToIntegerConverter(false));
this.registerConverter(new NumericConverters.FloatToLongConverter(false));
this.registerConverter(new NumericConverters.DoubleToShortConverter(false));
this.registerConverter(new NumericConverters.DoubleToIntegerConverter(false));
this.registerConverter(new NumericConverters.DoubleToLongConverter(false));
/*
* Register converter to instantiate by using a constructor on the
* destination which takes the source as argument
*/
this.registerConverter(new ConstructorConverter());
}
} |
Hello All, Any updates for a new Orika release? |
So I tried my code with Java 17 and I get this exception:
The text was updated successfully, but these errors were encountered: