You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2021/04/08 14:15:54 UTC

[GitHub] [camel-quarkus] JiriOndrusek opened a new pull request #2453: camel-quarkus-dozer Error when running native executable #2449

JiriOndrusek opened a new pull request #2453:
URL: https://github.com/apache/camel-quarkus/pull/2453


   fixes https://github.com/apache/camel-quarkus/issues/2449
   
    `java.util.Date` has to be registered for reflection as was reported.
   
   There are several another classes, which has to be registered for reflection. Classes are used for conversion from `String` via `StringConstructorConverter`. (You can see required types in dozer [code](https://github.com/DozerMapper/dozer/blob/master/core/src/test/java/com/github/dozermapper/core/functional_tests/builder/PrimitiveTest.java#L138-L140)). Without these registration, there would be the following errors in native mode
   
   > java.lang.NoSuchMethodException: java.net.URL.<init>(java.lang.String)
   > java.lang.NoSuchMethodException: java.io.File.<init>(java.lang.String)
   
   All cases are covered by unit tests. 
   
   [ ] An issue should be filed for the change unless this is a trivial change (fixing a typo or similar). One issue should ideally be fixed by not more than one commit and the other way round, each commit should fix just one issue, without pulling in other changes.
   [ ] Each commit in the pull request should have a meaningful and properly spelled subject line and body. Copying the title of the associated issue is typically enough. Please include the issue number in the commit message prefixed by #.
   [ ] The pull request description should explain what the pull request does, how, and why. If the info is available in the associated issue or some other external document, a link is enough.
   [ ] Phrases like Fix #<issueNumber> or Fixes #<issueNumber> will auto-close the named issue upon merging the pull request. Using them is typically a good idea.
   [ ] Please run mvn process-resources -Pformat (and amend the changes if necessary) before sending the pull request.
   [ ] Contributor guide is your good friend: https://camel.apache.org/camel-quarkus/latest/contributor-guide.html


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] aldettinger merged pull request #2453: camel-quarkus-dozer Error when running native executable #2449

Posted by GitBox <gi...@apache.org>.
aldettinger merged pull request #2453:
URL: https://github.com/apache/camel-quarkus/pull/2453


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] JiriOndrusek commented on a change in pull request #2453: camel-quarkus-dozer Error when running native executable #2449

Posted by GitBox <gi...@apache.org>.
JiriOndrusek commented on a change in pull request #2453:
URL: https://github.com/apache/camel-quarkus/pull/2453#discussion_r610559542



##########
File path: extensions/dozer/deployment/src/main/java/org/apache/camel/quarkus/component/dozer/deployment/DozerProcessor.java
##########
@@ -110,6 +110,9 @@ void configureCamelDozer(BuildProducer<ReflectiveClassBuildItem> reflectiveClass
                 Time[].class,
                 Timestamp[].class,
                 URL[].class,
+                Date.class,
+                File.class,
+                URL.class,

Review comment:
       @aldettinger 
   Date is required for https://github.com/DozerMapper/dozer/blob/master/core/src/main/java/com/github/dozermapper/core/converters/DateConverter.java.
   The other classes are special. You can see them for example here: https://github.com/DozerMapper/dozer/blob/master/core/src/test/java/com/github/dozermapper/core/functional_tests/builder/PrimitiveTest.java#L138-L140. No other classes should be required. Other classes are dynamically registered by DozerProcessor.
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] aldettinger commented on a change in pull request #2453: camel-quarkus-dozer Error when running native executable #2449

Posted by GitBox <gi...@apache.org>.
aldettinger commented on a change in pull request #2453:
URL: https://github.com/apache/camel-quarkus/pull/2453#discussion_r610539093



##########
File path: extensions/dozer/deployment/src/main/java/org/apache/camel/quarkus/component/dozer/deployment/DozerProcessor.java
##########
@@ -110,6 +110,9 @@ void configureCamelDozer(BuildProducer<ReflectiveClassBuildItem> reflectiveClass
                 Time[].class,
                 Timestamp[].class,
                 URL[].class,
+                Date.class,
+                File.class,
+                URL.class,

Review comment:
       I'm quite beginner with dozer :) Is there really a finished set of classes to be registered as native ? Won't we end up registering every new classes that developers would eventually use in their scenarios ?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] aldettinger commented on a change in pull request #2453: camel-quarkus-dozer Error when running native executable #2449

Posted by GitBox <gi...@apache.org>.
aldettinger commented on a change in pull request #2453:
URL: https://github.com/apache/camel-quarkus/pull/2453#discussion_r610573409



##########
File path: extensions/dozer/deployment/src/main/java/org/apache/camel/quarkus/component/dozer/deployment/DozerProcessor.java
##########
@@ -110,6 +110,9 @@ void configureCamelDozer(BuildProducer<ReflectiveClassBuildItem> reflectiveClass
                 Time[].class,
                 Timestamp[].class,
                 URL[].class,
+                Date.class,
+                File.class,
+                URL.class,

Review comment:
       ok, I see looks good :+1: 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] JiriOndrusek commented on a change in pull request #2453: camel-quarkus-dozer Error when running native executable #2449

Posted by GitBox <gi...@apache.org>.
JiriOndrusek commented on a change in pull request #2453:
URL: https://github.com/apache/camel-quarkus/pull/2453#discussion_r610560389



##########
File path: extensions/dozer/deployment/src/main/java/org/apache/camel/quarkus/component/dozer/deployment/DozerProcessor.java
##########
@@ -110,6 +110,9 @@ void configureCamelDozer(BuildProducer<ReflectiveClassBuildItem> reflectiveClass
                 Time[].class,
                 Timestamp[].class,
                 URL[].class,
+                Date.class,
+                File.class,
+                URL.class,

Review comment:
       I also added a custom class into the test to be sure, that there is no need to register it.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org