[Logo] OLD FORUM - Use new one: https://www.CaptainCasa.online/forum
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
Springboot app runs with Eclipse/Port 8080 ..but not under CC/Port 50000  XML
Forum Index -> Deployment
Author Message
egehrsitz



Joined: 27/02/2023 14:53:07
Messages: 2
Offline

Hi all,

I have the issue that my Springboot application is functional when I launch it under Eclipse and access port 8080 in the browser.
If I start the application with the CC tools and access the default port 50000 the following error message appears and the program terminates:

Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'entityManagerFactory' available

Additional info: In the list of found Springboot annotations/classes (" CONDITIONS EVALUATION REPORT ") the required class JpaRepositoriesAutoConfiguration is listed under " Negative matches ".
Best regards
Erich
[Email]
CaptainCasa

Power User
[Avatar]

Joined: 21/11/2007 12:23:06
Messages: 5555
Offline

Hi Erich,

this indicates that some class is missing in the Tomcat deployment, that is available in the Spring Boot environment. And that this class is somewhere in the area of persistence. ;-)

Would be great to see your pom.xml. Could you attach it?

Please note: certain jars are part of the Spring-Boot-environment and in this environment are accessed in WEB-INF/lib-provided folder of the .war file. As result they are not visible in the WEB-INF/lib where Tomcat/etc. search for jars. - So: please also check the WEB-INF/lib-provided folder of the .war file for libraries that you expect to be part of WEB-INF/lib. - This would reflect what you write: working in SpringBoot-8080 but not in Tomcat-webapp.

Kind regards! Björn

Björn Müller, CaptainCasa GmbH
egehrsitz



Joined: 27/02/2023 14:53:07
Messages: 2
Offline

Hi Björn,

thanks for the tip ... I made the following mistake, here is an extract from my POM.XML:

... <dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<scope>provided</scope>
</dependency> ...

The bug is extremely hard to find because the jars which in the eclipse lib directory match the jars in the CC-Tomcat lib directory.

Furthermore, the hibernate-core.jar artifact is correctly listed as a dependency in the Eclipse maven dependency ...

Thank you very match.
Regards Erich
[Email]
 
Forum Index -> Deployment
Go to:   
Powered by JForum 2.1.6 © JForum Team