spring boot console app: Exception in thread "main" java.lang.NoClassDefFoundError - java

i am working on a spring boot console app, i was getting an error so i deleted .m2 repository and updated the maven project.
but after doing this i got some spring Apllication errors.
these errors went after adding spring boot dependency but still i am not able to run the app.
i am getting the following error.
Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/beans/factory/ListableBeanFactory
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.springframework.beans.factory.ListableBeanFactory
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 13 more
This is my pom file dependencies
<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</artifactId>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot</artifactId>
<version>1.0.0.RELEASE</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-autoconfigure -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
<version>2.0.3.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>4.2.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>4.2.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
</dependency>
<!-- https://mvnrepository.com/artifact/org.projectlombok/lombok -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-text -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-text</artifactId>
<version>1.4</version>
</dependency>
<!-- Apache commons collections dependency -->
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-collections4</artifactId>
<version>4.1</version>
</dependency>
<!-- https://mvnrepository.com/artifact/javax.inject/javax.inject -->
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-search-orm</artifactId>
<version>5.2.0.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
</dependency>
<!-- Hibernate Validator Dependency -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>5.1.3.Final</version>
</dependency>
<!-- Querydsl dependencies -->
<dependency>
<groupId>com.querydsl</groupId>
<artifactId>querydsl-apt</artifactId>
</dependency>
<dependency>
<groupId>com.querydsl</groupId>
<artifactId>querydsl-jpa</artifactId>
</dependency>
<!-- Jackson JSON Mapper -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-xml</artifactId>
</dependency>
<!-- Hikari jdbc data surce -->
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
</dependency>
<!-- Hikari jdbc data surce -->
<dependency>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId>
</dependency>
<!-- https://mvnrepository.com/artifact/javax.el/el-api -->
<dependency>
<groupId>javax.el</groupId>
<artifactId>el-api</artifactId>
<version>2.2.1-b04</version>
</dependency>
<!-- Mysql connector -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<dependency>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-queryparser</artifactId>
<version>4.10.4</version>
</dependency>
<dependency>
<groupId>javax.transaction</groupId>
<artifactId>javax.transaction-api</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>4.2.0.RELEASE</version>
<exclusions>
<!-- Exclude Commons Logging in favor of SLF4j -->
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>4.2.0.RELEASE</version>
</dependency>
</dependencies>
how can i solve this issue?

You need to fix your pom file. Have a look at it. You have spring boot starter v2 at the same time you have spring boot v1 with spring auto-configure. Either go with spring boot starters or no. Don't mix dependencies like that.

Related

Running Spring application returns ClassNotFounfException : ApplicationStartup

I am trying to run a simple email sending application with Spring and Javax Mail API using Maven, however on launch it returns an exception.
Exception in thread "main" java.lang.NoClassDefFoundError: org/springframework/core/metrics/ApplicationStartup
at org.springframework.boot.SpringApplication.<init>(SpringApplication.java:233)
at org.springframework.boot.SpringApplication.<init>(SpringApplication.java:246)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1306)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1295)
at Email.Email.run(Email.java:19)
at Menu.Menu.menu(Menu.java:28)
at org.example.Main.main(Main.java:25)
Caused by: java.lang.ClassNotFoundException: org.springframework.core.metrics.ApplicationStartup
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 7 more
My pom.xml dependencies are like this
<dependencies>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId>
<version>2.19.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
<version>2.19.0</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>5.2.9.RELEASE</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>javax.mail</artifactId>
<version>1.6.2</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<version>5.3.23</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
<version>2.7.5</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<version>2.7.5</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot</artifactId>
<version>2.7.5</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework/spring-context -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>5.3.23</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework/spring-webmvc -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>5.3.23</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-autoconfigure -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
<version>2.7.5</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>RELEASE</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>RELEASE</version>
<scope>test</scope>
</dependency>
</dependencies>
Tried downgrading to 2.3.3, got a different exception: ClassNotFound: NativeDetector instead of ApplicationStartup.
mvn clean installing changed nothing, deleting and reinstalling contents of .m2 folder didn't help either.
Would be grateful to hear an advice. Thank you.

Maven dependencies required in pom.xml for downloading a document from alfresco

