Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-6764

Avoid dependency of package visible GridResourceBasicInjector class from Spring module.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 2.1
    • None
    • spring
    • None

    Description

      We have dependency of GridResourceBasicInjector class in GridSpringResourceContextImpl.
      This cause issues when core and spring jars are loaded with different classloaders.

      Refreshing org.springframework.context.support.GenericApplicationContext@4bf48f6: startup date [Tue Oct 24 17:58:14 EEST 2017]; root of context hierarchy
      Exception in thread "main" java.lang.reflect.InvocationTargetException
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at murex.mice.boot.launch.MainLauncher.launch(MainLauncher.java:53)
              at murex.mice.boot.Main.main(Main.java:82)
      Caused by: java.lang.IllegalAccessError: tried to access class org.apache.ignite.internal.processors.resource.GridResourceBasicInjector from class org.apache.ignite.internal.processors.resource.GridSpringResourceContextImpl
              at org.apache.ignite.internal.processors.resource.GridSpringResourceContextImpl.<init>(GridSpringResourceContextImpl.java:39)
              at org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.loadConfigurations(IgniteSpringHelperImpl.java:144)
              at org.apache.ignite.internal.util.spring.IgniteSpringHelperImpl.loadConfigurations(IgniteSpringHelperImpl.java:124)
              at org.apache.ignite.internal.IgnitionEx.loadConfigurations(IgnitionEx.java:689)
              at murex.mice.ignite.configuration.ConfigurationHelper.loadConfiguration(ConfigurationHelper.java:48)
              at murex.mice.ignite.cluster.IgniteClusterManagerConfig.createClusterManager(IgniteClusterManagerConfig.java:33)
              at murex.mice.launchers.registry.RegistryLauncher.start(RegistryLauncher.java:39)
              at murex.mice.launchers.registry.RegistryLauncher.main(RegistryLauncher.java:87)
              ... 6 more 
      

      GridSpringResourceContextImpl tries to create GridResourceBasicInjector explicitly that has package visibility and located in different jar.

      Possible solution is to have static util method that will has return type GridResourceInjector and return GridResourceBasicInjector instance.

      Attachments

        Activity

          People

            Unassigned Unassigned
            amashenkov Andrey Mashenkov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: