0

So I have this bean file which is being called in a java file. For the love of god I cannot figure out why I have this error.

I tried doing my research on the internet or read about JCSMPChannelProperties (which I didn't find).

Tried changing the order of beans (which should not matter).

Probably has an easy fix. But I cannot figure it out!!!

    Error creating bean with name 'broadCastService' defined in URL [file:/C:/EclipseWorkspace/NewWorkspace/ss_cache/bin/cacheQueryServiceContext.xml]: Cannot resolve reference to bean 'cacheQueryService' while setting bean property 'genericQueryService'; 
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cacheQueryService' defined in class path resource [muniOfferingQueryServiceContext.xml]: Cannot resolve reference to bean 'muni.JmsTemplate' while setting bean property 'jmsTopicTemplate'; 
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'muni.JmsTemplate' defined in class path resource [muniOfferingQueryServiceContext.xml]: Cannot resolve reference to bean 'muni.SolaceCachedConnectionFactory' while setting bean property 'connectionFactory'; 
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'muni.SolaceCachedConnectionFactory' defined in class path resource [muniOfferingQueryServiceContext.xml]: Cannot resolve reference to bean 'muni.SolaceConnectionFactory' while setting bean property 'targetConnectionFactory'; 
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'muni.SolaceConnectionFactory' defined in class path resource [muniOfferingQueryServiceContext.xml]: 


    Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: com.solacesystems.jcsmp.JCSMPChannelProperties.getConnectRetriesPerHost()I
sa_nyc
  • 971
  • 1
  • 13
  • 23

1 Answers1

0

I'm going to copy/paste one of the answers I got from a question I asked last week.

A NoSuchMethodError is almost always due to conflicting library versions. In this case I'm guessing there are multiple versions of joda libraries in the two projects.

Similarly, you probably have multiple versions of the same library. You can check where resources are getting loaded from by using the following code (also copy/pasted from my answer).

Class cls = your.clazz.Here.class; 
ProtectionDomain pDomain = cls.getProtectionDomain();
CodeSource cSource = pDomain.getCodeSource();
URL loc = cSource.getLocation();
System.out.println(loc);

Question for Reference: NoSuchMethodError - Calling Class/Method from Class in Same Package

Community
  • 1
  • 1
FriedSaucePots
  • 1,342
  • 10
  • 16