Skip to content

WARNING: An illegal reflective access operation has occurred #3765

@rdpagft

Description

@rdpagft

In what version(s) of Spring Integration are you seeing this issue?

For example:

5.3.18.RELEASE

Describe the bug

When I annotated with @MessagingGateway my interface and run my component I got "WARNING: An illegal reflective access operation has occurred".

To Reproduce

@MessagingGateway(defaultRequestChannel = "cesvivinOutboundChannel")
public interface CesvivinOutboundPort {
void produce (final Cesvivin cesvivin);
}

@configuration
public class CesvivinOutboundConfig {

/**

  • Nombre de la suscripción del tópico para registrar alta de robo.
    */
    @value("${topic.cesvivn.name}")
    private String topic;

/**

  • Método que configura un bean como estrategia de canal.
  • @return Una lista {@link List} de objetos tipo {@link MessageChannel}.
    */
    @bean
    public MessageChannel cesvivinOutboundChannel () {
    return new PublishSubscribeChannel();
    }

/**

  • Método que configura un bean como para adaptar el canal de salida.
  • @param pubSubTemplate Implementación de patrón template para suscribir o publicar objetos en el contexto de Cloud Pub/Sub.
  • @return Una instancia de tipo {@link MessageHandler}.
    */
    @bean
    @serviceactivator(inputChannel = "cesvivinOutboundChannel")
    public MessageHandler sender (final PubSubTemplate pubSubTemplate) {
    return new PubSubMessageHandler(pubSubTemplate, topic);
    }

/**

  • Método que configura un bean como estrategia de serialización entre objetos java y cadenas que provienen del payload de mensajes.
  • @return Una instancia de tipo {@link PubSubMessageConverter}.
    */
    @bean
    public PubSubMessageConverter pubSubMessageConverter () {
    return new JacksonPubSubMessageConverter(new ObjectMapper());
    }
    }

Expected behavior

$ ./gradlew bootRun