In my java maven project there is a requirement to download documents from Alfresco.
I'm not able to figure out which are the dependencies to be added in the pom file for the same.
Hope some of you can help.
Thanks in advance...
Adding the maven dependencies I tried with
<!-- GROSS -->
<dependency>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-web-service-client</artifactId>
<version>3.3</version>
</dependency>
<dependency>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-web-client</artifactId>
<version>3.3</version>
</dependency>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>org.apache.axis</groupId>
<artifactId>axis</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>commons-discovery</groupId>
<artifactId>commons-discovery</artifactId>
<version>0.4</version>
</dependency>
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk15on</artifactId>
<version>1.52</version>
</dependency>
<dependency>
<groupId>ultimatixWPSWebServiceClient</groupId>
<artifactId>ultimatixWPSWebServiceClient</artifactId>
<version>19.1.1-1</version>
</dependency>
<dependency>
<groupId>commons-el</groupId>
<artifactId>commons-el</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>wsdl4j</groupId>
<artifactId>wsdl4j</artifactId>
<version>1.6.2</version>
</dependency>
<dependency>
<groupId>org.apache.ws.security</groupId>
<artifactId>wss4j</artifactId>
<version>1.5.8</version>
</dependency>
<dependency>
<groupId>org.apache.santuario</groupId>
<artifactId>xmlsec</artifactId>
<version>1.4.0</version>
</dependency>
<dependency>
<groupId>xerces</groupId>
<artifactId>xercesImpl</artifactId>
<version>2.9.1</version>
</dependency>
<dependency>
<groupId>org.apache.myfaces.core</groupId>
<artifactId>myfaces-api</artifactId>
<version>1.1.5</version>
</dependency>
<dependency>
<groupId>org.apache.myfaces.core</groupId>
<artifactId>myfaces-impl</artifactId>
<version>1.1.5</version>
</dependency>
<dependency>
<groupId>org.apache.myfaces.tomahawk</groupId>
<artifactId>tomahawk</artifactId>
<version>1.1.9</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.6</version>
</dependency>
<dependency>
<groupId>xerces</groupId>
<artifactId>xerces</artifactId>
<version>2.4.0</version>
</dependency>
<dependency>
<groupId>commons-digester</groupId>
<artifactId>commons-digester</artifactId>
<version>2.1</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.3</version>
</dependency>
** AND I was getting error on server starting **
ERROR [org.apache.commons.digester.Digester] (ServerService Thread Pool -- 200) Parse Error at line 2 column 14: Document is invalid: no grammar found.: org.xml.sax.SAXParseException; systemId: jar:file:/D:/Softwares/jboss-eap-7.2/modules/system/layers/base/org/jboss/as/jsf-injection/main/wildfly-jsf-injection-7.2.0.GA-redhat-00005.jar!/META-INF/faces-config.xml; lineNumber: 2; columnNumber: 14; Document is invalid: no grammar found.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
There are 2 way you can download document from alfresco.
User alfresco rest-api https://api-explorer.alfresco.com/api-explorer/
Use cmis in you java code. https://ecmarchitect.com/archives/tag/opencmis
Please give a try with the latest version of the alfresco web service client, seems like you are using a old version.
<!-- https://mvnrepository.com/artifact/org.alfresco/alfresco-web-service-client -->
<dependency>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-web-service-client</artifactId>
<version>5.0.a</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.alfresco/alfresco-web-client -->
<dependency>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-web-client</artifactId>
<version>4.2.f</version>
</dependency>
Also you can use the Rest api explorer if you were using Alfresco 5.2 or higher to download a document.
https://api-explorer.alfresco.com/api-explorer/#!/nodes/getNodeContent

java.lang.NoSuchMethodError: org.springframework.core.annotation.AnnotatedElementUtils.getAnnotationAttributes

