Free Support Forum - aspose.com

Migrating aspose email to 20.7 with java 11

I have these exceptions after trying to upgrade my aspose -email version to 20.7
I am using java 11

Caused by: org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.*
com.* nested exception is java.lang.NoClassDefFoundError: com/aspose/email/MailMessage
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:502)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:84)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:282)
… 95 more
Caused by: java.lang.NoClassDefFoundError: com/aspose/email/MailMessage
at java.base/java.lang.Class.getDeclaredMethods0(Native Method)
at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3166)
at java.base/java.lang.Class.getDeclaredMethods(Class.java:2309)
at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.findPersistenceMetadata(PersistenceAnnotationBeanPostProcessor.java:382)
at org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(PersistenceAnnotationBeanPostProcessor.java:320)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyMergedBeanDefinitionPostProcessors(AbstractAutowireCapableBeanFactory.java:798)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:493)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:844)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:786)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:703)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:474)
… 97 more
Caused by: java.lang.ClassNotFoundException: com.aspose.email.MailMessage
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1365)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1188)
… 113 more

@Mouna87

If we plan to use EWSClient API with JDK11 or above, we need to add JAXB dependencies. All other Aspose.Email API works normally without any additional dependencies.

(The JAXB APIs are considered to be Java EE APIs, and therefore are no longer contained on the default class path in Java SE 9. In Java 11 they are completely removed from the JDK.
Issue described on stackoverflow: How to resolve java.lang.NoClassDefFoundError: javax/xml/bind/JAXBException in Java 9

Maven JAXB dependencies:

javax.xml.bind jaxb-api 2.3.1 
com.sun.xml.bind jaxb-impl 2.3.1 
com.sun.xml.bind jaxb-core 2.3.0.1 
com.sun.xml.messaging.saaj saaj-impl 1.5.0 

I added these dependencies but I still have the same errors.
is there anything else I should do ?

@Mouna87

The stated issue does not seems to be related to EWSClient API with JDK11.

org.springframework.beans.factory.BeanCreationException: Could not autowire field
NoClassDefFoundError: com/aspose/email/MailMessage

We need to check Project Configuration and Spring Context. Please share the working sample project (not code snippets) that we will try to assess on our end.

@mudassir.fayyaz

We didn’t change the project configuration and spring context while changing the Aspose email version.
what files should I share with you ?

@Mouna87

We need the sample project for which we will try to observe the configuration because as I shared earlier the stated issue does not seems to be related to EWSClient API with JDK11.

@mudassir.fayyaz here is our pom.xml

<?xml version="1.0" encoding="UTF-8"?>


4.0.0
com.
GPJ


pom
GPJ


Ce projet est le parent des modules GPJ

<repositories>
	<repository>
		<id>AsposeJavaAPI</id>
		<name>Aspose Java API</name>
		<url>https://repository.aspose.com/repo/</url>
	</repository>
	<repository>
		<id>central</id>
		<name>Maven Repository Switchboard</name>
		<layout>default</layout>
		<url>https://repo1.maven.org/maven2</url>
		<snapshots>
			<enabled>true</enabled>
		</snapshots>
	</repository>
</repositories>

<pluginRepositories>
	<pluginRepository>
		<id>central</id>
		<name>Maven Plugin Repository</name>
		<url>https://repo1.maven.org/maven2</url>
		<layout>default</layout>
		<snapshots>
			<enabled>true</enabled>
		</snapshots>
		<releases>
			<updatePolicy>never</updatePolicy>
		</releases>
	</pluginRepository>

	<pluginRepository>
		<id>eviwarePluginRepository</id>
		<url>http://www.soapui.org/repository/maven2/</url>
	</pluginRepository>

</pluginRepositories>
<modules>
	
</modules>
<!-- Propriétés du projet, on référence ici toutes les valeurs qui seraient 
	autrement dupliquées dans les poms. -->
<properties>
	<!-- Cette propriété est automatiquement lue par certains plugins pour 
		l'encodage des sources. -->
	<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	<!-- Cette propriété est automatiquement lue par certains plugins de reporting 
		pour définir l'encodage de génération des rapports. -->
	<project.reporting.outputEncoding>${project.build.sourceEncoding}</project.reporting.outputEncoding>
	<lib.spring.version>4.3.2.RELEASE</lib.spring.version>
	<lib.spring.ldap.version>2.3.3.RELEASE</lib.spring.ldap.version>
	<lib.slf4j.version>1.7.30</lib.slf4j.version>
	<lib.hibernate.version>3.3.2.GA</lib.hibernate.version>
	<lib.hibernate.validator.version>3.1.0.GA</lib.hibernate.validator.version>
	<lib.hibernate.extensions.version>3.4.0.GA</lib.hibernate.extensions.version>
	<lib.struts2.version>2.1.8.1</lib.struts2.version>
	<lib.velocity.version>1.6.4</lib.velocity.version>
	<lib.words.aspose.version>20.9</lib.words.aspose.version>
	<lib.email.aspose.version>20.7</lib.email.aspose.version>
	<lib.aspose.words.jasperreports.version>6.0.0-6.2.1</lib.aspose.words.jasperreports.version>
	<lib.cells.aspose.version>20.9</lib.cells.aspose.version>
	<lib.pdf.aspose.version>20.9</lib.pdf.aspose.version>

	<!-- Plugin Jquery JQUI Form BBQ Grid 3.1.0 1.5.2 1.8.14 2.82 1.2.1 4.1.1 -->
	<lib.struts2.jquery.version>3.1.0</lib.struts2.jquery.version>

	<source.java.version>11</source.java.version>
	<maven.compiler.source>11</maven.compiler.source>
	<maven.compiler.target>11</maven.compiler.target>


	<cobertura.version>1.9.2</cobertura.version>

	
	<tomcat.directory>*/DeveloppementMOA/apache-tomcat-9.0.37</tomcat.directory>
	<selenium.report.directory>/reports</selenium.report.directory>

	<!-- Sous repertoire de src/main/resources ou se trouve SOL_technique.properties -->
	<!-- Vide par defaut car on veut celui de dev (a la racine de src/main/resources) -->
	<path.to.properties></path.to.properties>
	<!-- <tomcat.version>8.5.37</tomcat.version> -->
</properties>

<!-- Déclaration des dépendances communes à tous les modules. -->
<dependencyManagement>
	<dependencies>
		<dependency>
			<groupId>javax.annotation</groupId>
			<artifactId>javax.annotation-api</artifactId>
			<version>1.3.2</version>
		</dependency>
		<dependency>
			<groupId>javax.xml.bind</groupId>
			<artifactId>jaxb-api</artifactId>
			<version>2.3.1</version>
		</dependency>
		<dependency>
			<groupId>org.glassfish.jaxb</groupId>
			<artifactId>jaxb-runtime</artifactId>
			<version>2.4.0-b180725.0644</version>
		</dependency>

		<dependency>
			<groupId>commons-lang</groupId>
			<artifactId>commons-lang</artifactId>
			<version>2.3</version>	<!-- Au lieu de 2.5 pour compat WAS7 -->
		</dependency>
		<!-- Ne devrait pas poser de problemes : le package est lang3 -->
		<dependency>
			<groupId>org.apache.commons</groupId>
			<artifactId>commons-lang3</artifactId>
			<version>3.1</version>
		</dependency>

		<dependency>
			<groupId>commons-beanutils</groupId>
			<artifactId>commons-beanutils</artifactId>
			<version>1.8.0</version>
		</dependency>
		<dependency>
			<groupId>javax.xml.ws</groupId>
			<artifactId>jaxws-api</artifactId>
			<version>2.3.1</version>
		</dependency>
		<dependency>
			<groupId>com.sun.xml.ws</groupId>
			<artifactId>jaxws-rt</artifactId>
			<version>2.1.4</version>
		</dependency>
		<dependency>
			<groupId>commons-io</groupId>
			<artifactId>commons-io</artifactId>
			<version>2.0.1</version>
		</dependency>

		<dependency>
			<groupId>commons-codec</groupId>
			<artifactId>commons-codec</artifactId>
			<version>1.3</version>
		</dependency>
		<dependency>
			<groupId>com.sun.activation</groupId>
			<artifactId>javax.activation</artifactId>
			<version>1.2.0</version>
		</dependency>
		<dependency>
			<groupId>commons-collections</groupId>
			<artifactId>commons-collections</artifactId>
			<version>3.2.1</version>
		</dependency>

		<dependency>
			<groupId>joda-time</groupId>
			<artifactId>joda-time</artifactId>
			<version>2.1</version>
		</dependency>

		<dependency>
			<groupId>com.aspose</groupId>
			<artifactId>aspose-words</artifactId>
			<version>${lib.words.aspose.version}</version>
			<classifier>jdk17</classifier>
		</dependency>

		<dependency>
			<groupId>com.aspose</groupId>
			<artifactId>aspose-email</artifactId>
			<version>${lib.email.aspose.version}</version>
			<type>pom</type>
		</dependency>

		<dependency>
			<groupId>com.aspose.words.jasperreports</groupId>
			<artifactId>aspose-words-jasperreports</artifactId>
			<version>${lib.aspose.words.jasperreports.version}</version>
		</dependency>

		<dependency>
			<groupId>com.aspose</groupId>
			<artifactId>aspose-cells</artifactId>
			<version>${lib.cells.aspose.version}</version>
		</dependency>

		<dependency>
			<groupId>com.aspose</groupId>
			<artifactId>aspose-pdf</artifactId>
			<version>${lib.pdf.aspose.version}</version>
		</dependency>

		<dependency>
			<groupId>com.google.guava</groupId>
			<artifactId>guava</artifactId>
			<version>r09</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-web</artifactId>
			<version>${lib.spring.version}</version>
			<exclusions>
				<exclusion>
					<groupId>org.springframework</groupId>
					<artifactId>spring-asm</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-core</artifactId>
			<version>${lib.spring.version}</version>
			<exclusions>
				<exclusion>
					<groupId>org.springframework</groupId>
					<artifactId>spring-asm</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-context-support</artifactId>
			<version>${lib.spring.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-context</artifactId>
			<version>${lib.spring.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-aop</artifactId>
			<version>${lib.spring.version}</version>
		</dependency>

		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-jdbc</artifactId>
			<version>${lib.spring.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-orm</artifactId>
			<version>${lib.spring.version}</version>
		</dependency>
		<!-- Annuaires LDAP -->
		<!-- Dépendance runtime pour l'AOP de Spring -->
		<dependency>
			<groupId>org.springframework.ldap</groupId>
			<artifactId>spring-ldap-core</artifactId>
			<version>${lib.spring.ldap.version}</version>
		</dependency>
		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-log4j12</artifactId>
			<version>${lib.slf4j.version}</version>
		</dependency>

		<dependency>
			<groupId>org.springframework.ldap</groupId>
			<artifactId>spring-ldap-odm</artifactId>
			<version>${lib.spring.ldap.version}</version>
		</dependency>
		<dependency>
			<groupId>org.aspectj</groupId>
			<artifactId>aspectjweaver</artifactId>
			<version>1.8.8</version>
		</dependency>


		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-core</artifactId>
			<version>${lib.hibernate.version}</version>
			<exclusions>
				<exclusion>
					<groupId>xml-apis</groupId>
					<artifactId>xml-apis</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-annotations</artifactId>
			<version>${lib.hibernate.extensions.version}</version>
		</dependency>

		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-validator</artifactId>
			<version>${lib.hibernate.validator.version}</version>
		</dependency>
		<!-- Velocity : utilisé pour la création de mail au format HTML à partir 
			de template -->
		<dependency>
			<groupId>org.apache.velocity</groupId>
			<artifactId>velocity</artifactId>
			<version>${lib.velocity.version}</version>
		</dependency>
		<!-- Dépendance runtime pour Hibernate pour la manipulation du bytecode -->
		<!-- https://mvnrepository.com/artifact/org.javassist/javassist -->
		<dependency>
			<groupId>org.javassist</groupId>
			<artifactId>javassist</artifactId>
			<version>3.23.1-GA</version>
		</dependency>

		<dependency>
			<groupId>org.slf4j</groupId>
			<artifactId>slf4j-api</artifactId>
			<version>${lib.slf4j.version}</version>
		</dependency>

		<dependency>

			<groupId>org.bouncycastle</groupId>

			<artifactId>bcprov-jdk15on</artifactId>

			<version>1.60</version>

		</dependency>

		<dependency>
			<groupId>log4j</groupId>
			<artifactId>log4j</artifactId>
			<version>1.2.15</version>

			<exclusions>
				<exclusion>
					<groupId>javax.mail</groupId>
					<artifactId>mail</artifactId>
				</exclusion>

				<exclusion>
					<groupId>javax.jms</groupId>
					<artifactId>jms</artifactId>
				</exclusion>

				<exclusion>
					<groupId>com.sun.jdmk</groupId>
					<artifactId>jmxtools</artifactId>
				</exclusion>

				<exclusion>
					<groupId>com.sun.jmx</groupId>
					<artifactId>jmxri</artifactId>
				</exclusion>
			</exclusions>
		</dependency>

		<!-- Dépendances pour les tests. -->
		<dependency>
			<groupId>org.springframework</groupId>
			<artifactId>spring-test</artifactId>
			<version>${lib.spring.version}</version>
			<exclusions>
				<exclusion>
					<groupId>org.springframework</groupId>
					<artifactId>spring-asm</artifactId>
				</exclusion>
			</exclusions>
		</dependency>

		<!-- Tests unitaires -->
		<dependency>
			<groupId>com.h2database</groupId>
			<artifactId>h2</artifactId>
			<version>1.2.124</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.mockito</groupId>
			<artifactId>mockito-all</artifactId>
			<version>2.0.2-beta</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>junit</groupId>
			<artifactId>junit</artifactId>
			<version>4.7</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.dbunit</groupId>
			<artifactId>dbunit</artifactId>
			<version>2.4.7</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.seleniumhq.selenium</groupId>
			<artifactId>selenium-java</artifactId>
			<version>2.31.0</version>
			<scope>test</scope>
		</dependency>

		<dependency>
			<groupId>org.seleniumhq.selenium</groupId>
			<artifactId>selenium-server</artifactId>
			<version>2.31.0</version>
		</dependency>
		<dependency>
			<groupId>com.microsoft.sqlserver</groupId>
			<artifactId>mssql-jdbc</artifactId>
			<version>6.2.2.jre8</version>
		</dependency>
		<dependency>

			<groupId>com.sun.xml.bind</groupId>

			<artifactId>jaxb-impl</artifactId>

			<version>2.3.1</version>

		</dependency>
		<!-- https://mvnrepository.com/artifact/com.sun.xml.bind/jaxb-ri -->
		<dependency>
			<groupId>com.sun.xml.bind</groupId>
			<artifactId>jaxb-ri</artifactId>
			<version>3.0.0-M4</version>
			<type>pom</type>
		</dependency>
		<!-- https://mvnrepository.com/artifact/com.sun.xml.ws/jaxws-tools -->
		<dependency>
			<groupId>com.sun.xml.ws</groupId>
			<artifactId>jaxws-tools</artifactId>
			<version>3.0.0-M4</version>
		</dependency>

		<dependency>

			<groupId>com.sun.xml.bind</groupId>

			<artifactId>jaxb-core</artifactId>

			<version>2.3.0.1</version>

		</dependency>
		<!-- https://mvnrepository.com/artifact/com.sun.xml.ws/jaxws-ri -->
		<dependency>
			<groupId>com.sun.xml.ws</groupId>
			<artifactId>jaxws-ri</artifactId>
			<version>3.0.0-M3</version>
			<type>pom</type>
		</dependency>

		<dependency>
			<groupId>javax.xml.soap</groupId>
			<artifactId>javax.xml.soap-api</artifactId>
			<version>1.4.0</version>
		</dependency>
		<dependency>

			<groupId>com.sun.xml.messaging.saaj</groupId>

			<artifactId>saaj-impl</artifactId>

			<version>1.5.0</version>

		</dependency>
		<dependency>
			<groupId>org.apache.httpcomponents</groupId>
			<artifactId>httpclient</artifactId>
			<version>4.2.1</version>
		</dependency>
		<dependency>
			<groupId>commons-dbcp</groupId>
			<artifactId>commons-dbcp</artifactId>
			<version>1.4</version>
			<type>jar</type>
			<scope>test</scope>
		</dependency>
		<dependency>
			<groupId>javax.servlet.jsp</groupId>
			<artifactId>jsp-api</artifactId>
			<version>2.1</version>
			<scope>provided</scope>
		</dependency>

		<!-- Container J2EE -->
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>servlet-api</artifactId>
			<version>2.5</version>
			<scope>provided</scope>
		</dependency>
		<!-- https://mvnrepository.com/artifact/javax.servlet/servlet-api -->
		<!-- <dependency> <groupId>javax.servlet</groupId> <artifactId>servlet-api</artifactId> 
			<version>3.0-alpha-1</version> <scope>provided</scope> </dependency> -->
		<!-- <dependency> <groupId>javax.servlet.jsp</groupId> <artifactId>jsp-api</artifactId> 
			<version>2.1</version> <scope>provided</scope> </dependency> -->
		<!-- https://mvnrepository.com/artifact/javax.transaction/javax.transaction-api -->
		<dependency>
			<groupId>javax.transaction</groupId>
			<artifactId>javax.transaction-api</artifactId>
			<version>1.3</version>
		</dependency>

		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>jstl</artifactId>
			<version>1.2</version>
		</dependency>
		<dependency>
			<groupId>taglibs</groupId>
			<artifactId>standard</artifactId>
			<scope>runtime</scope>
			<version>1.1.2</version>
		</dependency>

		<dependency>
			<groupId>org.apache.struts</groupId>
			<artifactId>struts2-core</artifactId>
			<version>${lib.struts2.version}</version>
		</dependency>

		<dependency>
			<groupId>org.apache.struts</groupId>
			<artifactId>struts2-spring-plugin</artifactId>
			<version>${lib.struts2.version}</version>
			<exclusions>
				<exclusion>
					<groupId>org.apache.struts</groupId>
					<artifactId>struts-core</artifactId>
				</exclusion>
				<exclusion>
					<groupId>org.apache.struts.xwork</groupId>
					<artifactId>xwork-core</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<!-- https://mvnrepository.com/artifact/org.ow2.asm/asm -->
		<dependency>
			<groupId>org.ow2.asm</groupId>
			<artifactId>asm</artifactId>
			<version>7.0</version>
		</dependency>

		<dependency>
			<groupId>org.apache.struts</groupId>
			<artifactId>struts2-sitemesh-plugin</artifactId>
			<version>${lib.struts2.version}</version>
		</dependency>

		<dependency>
			<groupId>org.apache.struts</groupId>
			<artifactId>struts2-json-plugin</artifactId>
			<version>${lib.struts2.version}</version>
		</dependency>

		<dependency>
			<groupId>displaytag</groupId>
			<artifactId>displaytag</artifactId>
			<version>1.2</version>
			<scope>compile</scope>
			<exclusions>
				<exclusion>
					<artifactId>itext</artifactId>
					<groupId>com.lowagie</groupId>
				</exclusion>
			</exclusions>
		</dependency>

		<!-- S2 jquery -->
		<dependency>
			<groupId>com.jgeppert.struts2.jquery</groupId>
			<artifactId>struts2-jquery-plugin</artifactId>
			<version>${lib.struts2.jquery.version}</version>
		</dependency>

		<dependency>
			<groupId>com.jgeppert.struts2.jquery</groupId>
			<artifactId>struts2-jquery-grid-plugin</artifactId>
			<version>${lib.struts2.jquery.version}</version>
		</dependency>

		<dependency>
			<groupId>com.jgeppert.struts2.jquery</groupId>
			<artifactId>struts2-jquery-tree-plugin</artifactId>
			<version>${lib.struts2.jquery.version}</version>
		</dependency>

		<!-- Reporting Jasper -->
		<dependency>
			<groupId>net.sf.jasperreports</groupId>
			<artifactId>jasperreports</artifactId>
			<version>6.1.0</version>
		</dependency>
		<dependency>
			<groupId>net.sf.jasperreports</groupId>
			<artifactId>jasperreports-htmlcomponent</artifactId>
			<version>5.0.1</version>
		</dependency>

		<!-- jsoup HTML parser library @ http://jsoup.org/ -->
		<dependency>
			<groupId>org.jsoup</groupId>
			<artifactId>jsoup</artifactId>
			<version>1.8.1</version>
		</dependency>
		<dependency>
			<groupId>org.codehaus.groovy</groupId>
			<artifactId>groovy-all</artifactId>
			<version>3.0.5</version>
			<type>pom</type>
		</dependency>
		<dependency>
			<groupId>org.apache.poi</groupId>
			<artifactId>poi</artifactId>
			<version>3.7</version>
		</dependency>
		<dependency>
			<groupId>net.sf.barcode4j</groupId>
			<artifactId>barcode4j</artifactId>
			<version>2.1</version>
			<scope>compile</scope>
		</dependency>

		<dependency>
			<groupId>net.sourceforge.barbecue</groupId>
			<artifactId>barbecue</artifactId>
			<version>1.5-beta1</version>
			<scope>compile</scope>
		</dependency>
		<!-- / codes barres -->

		<!-- Export Excel avec JExcel -->
		<dependency>
			<groupId>net.sourceforge.jexcelapi</groupId>
			<artifactId>jxl</artifactId>
			<version>2.6.10</version>
			<scope>compile</scope>
		</dependency>
		<!-- /Export Excel avec JExcel -->

		<!-- Fix d'une version compatible avec JasperReports et JasperJSP ... 
			pas très originaux dans les noms -->
		<dependency>
			<groupId>eclipse</groupId>
			<artifactId>jdtcore</artifactId>
			<version>3.2.0.v_658</version>
		</dependency>
		<dependency>
			<groupId>net.sf.opencsv</groupId>
			<artifactId>opencsv</artifactId>
			<version>2.0</version>
		</dependency>

		<dependency>
			<groupId>org.apache.maven.plugins</groupId>
			<artifactId>maven-checkstyle-plugin</artifactId>
			<version>3.1.1</version>
		</dependency>


		<dependency>
			<groupId>org.apache.maven.plugins</groupId>
			<artifactId>maven-pmd-plugin</artifactId>
			<version>3.13.0</version>
		</dependency>
		<dependency>
			<groupId>org.codehaus.mojo</groupId>
			<artifactId>findbugs-maven-plugin</artifactId>
			<version>3.0.5</version>
		</dependency>

		<!-- Cache -->
		<dependency>
			<groupId>net.sf.ehcache</groupId>
			<artifactId>ehcache-core</artifactId>
			<version>2.6.11</version>
			<scope>compile</scope>
			<exclusions>
				<exclusion>
					<groupId>org.slf4j</groupId>
					<artifactId>slf4j-api</artifactId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>org.codehaus.mojo</groupId>
			<artifactId>javancss-maven-plugin</artifactId>
			<version>2.1</version>
		</dependency>

	</dependencies>
</dependencyManagement>

<build>
	<pluginManagement>
		<!-- Configuration par défaut des plugins et freeze des versions pour 
			assurer un build reproductible si des nouvelles versions des plugins sont 
			publiées. -->
		<plugins>
			<plugin>
				<groupId>eviware</groupId>
				<artifactId>maven-soapui-plugin</artifactId>
				<version>2.5.1</version>
			</plugin>
			<plugin>
				<artifactId>maven-enforcer-plugin</artifactId>
				<version>3.0.0-M3</version>
				<executions>
					<execution>
						<id>enforce-banned-dependencies</id>
						<goals>
							<goal>enforce</goal>
						</goals>
						<configuration>
							<rules>
								<bannedDependencies>
									<searchTransitive>true</searchTransitive>
									<excludes>
										<exclude>commons-logging</exclude>
										<exclude>org.slf4j:1.5*</exclude>
										<exclude>org.slf4j:1.6*</exclude>
										<exclude>org.springframework:2.*</exclude>
										<exclude>org.springframework:5.2.*</exclude>
									</excludes>
								</bannedDependencies>
							</rules>
							<fail>true</fail>
						</configuration>
					</execution>
				</executions>
			</plugin>


			<plugin>
				<artifactId>maven-antrun-plugin</artifactId>
				<version>3.0.0</version>
			</plugin>

			<plugin>
				<artifactId>maven-assembly-plugin</artifactId>
				<version>3.3.0</version>
			</plugin>

			<plugin>
				<artifactId>maven-clean-plugin</artifactId>
				<version>3.1.0</version>
			</plugin>

			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.8.0</version>
				<configuration>
					<encoding>${project.reporting.outputEncoding}</encoding>
					<source>${source.java.version}</source>
					<target>${source.java.version}</target>
				</configuration>
				<dependencies>
					<dependency>
						<groupId>org.ow2.asm</groupId>
						<artifactId>asm</artifactId>
						<version>7.0</version> <!-- Use newer version of ASM -->
					</dependency>
				</dependencies>
			</plugin>

			<plugin>
				<artifactId>maven-dependency-plugin</artifactId>
				<version>3.1.2</version>
			</plugin>

			<plugin>
				<artifactId>maven-deploy-plugin</artifactId>
				<version>3.0.0-M1</version>
			</plugin>
			<plugin>
				<artifactId>maven-ear-plugin</artifactId>
				<version>3.0.2</version>
			</plugin>
			<plugin>
				<artifactId>maven-ejb-plugin</artifactId>
				<version>3.1.0</version>
			</plugin>

			<plugin>
				<artifactId>maven-install-plugin</artifactId>
				<version>3.0.0-M1</version>
			</plugin>
			<plugin>
				<artifactId>maven-jar-plugin</artifactId>
				<version>3.2.0</version>
			</plugin>
			<plugin>
				<artifactId>maven-plugin-plugin</artifactId>
				<version>3.6.0</version>
			</plugin>

			<plugin>
				<artifactId>maven-rar-plugin</artifactId>
				<version>2.4</version>
			</plugin>

			<plugin>
				<artifactId>maven-release-plugin</artifactId>
				<version>3.0.0-M1</version>
			</plugin>

			<plugin>
				<artifactId>maven-resources-plugin</artifactId>
				<version>3.1.0</version>
				<configuration>
					<encoding>${project.build.sourceEncoding}</encoding>
				</configuration>
			</plugin>

			<plugin>
				<artifactId>maven-site-plugin</artifactId>
				<version>3.9.1</version>
			</plugin>

			<plugin>
				<artifactId>maven-source-plugin</artifactId>
				<version>3.2.1</version>
			</plugin>

			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.22.1</version>
				<configuration>
					<argLine>
						--illegal-access=permit
					</argLine>
				</configuration>
				<dependencies>
					<dependency>
						<groupId>org.ow2.asm</groupId>
						<artifactId>asm</artifactId>
						<version>7.0</version>
					</dependency>
				</dependencies>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-failsafe-plugin</artifactId>
				<version>3.0.0-M5</version>
				<configuration>
					<argLine>
						--illegal-access=permit
					</argLine>
				</configuration>
			</plugin>

			<plugin>
				<groupId>org.codehaus.mojo</groupId>
				<artifactId>hibernate3-maven-plugin</artifactId>
				<version>2.2</version>
			</plugin>

		</plugins>

	</pluginManagement>

</build>

<profiles>

	<!-- Production des Sources : comme c est un peu long on met dans un profil -->

	<profile>
		<id>source</id>
		<build>
			<plugins>


			</plugins>
		</build>
	</profile>

	<profile>
		<id>cobertura-instrument</id>
		<activation>
			<property>
				<name>cobertura-build</name>
			</property>
		</activation>
		<modules>
			<module>GPJ*</module>
		</modules>
		<build>
			<plugins>
				<plugin>
					<groupId>org.codehaus.mojo</groupId>
					<artifactId>cobertura-maven-plugin</artifactId>
					<configuration>
					</configuration>
					<executions>
						<execution>
							<id>instrument-code</id>
							<phase>process-classes</phase>
							<goals>
								<goal>instrument</goal>
							</goals>
							<configuration>
								<attach>true</attach>
							</configuration>
						</execution>
					</executions>
				</plugin>
				<plugin>
					<artifactId>maven-source-plugin</artifactId>
					<executions>
						<execution>
							<id>attach-sources</id>
							<goals>
								<goal>jar</goal>
							</goals>
						</execution>
					</executions>
					<inherited>true</inherited>
				</plugin>
			</plugins>
		</build>
		<dependencies>
			<dependency>
				<groupId>net.sourceforge.cobertura</groupId>
				<artifactId>cobertura-runtime</artifactId>
				<version>${cobertura.version}</version>
				<scope>provided</scope>
				<type>pom</type>
			</dependency>
		</dependencies>
	</profile>

	<!-- org.codehaus.sonar-plugins.pdf-report:maven-pdfreport-plugin:1.3:generate -->
	<profile>
		<id>sonar-report</id>
		<build>
			<plugins>
				<plugin>
					<groupId>org.codehaus.sonar-plugins.pdf-report</groupId>
					<artifactId>maven-pdfreport-plugin</artifactId>
					<configuration>
					</configuration>
					<executions>
						<execution>
							<id>generate</id>
							<phase>compile</phase>
							<goals>
								<goal>generate</goal>
							</goals>
						</execution>
					</executions>
				</plugin>

				<plugin>
					<artifactId>maven-assembly-plugin</artifactId>
					<executions>
						<execution>
							<id>build</id>
							<goals>
								<goal>single</goal>
							</goals>
							<phase>compile</phase>
						</execution>
					</executions>
					<configuration>
						<descriptors>
							<descriptor>src/main/assembly/pdf-files.xml</descriptor>
						</descriptors>
						<outputDirectory>${sonar.pdf.directory}/${project.version}</outputDirectory>
					</configuration>
				</plugin>
			</plugins>
		</build>
	</profile>

	<!-- http://docs.oracle.com/cd/E24329_01/web.1211/e24368/maven.htm#autoId9 -->
	<profile>
		<id>wls</id>
		<build>
			<plugins>
				<plugin>
					<groupId>com.oracle.weblogic</groupId>
					<artifactId>wls-maven-plugin</artifactId>
					<version>12.1.1.0</version>
					<configuration>
						
					</configuration>
				</plugin>
			</plugins>
		</build>
	</profile>

	<profile>
		<!-- Execution des tests selenium lors de la phase integration-test -->
		<id>selenium</id>
		<build>
			<plugins>

				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-plugin</artifactId>
					<configuration>
						<skip>true</skip>
					</configuration>
					<executions>
						<execution>
							<id>surefire-selenium-test</id>
							<phase>integration-test</phase>
							<goals>
								<goal>test</goal>
							</goals>
							<configuration>
								<skip>false</skip>
								<includes>
									<include>**/*SeleniumTest.java</include>
								</includes>
							</configuration>
						</execution>
					</executions>
				</plugin>
			</plugins>
		</build>

	</profile>

	<profile>
		<!-- Construction d'une page de maven site pour rendre lisible un rapport 
			surefire xml prealablement execute -->
		<id>selenium-report</id>
		<build>
			<plugins>
				<plugin>
					<artifactId>maven-site-plugin</artifactId>
					<configuration>
						<siteDirectory>${basedir}/*/resources</siteDirectory>
					</configuration>
				</plugin>
			</plugins>
		</build>
		<reporting>
			<!-- Output dans un repertoire quelquesoit le module -->
			<!-- Attention : le dernier module execute doit etre celui qui contient 
				les tests selenium -->
			
			<outputDirectory>${selenium.report.directory}</outputDirectory>
			<plugins>
				<!-- Aucun rapport du maven site... -->
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-project-info-reports-plugin</artifactId>
					<version>3.7.0</version>
					<reportSets>
						<reportSet>
							<reports />
						</reportSet>
					</reportSets>
				</plugin>

				<!-- ... uniquement le rapport surefire -->
				<plugin>
					<groupId>org.apache.maven.plugins</groupId>
					<artifactId>maven-surefire-report-plugin</artifactId>
					<version>2.14.1</version>
					<reportSets>
						<reportSet>
							<reports>
								<report>report-only</report>
							</reports>
						</reportSet>
					</reportSets>
				</plugin>
			</plugins>
		</reporting>
	</profile>

</profiles>

@Mouna87

I have created an investigation ticket with ID EMAILJAVA-34743 in our issue tracking system to further analyze this. We will share the feedback with you as soon as the issue will be addressed.

Thanks, I ll be waiting for your response

@Mouna87

We will update you as soon as the issue will be fixed.

@Mouna87

Actually, ee need to check maven local repository JAR:

c:\Users\CurrentUser.m2\repository\com\aspose\aspose-email\20.7\aspose-email-20.7-jdk16.jar

If the JAR exists with size 1Kb we need to delete folder “…aspose-email\20.7” and reload dependency.

In the PARENT POM we need to declare Aspose.Email dependency like this:

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>com.aspose</groupId>
            <artifactId>aspose-email</artifactId>
            <version>${lib.email.aspose.version}</version>
            <classifier>jdk16</classifier>
        </dependency>
    </dependencies>
</dependencyManagement>

In the CHILD POM:

<dependencies>
    <dependency>
        <groupId>com.aspose</groupId>
        <artifactId>aspose-email</artifactId>
        <classifier>jdk16</classifier>
    </dependency>
</dependencies>

Test maven project attached(test-app.zip)
(3.0 KB)

2020-09-30 17_50_42-20.7.png (4.6 KB)

I did exactly what you recommended but I still have the same error

@Mouna87

Can you please zip the sample project that you have and share with us so that we may be able to investigate further.

I shared the pom.xml of the project

@Mouna87

Yes and in response we also shared a sample project that got configured on our end and failed on your end. Can you please possibly share the Java 11 version details and Operating System details. Please also provide the sample project (not only POM) that you tried to synch on your and which failed. We need to identify the root cause of the issue.

the java version 11.0.7
It is a dynamic web project run on tomcat 9.0.37

@Mouna87

We will apprise you further as soon as the feedback will be available.