NoSuchMethodError because wrong class is found - java

I have a Sprint Boot application and at deployment time I'm getting a NoSuchMethodError. I'm deploying to WebSphere 8.5.5.13. I'm pretty sure it's because the wrong class or version of the class is being found. It seems like the Spring code is looking for it's own class but is finding a class from the IBM jar file and the class it loads doesn't have an 'init()' method on it.
Please let me know if any further information will help determine a fix.
Here's my pom.xml file:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.companygoeshere</groupId>
<artifactId>eacmanager</artifactId>
<version>0.0.2-SNAPSHOT</version>
<packaging>war</packaging>
<name>EACManager</name>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.3.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-framework-bom</artifactId>
<type>pom</type>
<version>5.0.7.RELEASE</version>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.security.extensions</groupId>
<artifactId>spring-security-saml2-core</artifactId>
<version>1.0.4.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.jaxrs</groupId>
<artifactId>jackson-jaxrs-base</artifactId>
</dependency>
<dependency>
<groupId>ca.juliusdavies</groupId>
<artifactId>not-yet-commons-ssl</artifactId>
<version>0.3.11</version>
</dependency>
<dependency>
<groupId>org.opensaml</groupId>
<artifactId>opensaml</artifactId>
<version>2.6.4</version>
</dependency>
<dependency>
<groupId>com.microsoft.ews-java-api</groupId>
<artifactId>ews-java-api</artifactId>
<version>2.0</version>
</dependency>
</dependencies>
<properties>
<java.version>1.8</java.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
Here's the error message:
> com.ibm.ws.exception.RuntimeWarning:
> com.ibm.ws.exception.RuntimeWarning:
> com.ibm.ws.webcontainer.exception.WebAppNotLoadedException: Failed to
> load webapp: Failed to load webapp: Error creating bean with name
> &#39;defaultValidator&#39; defined in class path
> resource
> [org/springframework/boot/autoconfigure/validation/ValidationAutoConfiguration.class]:
> Invocation of init method failed&#59; nested exception is
> java.lang.NoSuchMethodError:
> javax/validation/Configuration.getDefaultParameterNameProvider&#40;&#41;Ljavax/validation/ParameterNameProvider&#59;
> &#40;loaded from file:/C:/Program Files
> &#40;x86&#41;**/IBM/WebSphere/AppServer/plugins/javax.j2ee.validation.jar** by
> org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader#3fb9923&#41;
> called from class
> org.springframework.validation.beanvalidation.LocalValidatorFactoryBean
> &#40;loaded from
> file:/C:/Program&#37;20Files&#37;20&#40;x86&#41;/IBM/WebSphere/AppServer/profiles/AppSrv01/installedApps/TheGarbers3Node01Cell/eacmanagerEAR.ear/eacmanager.war/WEB-INF/lib/spring-context-5.0.7.RELEASE.jar
> by
> com.ibm.ws.classloader.CompoundClassLoader#79b97694[war:eacmanagerEAR/eacmanager.war]

To do this, you need to change the classloader of your application so the correct dependency is pulled in.
To do that via the UI, go to Applications -> WebSphere enterprise applications -> Your Application -> Class loading and update detection and change the Class loader order to be Classes loaded with local class loader first (parent last). This "causes the class loader to attempt to load classes from its local class path before delegating the class loading to its parent.".
If you are deploying an EAR and want this change to propagate to inner applications, you can either change WAR class loader policy to Single class loader for application or change the class loader of the individual war (in the EAR click Manage Modules -> Your Module then change Class loader order).
As long as you provide a version of dependency in question, you should get passed the above issue.
The following wasadmin.sh script will apply the above settings (replace app_name with the name of your application): (credit)
dep = AdminConfig.getid('/Deployment:app_name/');
depObject = AdminConfig.showAttribute(dep, 'deployedObject');
AdminConfig.modify(depObject, [['warClassLoaderPolicy', 'SINGLE']]);
classldr = AdminConfig.showAttribute(depObject, 'classloader');
AdminConfig.modify(classldr, [['mode', 'PARENT_LAST']]);

Try changing the version of springboot in your pom.xml. It may work by referring different version of lib files
2.0.3.RELEASE --> 1.5-.59 etc

Smells like a you have multiple versions of the same dependency on your classpath. You compile with one but you are running the other.
Run mvn dependency:tree and you can see everything you're bringing in.
Often times transitive dependencies can cause the problems you're experiencing-- i.e, your webapp depends on both library Foo-v1 and Bar-v1. However, Foo-v1 itself depends on Bar-v2.
Once you find the duplicate library, try bumping each to be the same or latest version. Another approach is to try using maven's <exclusion></exclusion> so you only have one version of that library in your jar.
See this: https://maven.apache.org/guides/introduction/introduction-to-optional-and-excludes-dependencies.html

Related

Incompatible dependencies in Spring Boot (Maven)

I have started creating a RESTful API using Spring Boot. I haven't touched Spring in 2 years. I am using Maven. I have the main class:
package com.tsakirogf.smartapi;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
#SpringBootApplication
public class SmartapiApplication
{
public static void main(String[] args)
{
SpringApplication.run(PeopleapiApplication.class, args);
}
}
I have a Controller, Model and Service. This is my pom.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.4.2</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.tsakirogf</groupId>
<artifactId>peopleapi</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>smartapi</name>
<description>Technical Test</description>
<properties>
<java.version>11</java.version>
<!-- <tomcat.version>8.5.63</tomcat.version>-->
</properties>
<dependencies>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.4.200</version>
<!-- <scope>test</scope>-->
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<version>2.4.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
<version>2.4.2</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>2.4.2</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-commons</artifactId>
<version>2.3.6.RELEASE</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
The project is building successfully and the mvn clean and mvn install commands run successfully as well.
The problem is that when I am trying to run it in IntelliJ I get this error:
2021-02-11 18:19:42.692 ERROR 14584 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
An attempt was made to call a method that does not exist. The attempt was made from the following location:
org.apache.catalina.authenticator.AuthenticatorBase.startInternal(AuthenticatorBase.java:1355)
The following method did not exist:
'java.lang.String javax.servlet.ServletContext.getVirtualServerName()'
The method's class, javax.servlet.ServletContext, is available from the following locations:
jar:file:/F:/Workspace/Uni/SoftwareEngineer/peopleapi/lib/javax.servlet.jar!/javax/servlet/ServletContext.class
jar:file:/C:/Users/Fotis/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/9.0.41/tomcat-embed-core-9.0.41.jar!/javax/servlet/ServletContext.class
The class hierarchy was loaded from the following locations:
javax.servlet.ServletContext: file:/F:/Workspace/Uni/SoftwareEngineer/peopleapi/lib/javax.servlet.jar
Action:
Correct the classpath of your application so that it contains a single, compatible version of javax.servlet.ServletContext
Process finished with exit code 1
Any thoughts or directions I should move to? I have tried to synchronize dependencies and tried the latest and RELEASE packages in the pom. I have also deleted the whole m2 repo (twice).
Your problem is F:/Workspace/Uni/SoftwareEngineer/peopleapi/lib/javax.servlet.jar. Check why you have that JAR in your classpath (most likely it comes through some script or so). This seems to be an older version than the one you're referencing in your pom.xml

Custom dependencies are not identified in Spring-Boot

I have two spring-boot project
greeter-library
greeter-spring-boot-autoconfigure
I have created jar file for greeter-library and installed that in my local m2(maven) repository.
Now I am using that jar as a maven dependency in greeter-spring-boot-autoconfigure.But it is stating
Class not found on Greeter.java.
pom.xml for greeter-library
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.4.1</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<artifactId>greeter-library</artifactId>
<groupId>com.xyz.greeter</groupId>
<version>0.0.1-SNAPSHOT</version>
<name>greeter-library</name>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
Now pom.xml for greeter-spring-boot-autoconfigure is as follows
<artifactId>greeter-spring-boot-autoconfigure</artifactId>
<name>greeter-spring-boot-autoconfigure</name>
<groupId>com.xyz</groupId>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.4.1</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<artifactId>greeter-library</artifactId>
<groupId>com.xyz.greeter</groupId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
But during maven build time for greeter-spring-boot-autoconfigure, it is stating that Greeter.java not found which is part of greeter-library project.
Can anyone has any solution to this?
Since you've added spring-boot-maven-plugin in "greeter-library" module, it will be packaged as a spring boot application. Open it with WinRar/WinZip and you'll see. This is a little bit confusing, but in general spring boot application, although is packed as a JAR is not actually a jar in the sense that JVM can't load it, can't find its classes automatically, etc. For example, it has its dependencies in BOOT-INF/lib folder - this is not the way regular jars work, in fact, spring boot has a bootstrapping code that uses custom class loaders to read the classes from such a structure.
As a consequence of all this, Maven and IDE won't be able to recognize the classes from the greeter-library hence the error. Bootom line, you can't really declare a dependency on a spring boot application from your greater-spring-boot-autoconfigure module.
Now as a solution - why do you need a greeter-library to be a spring boot artifact? Maybe if you just remove the spring-boot-maven-plugin and turn it to the regular jar (with regular dependencies on spring boot infrastructure perhaps) it will work?
If this doesn't help, feel free to share more details in the question to get a more precise solution to the problem...
Some ideas to explore
the first jar "greeter-library" doesnt need to be packed for spring-boot, it can be a normal jar file.
Create a spring.factories file under src/resources/META-INF path. Expose the java classes from this JAR that can be used by "greeter-spring-boot-autoconfigure"