guys.I am new here.
I try to run a simple JUnit test case for spring service class and dao class, but it fails and I get this exception. It is a maven project and I use the tomcat v7.0.
I will show the Failure trace in following .It has no console.
Please Help。
java.lang.NoSuchMethodError: org.springframework.core.annotation.AnnotatedElementUtils.getAnnotationAttributes(java/lang/reflect/Annotateenter Element;java/lang/String;)
org/springframework/core/annotation/AnnotationAttributes;
at org.springframework.test.util.Menter code hereetaAnnotationUtils$AnnotationDescriptor.<init>(MetaAnnotationUtils.java:289)
at org.springframework.test.util.MetaAnnotationUtils$UntypedAnnotationDescriptor.<init>(MetaAnnotationUtils.java:349)
at org.springframework.test.util.MetaAnnotationUtils$UntypedAnnotationDescriptor.<init>(MetaAnnotationUtils.java:344)
at org.springframework.test.util.MetaAnnotationUtils.findAnnotationDescriptorForTypes(MetaAnnotationUtils.java:191)
at org.springframework.test.util.MetaAnnotationUtils.findAnnotationDescriptorForTypes(MetaAnnotationUtils.java:208)
at org.springframework.test.util.MetaAnnotationUtils.findAnnotationDescriptorForTypes(MetaAnnotationUtils.java:166)
at org.springframework.test.context.support.AbstractTestContextBootstrapper.buildMergedContextConfiguration(AbstractTestContextBootstrapper.java:271)
at org.springframework.test.context.DefaultTestContext.<init>(DefaultTestContext.java:67)
at org.springframework.test.context.TestContextManager.<init>(TestContextManager.java:103)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTestContextManager(SpringJUnit4ClassRunner.java:124)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.<init>(SpringJUnit4ClassRunner.java:115)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:104)
at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:86)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:33)
The following is my maven project's pom.xml.
<dependencies>
<!-- junit test -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
<!-- 4)Spring test -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>4.1.6.RELEASE</version>
<scope>test</scope>
</dependency>
<!-- 1. -->
<!-- slf4j -->
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.2.3</version>
</dependency>
<!-- 2.mysql -->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.37</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>c3p0</groupId>
<artifactId>c3p0</artifactId>
<version>0.9.1.2</version>
</dependency>
<!-- DAO: MyBatis -->
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
<version>3.4.2</version>
</dependency>
<dependency>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-spring</artifactId>
<version>1.3.1</version>
</dependency>
<!-- 3.Servlet web -->
<dependency>
<groupId>taglibs</groupId>
<artifactId>standard</artifactId>
<version>1.1.2</version>
</dependency>
<dependency>
<groupId>jstl</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<!-- json -->
<!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-databind -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.8.7</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
</dependency>
<!-- 4.Spring -->
<!-- 1)Spring core -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>5.0.6.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>5.0.6.RELEASE</version>
</dependency>
<!-- <dependency> <groupId>org.springframework</groupId> <artifactId>spring-context</artifactId>
<version>${spring.version}</version> </dependency> -->
<!-- https://mvnrepository.com/artifact/org.springframework/spring-context -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>5.0.6.RELEASE</version>
</dependency>
<!-- 2)Spring DAO -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>5.0.6.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>5.0.6.RELEASE</version>
</dependency>
<!-- 3)Spring web -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>5.0.6.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>5.0.6.RELEASE</version>
</dependency>
<!-- redis:Jedis -->
<dependency>
<groupId>redis.clients</groupId>
<artifactId>jedis</artifactId>
<version>2.9.0</version>
</dependency>
<dependency>
<groupId>com.dyuproject.protostuff</groupId>
<artifactId>protostuff-core</artifactId>
<version>1.0.12</version>
</dependency>
<dependency>
<groupId>com.dyuproject.protostuff</groupId>
<artifactId>protostuff-runtime</artifactId>
<version>1.0.12</version>
</dependency>
Looking forward to your quick answer.Thanks!

Definitions-App throws an exception on start after update to Magnolia 5.5.7

I'm testing a possible upgrade of Magnolia to Version 5.5.7 (from Version 5.3.14), i got it so far that our project works completely and i get no warnings on startup anymore.
I followed the recommended update steps stated in Magnolia's documentation:
https://documentation.magnolia-cms.com/display/DOCS/Updating+Magnolia
But when i try to open the definitions app the sub-app "overview" it uses throws a NullPointerException and i can't figure out why.
The Error persists even when i delete and recreate the entire repository so i think it has something to do with dependencies, unfortunately i don't know a lot about dependency implications in Magnolia i'm just using the packages and versions recommended plus what we used before to compile the project.
Stacktrace:
ERROR agnolia.ui.framework.app.AppInstanceControllerImpl: Sub-app overview failed to start: null java.lang.NullPointerException
at java.util.Comparators$NaturalOrderComparator.compare(Unknown Source)
at java.util.Comparators$NaturalOrderComparator.compare(Unknown Source)
at java.util.TimSort.binarySort(Unknown Source)
at java.util.TimSort.sort(Unknown Source)
at java.util.Arrays.sort(Unknown Source)
at java.util.ArrayList.sort(Unknown Source)
at java.util.stream.SortedOps$RefSortingSink.end(Unknown Source)
at java.util.stream.DistinctOps$1$2.end(Unknown Source)
at java.util.stream.Sink$ChainedReference.end(Unknown Source)
at java.util.stream.Sink$ChainedReference.end(Unknown Source)
at java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source)
at java.util.stream.AbstractPipeline.evaluate(Unknown Source)
at java.util.stream.ReferencePipeline.collect(Unknown Source)
at info.magnolia.definitions.app.overview.toolbar.ToolbarPresenter.getModuleNames(ToolbarPresenter.java:98)
POM-File dependencies:
parent:
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<skipTests>false</skipTests>
<javaVersion>1.8</javaVersion>
<magnoliaVersion>5.5.7</magnoliaVersion>
<blossomVersion>3.1.4</blossomVersion>
<magnoliaDAMVersion>2.2.7</magnoliaDAMVersion>
<springVersion>4.3.1.RELEASE</springVersion>
<luceneVersion>3.6.2</luceneVersion>
<siteVersion>1.1.2</siteVersion>
<stkVersion>3.0.2</stkVersion>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>info.magnolia.bundle</groupId>
<artifactId>magnolia-bundle-parent</artifactId>
<version>${magnoliaVersion}</version>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>
<repositories>
<repository>
<id>magnolia.nexus.public</id>
<url>https://nexus.magnolia-cms.com/content/groups/public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>vaadin.nexus.public</id>
<url>http://vaadin.com/nexus/content/repositories/vaadin-addons/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
webapp:
<dependencies>
<!-- magnolia -->
<dependency>
<groupId>info.magnolia.blossom</groupId>
<artifactId>magnolia-module-blossom</artifactId>
<version>${blossomVersion}</version>
<exclusions>
<exclusion>
<groupId>info.magnolia.ui</groupId>
<artifactId>magnolia-ui-framework</artifactId>
</exclusion>
<exclusion>
<groupId>info.magnolia.ui</groupId>
<artifactId>magnolia-ui-admincentral</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>info.magnolia.documentation</groupId>
<artifactId>app-searchaliases</artifactId>
<version>1.4.8</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>info.magnolia</groupId>
<artifactId>magnolia-empty-webapp</artifactId>
<version>${magnoliaVersion}</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>info.magnolia</groupId>
<artifactId>magnolia-empty-webapp</artifactId>
<version>${magnoliaVersion}</version>
<type>war</type>
</dependency>
<dependency>
<groupId>info.magnolia</groupId>
<artifactId>magnolia-core</artifactId>
<version>${magnoliaVersion}</version>
</dependency>
<dependency>
<groupId>info.magnolia</groupId>
<artifactId>magnolia-rendering</artifactId>
<version>${magnoliaVersion}</version>
</dependency>
<dependency>
<groupId>info.magnolia</groupId>
<artifactId>magnolia-templating</artifactId>
<version>${magnoliaVersion}</version>
</dependency>
<dependency>
<groupId>info.magnolia</groupId>
<artifactId>magnolia-templating-jsp</artifactId>
<version>${magnoliaVersion}</version>
</dependency>
<dependency>
<groupId>info.magnolia</groupId>
<artifactId>magnolia-module-data</artifactId>
<version>2.3.5</version>
</dependency>
<dependency>
<groupId>info.magnolia.ui</groupId>
<artifactId>magnolia-ui-framework</artifactId>
<version>${magnoliaVersion}</version>
</dependency>
<dependency>
<groupId>info.magnolia.ui</groupId>
<artifactId>magnolia-ui-admincentral</artifactId>
<version>${magnoliaVersion}</version>
</dependency>
<dependency>
<groupId>info.magnolia</groupId>
<artifactId>magnolia-module-scheduler</artifactId>
<version>2.3.1</version>
</dependency>
<!-- legacy/compatibility -->
<dependency>
<groupId>info.magnolia</groupId>
<artifactId>magnolia-module-legacy-admininterface</artifactId>
<version>5.3.3</version>
</dependency>
<dependency>
<groupId>info.magnolia</groupId>
<artifactId>magnolia-core-compatibility</artifactId>
<version>${magnoliaVersion}</version>
</dependency>
<dependency>
<groupId>info.magnolia</groupId>
<artifactId>magnolia-module-public-user-registration</artifactId>
<version>2.6.1</version>
</dependency>
<dependency>
<groupId>info.magnolia.pur</groupId>
<artifactId>magnolia-module-public-user-registration-legacy</artifactId>
<version>2.6.1</version>
<type>jar</type>
</dependency>
<dependency>
<groupId>info.magnolia.devdect</groupId>
<artifactId>magnolia-module-device-detection</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>info.magnolia.definitions</groupId>
<artifactId>magnolia-definitions-app</artifactId>
<version>1.0.2</version>
</dependency>
<!-- /legacy/compatibility -->
<dependency>
<groupId>info.magnolia.templating</groupId>
<artifactId>magnolia-templating-essentials-models</artifactId>
<version>1.1.4</version>
</dependency>
<dependency>
<groupId>info.magnolia</groupId>
<artifactId>magnolia-module-categorization</artifactId>
<version>2.5.3</version>
</dependency>
<dependency>
<groupId>info.magnolia.categorization</groupId>
<artifactId>magnolia-categorization-support</artifactId>
<version>2.5.3</version>
</dependency>
<dependency>
<groupId>info.magnolia</groupId>
<artifactId>magnolia-module-rssaggregator</artifactId>
<version>2.5.2</version>
</dependency>
<dependency>
<groupId>info.magnolia</groupId>
<artifactId>magnolia-module-groovy</artifactId>
<version>2.5.2</version>
</dependency>
<dependency>
<groupId>info.magnolia.dam</groupId>
<artifactId>magnolia-dam</artifactId>
<version>${magnoliaDAMVersion}</version>
</dependency>
<dependency>
<groupId>info.magnolia.dam</groupId>
<artifactId>magnolia-dam-api</artifactId>
<version>${magnoliaDAMVersion}</version>
</dependency>
<dependency>
<groupId>info.magnolia.dam</groupId>
<artifactId>magnolia-dam-app</artifactId>
<version>${magnoliaDAMVersion}</version>
</dependency>
<dependency>
<groupId>info.magnolia.dam</groupId>
<artifactId>magnolia-dam-compatibility</artifactId>
<version>${magnoliaDAMVersion}</version>
</dependency>
<dependency>
<groupId>info.magnolia.dam</groupId>
<artifactId>magnolia-dam-core</artifactId>
<version>${magnoliaDAMVersion}</version>
</dependency>
<dependency>
<groupId>info.magnolia.dam</groupId>
<artifactId>magnolia-dam-jcr</artifactId>
<version>${magnoliaDAMVersion}</version>
</dependency>
<dependency>
<groupId>info.magnolia.dam</groupId>
<artifactId>magnolia-dam-templating</artifactId>
<version>${magnoliaDAMVersion}</version>
</dependency>
<dependency>
<groupId>info.magnolia.ui</groupId>
<artifactId>magnolia-ui-contentapp</artifactId>
<version>${magnoliaVersion}</version>
</dependency>
<dependency>
<groupId>info.magnolia.activation</groupId>
<artifactId>magnolia-module-activation</artifactId>
<version>5.5.5</version>
</dependency>
<dependency>
<groupId>info.magnolia</groupId>
<artifactId>magnolia-module-webdav</artifactId>
<version>2.1.3</version>
</dependency>
<dependency>
<groupId>info.magnolia</groupId>
<artifactId>magnolia-core</artifactId>
<version>${magnoliaVersion}</version>
<type>test-jar</type>
<scope>test</scope>
</dependency>
<dependency>
<groupId>info.magnolia</groupId>
<artifactId>magnolia-module-imaging</artifactId>
<version>3.3.1</version>
</dependency>
<dependency>
<groupId>info.magnolia</groupId>
<artifactId>magnolia-imaging-support</artifactId>
<version>3.3.1</version>
</dependency>
<dependency>
<groupId>info.magnolia.site</groupId>
<artifactId>magnolia-site</artifactId>
<version>${siteVersion}</version>
</dependency>
<dependency>
<groupId>info.magnolia.site</groupId>
<artifactId>magnolia-site-app</artifactId>
<version>${siteVersion}</version>
</dependency>
<dependency>
<groupId>info.magnolia.cache</groupId>
<artifactId>magnolia-cache-app</artifactId>
<version>5.5.7-SNAPSHOT</version>
</dependency>
<!-- needed for public registration / form-module -->
<dependency>
<groupId>info.magnolia</groupId>
<artifactId>magnolia-module-mail</artifactId>
<version>5.4.2</version>
</dependency>
<dependency>
<groupId>info.magnolia</groupId>
<artifactId>magnolia-module-form</artifactId>
<version>2.3.8</version>
</dependency>
<dependency>
<groupId>info.magnolia.core</groupId>
<artifactId>magnolia-resource-loader</artifactId>
<version>${magnoliaVersion}</version>
</dependency>
<dependency>
<groupId>info.magnolia</groupId>
<artifactId>magnolia-module-forum</artifactId>
<version>3.6.2</version>
</dependency>
<dependency>
<groupId>info.magnolia</groupId>
<artifactId>magnolia-module-inplace-templating</artifactId>
<version>2.4.4</version>
</dependency>
<!-- spring -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${springVersion}</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<version>${springVersion}</version>
<exclusions>
<exclusion>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- logging -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.25</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.7</version>
</dependency>
<dependency>
<groupId>info.magnolia.log</groupId>
<artifactId>magnolia-log-tools</artifactId>
<version>1.0.3</version>
</dependency>
<!-- provided stuff -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.1.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jsp-api</artifactId>
<version>2.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.validation</groupId>
<artifactId>validation-api</artifactId>
<version>2.0.0.Final</version>
</dependency>
<!-- TEST -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${springVersion}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>org.jdom</groupId>
<artifactId>jdom2</artifactId>
<version>2.0.6</version>
</dependency>
<dependency>
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.10.3</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>6.0.3.Final</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.mchange</groupId>
<artifactId>c3p0</artifactId>
<version>0.9.5.2</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.33</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.mariadb.jdbc/mariadb-java-client -->
<dependency>
<groupId>org.mariadb.jdbc</groupId>
<artifactId>mariadb-java-client</artifactId>
<version>1.6.5</version>
</dependency>
<dependency>
<groupId>nl.captcha</groupId>
<artifactId>simplecaptcha</artifactId>
<version>1.2.1-mvn</version>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-analyzers</artifactId>
<version>${luceneVersion}</version>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-highlighter</artifactId>
<version>${luceneVersion}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<version>${springVersion}</version>
</dependency>
<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-jpa</artifactId>
<version>2.0.0.RELEASE</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.9.2</version>
</dependency>
</dependencies>
Do anyone have a clue for me of why this error appears?
Update:
Updating Magnolia to Version 5.6 with blossom 3.2 fixed the error for me
I'd guess you ran into https://jira.magnolia-cms.com/browse/PSWDMNGR-7
Try to exclude password manager module or replace it's version with 1.0.1-SNAPSHOT that has this issue fixed (don't take 1.2, that's compatible only w/ Magnolia 5.6).
HTH,
Jan

