the application doesn’t start, in the tomcat log we find this error:
org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type ‘io.aik.cuba.services.OPEExecutor’
“io.aik.cuba.services.OPEExecutor” is a class inside our additional jar,
the “spring.xml” of the core module contains the row: <context:component-scan base-package=“io.aik.cuba”/>
the OPEExecutor is under the io.aik.cuba package and has the @Component annotation
package io.aik.cuba.services;
@Component
public class OPEExecutor {
all works perfectly running application under local tomcat (directly from cuba studio)
we downloaded and exploded the ROOT.war deployed on Jelastic,
inside the “app-core-0.1-SNAPSHOT.jar” we found the app.properties referencing the correct spring.xml file.
Can you help us to understand why the class is not added to the Spring context?
Hi,
Could you bring more details? How have you defined the dependency?
Try to Open the Tomcat settings in Jelastic administrative panel and check whether the jar persists in libraries.
In the image below you can see the tomcat lib directory with the needed jar inside.
Here the root.war (with only my jars and the app-core-0.1-SNAPSHOT.jar for file size reasons) ROOT.zip (5.7 MB)
I Think the problem is in the Spring context.
it seems that the <context:component-scan base-package=“io.aik.cuba”/>
row added to the original spring.xml file has no effect
Hi,
How have you defined the dependency to your library?
Now singleWar does not work with “simple” dependencies - only application components are supported. If you want to use the same logic(beans) in several CUBA projects create an application component.