How to use unique child dependency version from parent in maven

I have a long list of modules getting properties from a parent module in maven. I want one of the modules to use a different version of spring from the parent. The other modules are using an older version of spring which will not work with module-c.
Is there a way to make the child module use its own version of spring?
// Parent
<groupId>xxx.xx.com</groupId>
<artifactId>test-environment</artifactId>
<version>1.0.0</version>
<packaging>pom</packaging>
<name>test-environment</name>
<properties>
<spring.version>4.0.6.RELEASE</spring.version>
</properties>
<modules>
<module>module-a</module>
<module>module-b</module>
<module>module-c</module>
</modules>
</project>
//Child
<project>
<parent>
<groupId>xxx.xx.com</groupId>
<artifactId>test-environment</artifactId>
<version>1.0.0</version>
</parent>
<artifactId>module-c</artifactId>
<packaging>war</packaging>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>4.3.0.RELEASE</version>
</dependency>
</dependencies>
</project>
//Error
java.lang.NoSuchMethodError: org.springframework.core.ResolvableType.forInstance(Ljava/lang/Object;)Lorg/springframework/core/ResolvableType;
at org.springframework.context.event.SimpleApplicationEventMulticaster.resolveDefaultEventType(SimpleApplicationEventMulticaster.java:144)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:121)
at org.springframework.boot.context.event.EventPublishingRunListener.publishEvent(EventPublishingRunListener.java:111)
at org.springframework.boot.context.event.EventPublishingRunListener.started(EventPublishingRunListener.java:60)
at org.springframework.boot.SpringApplicationRunListeners.started(SpringApplicationRunListeners.java:48)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:303)
at org.springframework.boot.context.web.SpringBootServletInitializer.run(SpringBootServletInitializer.java:149)
Your approach with declaring newer dependency directly in the child pom.xml is correct. As per Introduction to the Dependency Mechanism:
Dependency mediation - this determines what version of an artifact will be chosen when multiple versions are encountered as dependencies. Maven picks the "nearest definition". That is, it uses the version of the closest dependency to your project in the tree of dependencies. You can always guarantee a version by declaring it explicitly in your project's POM.
You most likely need to add spring-core on which the spring-context depends to have the right version of org.springframework.core.ResolvableType class and avoid NoSuchMethodError:
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>4.3.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>4.3.0.RELEASE</version>
</dependency>
Running with multiple version of Spring in the classpath is asking for runtime problems. It's best to keep all the Spring JARs in the same version in your runtime deployment.

The type org.springframework.data.repository.Repository cannot be resolved. It is indirectly referenced from required .class files