java.lang.IllegalAccessError: class javax.xml.parsers.SecuritySupport12 cannot access its superclass javax.xml.parsers.SecuritySupport

I am using spring+maven. I am deploying my application in tomcat server. All of a sudden when I try to run my application I am geeting the following error.
INFO: Starting Servlet Engine: Apache Tomcat/7.0.16
java.lang.IllegalAccessError: class javax.xml.parsers.SecuritySupport12 cannot access its superclass javax.xml.parsers.SecuritySupport
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2818)
at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1148)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1643)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1521)
at org.apache.catalina.startup.ContextConfig.checkHandlesTypes(ContextConfig.java:1948)
at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:1911)
at org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:1800)
at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1768)
at org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1754)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1266)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:881)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:316)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5103)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1033)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:774)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1033)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:291)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:727)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
at org.apache.catalina.startup.Catalina.start(Catalina.java:620)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:303)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:431)
and also the Tomcat Server does not start.
This is my pom.xml file
<properties>
<maven.test.failure.ignore>true</maven.test.failure.ignore>
<spring.framework.version>3.2.2.RELEASE</spring.framework.version>
<hibernate.version>4.1.10.Final</hibernate.version>
<sl4j.version>1.7.2</sl4j.version>
</properties>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
<version>${spring.framework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aspects</artifactId>
<version>${spring.framework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>${spring.framework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
<version>${spring.framework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context-support</artifactId>
<version>${spring.framework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.framework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-expression</artifactId>
<version>${spring.framework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-instrument</artifactId>
<version>${spring.framework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-instrument-tomcat</artifactId>
<version>${spring.framework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
<version>${spring.framework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jms</artifactId>
<version>${spring.framework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>${spring.framework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-oxm</artifactId>
<version>${spring.framework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-struts</artifactId>
<version>${spring.framework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-tx</artifactId>
<version>${spring.framework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.framework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.framework.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc-portlet</artifactId>
<version>${spring.framework.version}</version>
</dependency>
<!--***************POSTGRES DEPENDENCIES***************-->
<dependency>
<groupId>postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>9.1-901.jdbc4</version>
</dependency>
<!--***************HIBERNATE DEPENDENCIES***************-->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>${hibernate.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>${hibernate.version}</version>
</dependency>
<!--***************JAVAX DEPENDENCIES***************-->
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
<version>1.0.2</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.transaction</groupId>
<artifactId>jta</artifactId>
<version>1.1</version>
</dependency>
<!-- <dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.5</version>
<scope>provided</scope>
</dependency> -->
<!--***************ASPECTJ DEPENDENCIES***************-->
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjrt</artifactId>
<version>1.7.2</version>
</dependency>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>1.7.2</version>
</dependency>
<!--***************OTHER DEPENDENCIES***************-->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-jcl</artifactId>
<version>${sl4j.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>${sl4j.version}</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>apache-log4j-extras</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>cglib</groupId>
<artifactId>cglib</artifactId>
<version>2.2.2</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
<artifactId>commons-dbcp</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>commons-pool</groupId>
<artifactId>commons-pool</artifactId>
<version>1.6</version>
</dependency>
<dependency>
<groupId>net.sf.ehcache</groupId>
<artifactId>ehcache-core</artifactId>
<version>2.6.5</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-json-org</artifactId>
<version>2.0.2</version>
</dependency>
<dependency>
<groupId>org.tcs.com.prime</groupId>
<artifactId>PrimeLEHS</artifactId>
<version>1.9</version>
</dependency>
<dependency>
<groupId>org.owasp.esapi</groupId>
<artifactId>esapi</artifactId>
<version>2.0_rc11</version>
</dependency>
<!--***************TEST DEPENDENCIES***************-->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.11</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>${spring.framework.version}</version>
</dependency>
</dependencies>
Plese help me out. I am in deep struggle. Thanks
This blog post has the answer:
Add metadata-complete="true" in your web.xml to override default properties of 3.0 for annotations. By default, Tomcat 7 will scan all of your class files for annotations and attempt to deploy any classes found with web descriptors it understands. Setting metadata-complete tells tomcat that the web.xml and other descriptor files are complete, and not to bother with the annotations.
Reference
There are problems with Tomcat Servlet 3.0 support in <7.0.15. Upgrading to a later version should resolve this issue.
Source: https://issues.apache.org/bugzilla/show_bug.cgi?id=51278
I got this error due to some issue in Mockito test, adding this solves the problem.
#PowerMockIgnore({"com.sun.org.apache.xerces.*", "javax.xml.*", "org.xml.*", "javax.management.*"})
reference: https://github.com/mockito/mockito/issues/1562

Categories