apache / camel-quarkus

Apache Camel Quarkus
https://camel.apache.org
Apache License 2.0
251 stars 186 forks source link

Cannot register java.lang. classes via quarkus.camel.native.reflection.include-patterns #2969

Open ppalaga opened 2 years ago

ppalaga commented 2 years ago

https://github.com/apache/camel-k/pull/2536#issuecomment-889857056

The problem is that JRE classes are not available in Jandex.

ppalaga commented 2 years ago

This hint from @mkouba might be useful:

if you need to index JDK classes you can try to use CombinedIndexBuildItem.getComputingIndex() or BeanArchiveIndexBuildItem.getIndex() which is computing by default computing means that if not found the class is additionaly indexed and cached, so that the next time you request the class a cache entry can be used oh and I forgot to mention that not all operations perform the additional computation ofc e.g. getClassByName() does but getKnownClasses() does not... for obvious reasons ;-)