I am new for spring Boot, I got this problem when I follow the Spring Guide-Accessing data with MySQL
I got an Error in my STS IDE, I don't know what's the hell happening.
In the src/main/java/UserRepository.java
package hello;
import org.springframework.data.repository.CrudRepository;
import hello.User;
public interface UserRepository extends CrudRepository<User, Long> {
}
STS does warn me about this mistake, I ignore it until I run Cmd: mvn spring-boot
so I am back to check the warning, it is:
The type org.springframework.data.repository.Repository cannot be
resolved. It is indirectly referenced from required .class files
Thanks very much for helping me!
I bulid the project using Maven as recommended,the Pom.xml is:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.springframework</groupId>
<artifactId>gs-mysql-data</artifactId>
<version>0.1.0</version>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.0.RELEASE</version>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!-- JPA Data (We are going to use Repositories, Entities, Hibernate, etc...) -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<!-- Use MySQL Connector-J -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<properties>
<java.version>1.8</java.version>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
Apply some spring boot standards to the code
Keep your boot application on top of the package, in your case your BootApplication should be in hello package. Like shown in below
#SpringBootApplication
public class BootApplication extends SpringBootServletInitializer {
public static void main(String args[]) {
SpringApplication.run(BootApplication.class, args);
}
}
Now keep your repository inside the sub-package of hello. In your case it should be in hello.repository
Now try to run with BootApplication.
Buddy,It doesn't work anyway.This Exception is caused by CrudRepository.The eclipse can't resolve this class.My project is very simple,I get this project from spring website.its guide--Accessing data with MySQL
And now my project is completely same as [gs-accessing-data-mysql-complete]
The Spring official Website think it is successful project,and let the trainer to check [gs-accessing-data-mysql-initial] against [gs-accessing-data-mysql-complete]
.Howerver,even the later can't be build successfully.My project structure:
src
+main
+java
+hello
--Application.java
--MainController.java
--User.java
--UserRepository.java
and the log info ,I had better show you about the digest:
1.[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.0.0.RELEASE:run (default-cli) on project gs-mysql-data: An exception occurred while running. null: InvocationTargetException: Error creating bean with name 'mainController' defined in file [D:\workbunch\Spring Workbunch\gs-accessing-data-mysql-initial\target\classes\hello\MainController.class]: Post-processing of merged bean definition failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [hello.MainController] from ClassLoader [java.net.URLClassLoader#6424f2f4]: org/springframework/data/repository/CrudRepository: org.springframework.data.repository.CrudRepository -> [Help 1]

Maven install succeeds, but jar doesn't work correctly from bash (CLI)

currently I'm working on a project in my company that imports XML data to our database. While doing this I rely on some basic configuration projects which have been already created and used in other Projects, i.e. an EntityManagerBuilder or other utility classes that are used in order to create a connection to our oracle database. And it seems to me that those dependencies are creating some problems for me.
My project runs perfectly fine if I start it within eclipse. And when I create the project with mvn clean install -DskipTests it builds all fine.
But when I want to run it from the command line the application starts and after a few lines of code just stops, without throwing any errors or exceptions.
The reason why I think that it has something to do with some dependencies is that by logging I managed to find the point where the application stops. Since it stopped at a point I could investigate, I just did that. I downloaded the sources an only added some logging and suddenly my application had no problems at all with that class, instead it just stopped with the next static call to an other class.
I have no idea at all where to search for the error. Since this is an application that has to run by it self as a monthly task, executing it from eclipse is not an option.
Hopefully someone can give me a hint how to solve this.
Here is my POM:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.company.infrastructure.foo</groupId>
<artifactId>foo</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>foo-import</artifactId>
<packaging>jar</packaging>
<name>FooImport</name>
<properties>
<company.consoleapp.main.class>com.company.infrastructure.foo.import.FooImporter</company.consoleapp.main.class>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.company.maven</groupId>
<artifactId>company-standalone-dm</artifactId>
<version>${company.parent.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<!-- Logging -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
</dependency>
<!-- Utilities -->
<dependency>
<groupId>args4j</groupId>
<artifactId>args4j</artifactId>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.2.11</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<version>2.2.11</version>
</dependency>
<!-- Using foo-dataaccess -->
<dependency>
<groupId>com.company.infrastructure.marken</groupId>
<artifactId>foo-dataaccess</artifactId>
<version>1.0.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies>
<build>
<finalName>foo-import</finalName>
<plugins>
<!-- Consoleapp-Mixin -->
<plugin>
<groupId>com.github.odavid.maven.plugins</groupId>
<artifactId>mixin-maven-plugin</artifactId>
<configuration>
<mixins>
<mixin>
<groupId>com.company.maven</groupId>
<artifactId>company-consoleapp-mixin</artifactId>
<version>${company.parent.version}</version>
</mixin>
</mixins>
</configuration>
</plugin>
</plugins>
</build>
I think this might be something to do with your dependency management in maven, since you haven't specified the versions and maven figures out those versions automatically.
However when you run the application, you need those jars to be in your classpath otherwise you might end up getting a ClassNotFoundException because the jars are not available. So unless you figure out what your dependencies are like you mentioned and add them to your classpath you would end up seeing the error.
It might be worth enabling a further level of logging in your application to give you some indication of where the error is. You could also try and see if at the point of failure is referenced to an external library, which is the one that is not available in your classpath.
Could you also please share how your running your application through CLI.

Categories