Try PubSub+

Spring cloud stream

akg17akg17 Member Posts: 42
edited June 10 in General Discussions #1

Hi Guys

Can you please let me know what is causing the issue,

Commenting the logs, also what are the dependency required spring boot, spring cloud, gradle to use solace 2 and above version.

Comments

  • akg17akg17 Member Posts: 42

    org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:271) ~[spring-context-5.0.9.RELEASE.jar:5.0.9.RELEASE]
    at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:91) ~[spring-context-5.0.9.RELEASE.jar:5.0.9.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:694) ~[spring-context-5.0.9.RELEASE.jar:5.0.9.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:532) ~[spring-context-5.0.9.RELEASE.jar:5.0.9.RELEASE]
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140) ~[spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE]
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:780) [spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE]
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:412) [spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:333) [spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1277) [spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1265) [spring-boot-2.0.5.RELEASE.jar:2.0.5.RELEASE]
    at com.ntrs.ioa.mocks.IoaMocksApplication.main(IoaMocksApplication.java:9) [main/:na]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_181]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_181]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_181]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_181]
    at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) [spring-boot-devtools-2.0.5.RELEASE.jar:2.0.5.RELEASE]
    Caused by: java.lang.IllegalStateException: Failed to introspect Class [com.solace.spring.cloud.stream.binder.config.ExtendedBindingHandlerMappingsProviderConfiguration] from ClassLoader [[email protected]]
    at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:659) ~[spring-core-5.0.9.RELEASE.jar:5.0.9.RELEASE]
    at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:556) ~[spring-core-5.0.9.RELEASE.jar:5.0.9.RELEASE]
    at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:541) ~[spring-core-5.0.9.RELEASE.jar:5.0.9.RELEASE]
    at org.springframework.util.ReflectionUtils.getUniqueDeclaredMethods(ReflectionUtils.java:599) ~[spring-core-5.0.9.RELEASE.jar:5.0.9.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getTypeForFactoryMethod(AbstractAutowireCapableBeanFactory.java:718) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.determineTargetType(AbstractAutowireCapableBeanFactory.java:659) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:627) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1489) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1012) ~[spring-beans-5.0.9.RELEASE.jar:5.0.9.RELEASE]
    at org.springframework.boot.autoconfigure.condition.BeanTypeRegistry.addBeanTypeForNonAliasDefinition(BeanTypeRegistry.java:194) ~[spring-boot-autoconfigure-2.0.5.RELEASE.jar:2.0.5.RELEASE]
    at org.springframework.boot.autoconfigure.condition.BeanTypeRegistry.addBeanTypeForNonAliasDefinition(BeanTypeRegistry.java:170) ~[spring-boot-autoconfigure-2.0.5.RELEASE.jar:2.0.5.RELEASE]
    at org.springframework.boot.autoconfigure.condition.BeanTypeRegistry.addBeanType(BeanTypeRegistry.java:163) ~[spring-boot-autoconfigure-2.0.5.RELEASE.jar:2.0.5.RELEASE]
    at org.springframework.boot.autoconfigure.condition.BeanTypeRegistry.lambda$updateTypesIfNecessary$2(BeanTypeRegistry.java:150) ~[spring-boot-autoconfigure-2.0.5.RELEASE.jar:2.0.5.RELEASE]
    at java.util.Iterator.forEachRemaining(Iterator.java:116) ~[na:1.8.0_181]
    at org.springframework.boot.autoconfigure.condition.BeanTypeRegistry.updateTypesIfNecessary(BeanTypeRegistry.java:148) ~[spring-boot-autoconfigure-2.0.5.RELEASE.jar:2.0.5.RELEASE]
    at org.springframework.boot.autoconfigure.condition.BeanTypeRegistry.getNamesForType(BeanTypeRegistry.java:114) ~[spring-boot-autoconfigure-2.0.5.RELEASE.jar:2.0.5.RELEASE]
    at org.springframework.boot.autoconfigure.condition.OnBeanCondition.collectBeanNamesForType(OnBeanCondition.java:265) ~[spring-boot-autoconfigure-2.0.5.RELEASE.jar:2.0.5.RELEASE]
    at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getBeanNamesForType(OnBeanCondition.java:254) ~[spring-boot-autoconfigure-2.0.5.RELEASE.jar:2.0.5.RELEASE]
    at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getMatchingBeans(OnBeanCondition.java:196) ~[spring-boot-autoconfigure-2.0.5.RELEASE.jar:2.0.5.RELEASE]
    at org.springframework.boot.autoconfigure.condition.OnBeanCondition.getMatchOutcome(OnBeanCondition.java:116) ~[spring-boot-autoconfigure-2.0.5.RELEASE.jar:2.0.5.RELEASE]
    at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:47) ~[spring-boot-autoconfigure-2.0.5.RELEASE.jar:2.0.5.RELEASE]
    ... 22 common frames omitted
    Caused by: java.lang.NoClassDefFoundError: org/springframework/cloud/stream/config/BindingHandlerAdvise$MappingsProvider
    at java.lang.Class.getDeclaredMethods0(Native Method) ~[na:1.8.0_181]
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2701) ~[na:1.8.0_181]
    at java.lang.Class.getDeclaredMethods(Class.java:1975) ~[na:1.8.0_181]
    at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:641) ~[spring-core-5.0.9.RELEASE.jar:5.0.9.RELEASE]
    ... 42 common frames omitted
    Caused by: java.lang.ClassNotFoundException: org.springframework.cloud.stream.config.BindingHandlerAdvise$MappingsProvider
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_181]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_181]
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) ~[na:1.8.0_181]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_181]
    ... 46 common frames omitted

    Process finished with exit code 0

  • marcmarc Member, Administrator, Moderator, Employee Posts: 463 admin

    Hi @akg17,

    All these package versions can definitely be a pain sometimes! The simplest way to navigate this is probably to include the solace-spring-cloud-bom.

    Check that out here. On that page you will also see the Spring Cloud & Spring Boot versions and how to include it with Maven, Gradle 4 or Gradle 5.

    Hope that helps!

  • akg17akg17 Member Posts: 42
        springBootVersion = "2.0.5.RELEASE"
        springCloudVersion = "Finchley.SR1"
        springCloudConfigVersion = "2.0.4.RELEASE"
    

    Our project has these versions and i have to remove rabbit and add the solace for our testing, as me have plan to migrate to solace or kafka. I am not getting appropriate versions, These versions are old, its not there in the link you shared.

  • akg17akg17 Member Posts: 42

    upgraded to little higher -

    Now new error is -
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.solace.spring.boot.autoconfigure.SolaceJavaAutoConfiguration': Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.solace.spring.boot.autoconfigure.SolaceJavaAutoConfiguration$$EnhancerBySpringCGLIB$$c7bfc45c]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/apache/commons/lang3/tuple/ImmutableTriple
    at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:314) ~[spring-beans-5.2.12.RELEASE.jar:5.2.12.RELEASE]
    at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:295) ~[spring-beans-5.2.12.RELEASE.jar:5.2.12.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1356) ~[spring-beans-5.2.12.RELEASE.jar:5.2.12.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1203) ~[spring-beans-5.2.12.RELEASE.jar:5.2.12.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:556) ~[spring-beans-5.2.12.RELEASE.jar:5.2.12.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516) ~[spring-beans-5.2.12.RELEASE.jar:5.2.12.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324) ~[spring-beans-5.2.12.RELEASE.jar:5.2.12.RELEASE]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.2.12.RELEASE.jar:5.2.12.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322) ~[spring-beans-5.2.12.RELEASE.jar:5.2.12.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.12.RELEASE.jar:5.2.12.RELEASE]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:897) ~[spring-beans-5.2.12.RELEASE.jar:5.2.12.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:879) ~[spring-context-5.2.12.RELEASE.jar:5.2.12.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:551) ~[spring-context-5.2.12.RELEASE.jar:5.2.12.RELEASE]
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.2.12.RELEASE.jar:2.2.12.RELEASE]
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) [spring-boot-2.2.12.RELEASE.jar:2.2.12.RELEASE]
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:405) [spring-boot-2.2.12.RELEASE.jar:2.2.12.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) [spring-boot-2.2.12.RELEASE.jar:2.2.12.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) [spring-boot-2.2.12.RELEASE.jar:2.2.12.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) [spring-boot-2.2.12.RELEASE.jar:2.2.12.RELEASE]
    at com.ntrs.ioa.enrich.IoaEnrichApplication.main(IoaEnrichApplication.java:9) [main/:na]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_181]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_181]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_181]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_181]
    at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) [spring-boot-devtools-2.2.12.RELEASE.jar:2.2.12.RELEASE]
    Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.solace.spring.boot.autoconfigure.SolaceJavaAutoConfiguration$$EnhancerBySpringCGLIB$$c7bfc45c]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/apache/commons/lang3/tuple/ImmutableTriple
    at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:217) ~[spring-beans-5.2.12.RELEASE.jar:5.2.12.RELEASE]
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:117) ~[spring-beans-5.2.12.RELEASE.jar:5.2.12.RELEASE]
    at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:310) ~[spring-beans-5.2.12.RELEASE.jar:5.2.12.RELEASE]
    ... 24 common frames omitted
    Caused by: java.lang.NoClassDefFoundError: org/apache/commons/lang3/tuple/ImmutableTriple
    at com.solace.services.core.loader.SolaceManifestLoader.(SolaceManifestLoader.java:45) ~[solace-services-info-0.4.0.jar:na]
    at com.solace.services.core.loader.SolaceCredentialsLoader.(SolaceCredentialsLoader.java:50) ~[solace-services-info-0.4.0.jar:na]
    at com.solace.spring.boot.autoconfigure.SolaceJavaAutoConfiguration.(SolaceJavaAutoConfiguration.java:45) ~[solace-java-spring-boot-autoconfigure-4.0.0.jar:na]
    at com.solace.spring.boot.autoconfigure.SolaceJavaAutoConfiguration$$EnhancerBySpringCGLIB$$c7bfc45c.() ~[solace-java-spring-boot-autoconfigure-4.0.0.jar:na]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_181]
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_181]
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_181]
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_181]
    at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:204) ~[spring-beans-5.2.12.RELEASE.jar:5.2.12.RELEASE]
    ... 26 common frames omitted
    Caused by: java.lang.ClassNotFoundException: org.apache.commons.lang3.tuple.ImmutableTriple
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381) ~[na:1.8.0_181]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424) ~[na:1.8.0_181]
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) ~[na:1.8.0_181]
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ~[na:1.8.0_181]
    ... 35 common frames omitted

    Process finished with exit code 0

  • marcmarc Member, Administrator, Moderator, Employee Posts: 463 admin
    edited June 11 #6

    @akg17 what are the new versions of spring cloud, spring boot that you tried?
    Is it not possible for you to update to versions that match the table in the docs that I mentioned before?

    Without doing that you're essentially mixing versions together that may not work. You could try to add whatever package includes org/apache/commons/lang3/tuple/ImmutableTriple to your dependencies in your pom or build.gradle file but you may just run into another issue.

Sign In or Register to comment.