Author Message
jnahas
Joined: Jun 28, 2016
Messages: 16
Offline
Hi,

We are developing an application with spring-boot-actuator and spring-cloud. It's running fine in a Tomcat 8 with Java 8 without OD but the intention is to deploy it in a tomcat application server with some OD applications.

So, when we deploy the application in a tomcat server with OD dependencies, we are currently experiencing conflicts between spring classes inside the activemq-all library (which is present in the runtimeSupportTomcat8 ) and the spring classes being used by our application.

Here is the error:

//Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to process import candidates for configuration class [org.springframework.boot.autoconfigure.transaction.TransactionAutoConfiguration$EnableTransactionManagementConfiguration$CglibAutoProxyConfiguration]; nested exception is java.lang.IllegalArgumentException: class org.springframework.transaction.annotation.TransactionManagementConfigurationSelector is not assignable to interface org.springframework.context.annotation.ImportSelector //


Java: 1.8
Tomcat: 8.0.46
JAR version: activemq-all-5.13.1
Spring boot: 1.5.4-Release
Spring core: 4.3.9-Release
Spring cloud zookeeper: 1.1.1.Release
OD: 7.20.09.04


If we remove the library activemq-all, our application works fine, so we would like to understand which is the activemq-all library purpose, what functionality is bringing to OD to figure out if it could be excluded or not.



Thanks in advance,
Jorge.
RossYakulis
Joined: Nov 6, 2013
Messages: 2652
Offline
Currently that is only used for a new PDC that will integrate with Oceanalytics. The Oceanalytics work is not done so the feature cannot be currently user. Go ahead and delete the jar. I will look into why it is in tomcat/lib and not WEB-INF/lib.
WilsonYu
Joined: Nov 6, 2013
Messages: 3950
Offline
The library is referenced by the core scertcommon library; thus it can not be removed. Is you app using a different version of activemq-all? Can you put your specific version in the WEB-INF/lib directory of the app? Or you would have to try the version that works for both and have it in the Tomcat lib directory. You only have these two options I can think of.
jnahas
Joined: Jun 28, 2016
Messages: 16
Offline
Hi,

Our Spring Boot app DOES NOT use activemq-all library at all.

If we run our app in a clean Tomcat 8, it works fine.

If we add the runtime support files for Tomcat 8 in <tomcat_home>/lib (which includes the activemq-all library), our app fails due to the Exception presented above.

The problem is between spring classes inside the activemq-all, and our spring app libraries. That's why we try to determine if it could be exluded, or if there is a possible workaround.
RossYakulis
Joined: Nov 6, 2013
Messages: 2652
Offline
Just remove the activemq jar.
jnahas
Joined: Jun 28, 2016
Messages: 16
Offline
Ok, will do that Ross.

Thanks!
RossYakulis
Joined: Nov 6, 2013
Messages: 2652
Offline
for the 7.2.1 release I will examine why that jar is in tomcat/lib and not in WEB-INF/lib and move it .
AlfredoSchmidt
Joined: Nov 9, 2013
Messages: 12
Offline
Hi,
We are having this same issue with OD 7.2.1
The spring classes inside the activemq-all-5.13.1 jar are making conflicts with spring framework libraries.
After deleting the jar the conflicts disappeared, but we want to confirm is that is the recommended procedure.

Thanks,
Alfredo



WilsonYu
Joined: Nov 6, 2013
Messages: 3950
Offline
If you are not using the PDC to push events to Oceanalystics, you will be OK without the jar. If you are using the PDC, the chances are your Spring framework already has the library included. You may be OK but you need to make sure that functionality is working.
Go to:   
Mobile view