Task :bootRun
2022-04-01 18:32:54.447 INFO 32112 --- [ main] m.c.a.o.v.AmisOcraVehiculosApplication : Starting AmisOcraVehiculosApplication using Java 11.0.12 on GFT-LdMkK0zFBuM with PID 32112 (C:\Users\rdpa\Documents\amis-ocra-vehiculos\build\classes\java\main started by rdpa in C:\Users\rdpa\Documents\amis-ocra-vehiculos)
2022-04-01 18:32:54.451 INFO 32112 --- [ main] m.c.a.o.v.AmisOcraVehiculosApplication : No active profile set, falling back to 1 default profile: "default"
2022-04-01 18:32:55.339 INFO 32112 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Multiple Spring Data modules found, entering strict repository configuration mode!
2022-04-01 18:32:55.341 INFO 32112 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data Redis repositories in DEFAULT mode.
2022-04-01 18:32:55.357 INFO 32112 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 7 ms. Found 0 Redis repository interfaces.
2022-04-01 18:32:55.465 INFO 32112 --- [ main] faultConfiguringBeanFactoryPostProcessor : No bean named 'errorChannel' has been explicitly defined. Therefore, a default PublishSubscribeChannel will be created.
2022-04-01 18:32:55.473 INFO 32112 --- [ main] faultConfiguringBeanFactoryPostProcessor : No bean named 'integrationHeaderChannelRegistry' has been explicitly defined. Therefore, a default DefaultHeaderChannelRegistry will be created.
2022-04-01 18:32:55.568 INFO 32112 --- [ main] o.s.cloud.context.scope.GenericScope : BeanFactory id=8e8d7b38-bea2-3475-b570-a65eddb385d4
2022-04-01 18:32:55.611 INFO 32112 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'validationConfig' of type [mx.com.amis.ocra.chasis.config.ValidationConfig$$EnhancerBySpringCGLIB$$6e2fb28e] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2022-04-01 18:32:55.622 INFO 32112 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'validator' of type [org.springframework.validation.beanvalidation.LocalValidatorFactoryBean] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2022-04-01 18:32:55.815 INFO 32112 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'integrationChannelResolver' of type [org.springframework.integration.support.channel.BeanFactoryChannelResolver] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2022-04-01 18:32:55.834 INFO 32112 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.integration.config.IntegrationManagementConfiguration' of type [org.springframework.integration.config.IntegrationManagementConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2022-04-01 18:32:56.392 INFO 32112 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8005 (http)
2022-04-01 18:32:56.399 INFO 32112 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2022-04-01 18:32:56.400 INFO 32112 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.60]
2022-04-01 18:32:56.497 INFO 32112 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2022-04-01 18:32:56.497 INFO 32112 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 2003 ms
2022-04-01 18:32:57.256 INFO 32112 --- [ main] o.s.s.web.DefaultSecurityFilterChain : Will not secure any request
2022-04-01 18:32:57.344 INFO 32112 --- [ main] c.g.c.s.a.c.GcpContextAutoConfiguration : The default project ID is amis-ocra-dev
2022-04-01 18:32:57.369 WARN 32112 --- [ main] c.g.a.oauth2.DefaultCredentialsProvider : Your application has authenticated using end user credentials from Google Cloud SDK. We recommend that most server applications use service accounts instead. If your application continues to use end user credentials from Cloud SDK, you might receive a "quota exceeded" or "API not enabled" error. For more information about service accounts, see https://cloud.google.com/docs/authentication/.
2022-04-01 18:32:57.372 INFO 32112 --- [ main] c.g.c.s.core.DefaultCredentialsProvider : Default credentials provider for user 764086051850-6qr4p6gpi6hn506pt8ejuq83di341hur.apps.googleusercontent.com
2022-04-01 18:32:57.372 INFO 32112 --- [ main] c.g.c.s.core.DefaultCredentialsProvider : Scopes in use by default credentials: [https://www.googleapis.com/auth/pubsub, https://www.googleapis.com/auth/spanner.admin, https://www.googleapis.com/auth/spanner.data, https://www.googleapis.com/auth/datastore, https://www.googleapis.com/auth/sqlservice.admin, https://www.googleapis.com/auth/devstorage.read_only, https://www.googleapis.com/auth/devstorage.read_write, https://www.googleapis.com/auth/cloudruntimeconfig, https://www.googleapis.com/auth/trace.append, https://www.googleapis.com/auth/cloud-platform, https://www.googleapis.com/auth/cloud-vision, https://www.googleapis.com/auth/bigquery, https://www.googleapis.com/auth/monitoring.write]
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.springframework.util.ReflectionUtils (file:/C:/Users/rdpa/.gradle/caches/modules-2/files-2.1/org.springframework/spring-core/5.3.18/7ff3000f3342989cb011b6095a0e86f2e5176cef/spring-core-5.3.18.jar) to constructor java.lang.invoke.MethodHandles$Lookup(java.lang.Class)
WARNING: Please consider reporting this to the maintainers of org.springframework.util.ReflectionUtils
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
2022-04-01 18:33:00.797 INFO 32112 --- [ main] o.s.b.a.e.web.EndpointLinksResolver : Exposing 1 endpoint(s) beneath base path '/actuator'
2022-04-01 18:33:00.951 INFO 32112 --- [ main] o.s.i.endpoint.EventDrivenConsumer : Adding {logging-channel-adapter:_org.springframework.integration.errorLogger} as a subscriber to the 'errorChannel' channel
2022-04-01 18:33:00.952 INFO 32112 --- [ main] o.s.i.channel.PublishSubscribeChannel : Channel 'amis-ocra-vehiculos.errorChannel' has 1 subscriber(s).
2022-04-01 18:33:00.952 INFO 32112 --- [ main] o.s.i.endpoint.EventDrivenConsumer : started bean '_org.springframework.integration.errorLogger'
2022-04-01 18:33:00.952 INFO 32112 --- [ main] o.s.i.endpoint.EventDrivenConsumer : Adding {message-handler:cesvivinOutboundConfig.sender.serviceActivator} as a subscriber to the 'cesvivinOutboundChannel' channel
2022-04-01 18:33:00.952 INFO 32112 --- [ main] o.s.i.channel.PublishSubscribeChannel : Channel 'amis-ocra-vehiculos.cesvivinOutboundChannel' has 1 subscriber(s).
2022-04-01 18:33:00.952 INFO 32112 --- [ main] o.s.i.endpoint.EventDrivenConsumer : started bean 'cesvivinOutboundConfig.sender.serviceActivator'
2022-04-01 18:33:00.952 INFO 32112 --- [ main] ProxyFactoryBean$MethodInvocationGateway : started bean 'cesvivinOutboundPort#produce(Cesvivin)'
2022-04-01 18:33:00.952 INFO 32112 --- [ main] o.s.i.gateway.GatewayProxyFactoryBean : started bean 'cesvivinOutboundPort'
2022-04-01 18:33:00.962 INFO 32112 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8005 (http) with context path ''
2022-04-01 18:33:01.271 INFO 32112 --- [ main] m.c.a.o.v.AmisOcraVehiculosApplication : Started AmisOcraVehiculosApplication in 7.462 seconds (JVM running for 7.868)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions