Tomcat launcher error Listenerstart Errors | "Beans" must match DOCTYPE root "null" | Java.lang.reflect.MalformedParameterizedTypeException

Source: Internet
Author: User
Tags addchild

When Maven packaged and released the project, it was published with an error fail-deployed application at the context Path/ch but the context failed to start

Restart Tomcat on the server and see only the error:

Severity: Error Listenerstart
January 13, 2015 9:59:05 am org.apache.catalina.core.StandardContext startinternal
Severity: Context [/PMF] startup failed due to previous errors

no specific error message, online search error Listenerstart, said re-configuration under the log print can see specific information , see:http://xpenxpen.iteye.com/blog/1545648

Then we see that the specific error is

January 13, 2015 10:40:24 am org.apache.catalina.core.StandardContext listenerstart
Severity: Exception sending context initialized event to listener instance of class Org.springframework.web.context.ContextLoad Erlistener
Org.springframework.beans.factory.BeanDefinitionStoreException:Line XML document from class path resource [ Applicationcontext.xml] is invalid; Nested exception is org.xml.sax.SAXParseException:document root element "Beans" must match DOCTYPE root "null"。
Org.xml.sax.SAXParseException; linenumber:20; Columnnumber:5; The document root element "Beans" must match the DOCTYPE root "null".
At Com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException (Errorhandlerwrapper.java : 198)
At Com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error (errorhandlerwrapper.java:134)
At Com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError (xmlerrorreporter.java:437)
At Com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError (xmlerrorreporter.java:368)
At Com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError (xmlerrorreporter.java:325)
At Com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.rootElementSpecified (xmldtdvalidator.java:1599)
At Com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.handleStartElement (xmldtdvalidator.java:1877)
At Com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.startElement (xmldtdvalidator.java:742)
At Com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement ( xmldocumentfragmentscannerimpl.java:1362)
At Com.sun.org.apache.xerces.internal.impl.xmldocumentscannerimpl$contentdriver.scanrootelementhook ( xmldocumentscannerimpl.java:1292)
At Com.sun.org.apache.xerces.internal.impl.xmldocumentfragmentscannerimpl$fragmentcontentdriver.next ( xmldocumentfragmentscannerimpl.java:3122)
At Com.sun.org.apache.xerces.internal.impl.xmldocumentscannerimpl$prologdriver.next (XMLDocumentScannerImpl.java : 880)
At Com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next (xmldocumentscannerimpl.java:606)
.....

The search for "document root element" Beans "must match DOCTYPE root" null ". "read a lot of posts before you find the answer. See:http://blog.csdn.net/trwhoya/article/details/4312776

Know is the spring version of the problem, so the 1.2.6 Spring.jar package replaced with 2.5.6. So the question came again. Error:

    

January 13, 2015 11:31:26 am org.apache.catalina.core.StandardContext listenerstart
Severity: Exception sending context initialized event to listener instance of class Org.springframework.web.context.ContextLoad Erlistener
Org.springframework.beans.factory.BeanCreationException:Error creating Bean with Name ' sessionfactory ' defined in Class path resource [Applicationcontext.xml]: Initialization of Bean failed; Nested exception is java.lang.reflect.MalformedParameterizedTypeException
At Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean ( abstractautowirecapablebeanfactory.java:480)
At Org.springframework.beans.factory.support.abstractautowirecapablebeanfactory$1.run ( abstractautowirecapablebeanfactory.java:409)
At java.security.AccessController.doPrivileged (Native Method)
At Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean ( abstractautowirecapablebeanfactory.java:380)
At Org.springframework.beans.factory.support.abstractbeanfactory$1.getobject (abstractbeanfactory.java:264)
At Org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton ( defaultsingletonbeanregistry.java:222)
At Org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean (abstractbeanfactory.java:261)
At Org.springframework.beans.factory.support.AbstractBeanFactory.getBean (abstractbeanfactory.java:185)
At Org.springframework.beans.factory.support.AbstractBeanFactory.getBean (abstractbeanfactory.java:164)
At Org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons ( defaultlistablebeanfactory.java:423)
At Org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization ( abstractapplicationcontext.java:728)
At Org.springframework.context.support.AbstractApplicationContext.refresh (abstractapplicationcontext.java:380)
At Org.springframework.web.context.ContextLoader.createWebApplicationContext (contextloader.java:255)
At Org.springframework.web.context.ContextLoader.initWebApplicationContext (contextloader.java:199)
At Org.springframework.web.context.ContextLoaderListener.contextInitialized (contextloaderlistener.java:45)
At Org.apache.catalina.core.StandardContext.listenerStart (standardcontext.java:4992)
At Org.apache.catalina.core.StandardContext.startInternal (standardcontext.java:5490)
At Org.apache.catalina.util.LifecycleBase.start (lifecyclebase.java:150)
At Org.apache.catalina.core.ContainerBase.addChildInternal (containerbase.java:901)
At Org.apache.catalina.core.ContainerBase.addChild (containerbase.java:877)
At Org.apache.catalina.core.StandardHost.addChild (standardhost.java:649)
At Org.apache.catalina.startup.HostConfig.deployWAR (hostconfig.java:1083)
At Org.apache.catalina.startup.hostconfig$deploywar.run (hostconfig.java:1880)
At Java.util.concurrent.executors$runnableadapter.call (executors.java:471)
At Java.util.concurrent.FutureTask.run (futuretask.java:262)
At Java.util.concurrent.ThreadPoolExecutor.runWorker (threadpoolexecutor.java:1145)
At Java.util.concurrent.threadpoolexecutor$worker.run (threadpoolexecutor.java:615)
At Java.lang.Thread.run (thread.java:744)
caused By:java.lang.reflect.MalformedParameterizedTypeException
At Sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.validateConstructorArguments ( PARAMETERIZEDTYPEIMPL.JAVA:60)
At Sun.reflect.generics.reflectiveobjects.parameterizedtypeimpl.<init> (parameterizedtypeimpl.java:53)
At Sun.reflect.generics.reflectiveObjects.ParameterizedTypeImpl.make (parameterizedtypeimpl.java:95)
At Sun.reflect.generics.factory.CoreReflectionFactory.makeParameterizedType (corereflectionfactory.java:105)
At Sun.reflect.generics.visitor.Reifier.visitClassTypeSignature (reifier.java:140)
At Sun.reflect.generics.tree.ClassTypeSignature.accept (classtypesignature.java:49)
At Sun.reflect.generics.repository.ClassRepository.getSuperInterfaces (classrepository.java:100)
At Java.lang.Class.getGenericInterfaces (class.java:814)
At Org.springframework.core.GenericTypeResolver.getTypeVariableMap (generictyperesolver.java:151)
At Org.springframework.core.GenericTypeResolver.resolveParameterType (generictyperesolver.java:81)
At Org.springframework.beans.GenericTypeAwarePropertyDescriptor.getWriteMethodParameter ( GENERICTYPEAWAREPROPERTYDESCRIPTOR.JAVA:109)
At Org.springframework.beans.GenericTypeAwarePropertyDescriptor.getPropertyType ( generictypeawarepropertydescriptor.java:91)
At Org.springframework.beans.TypeConverterDelegate.convertIfNecessary (typeconverterdelegate.java:138)
At Org.springframework.beans.BeanWrapperImpl.convertForProperty (beanwrapperimpl.java:386)
At Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.convertForProperty ( abstractautowirecapablebeanfactory.java:1289)
At Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues ( ABSTRACTAUTOWIRECAPABLEBEANFACTORY.JAVA:1250)
At Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean ( abstractautowirecapablebeanfactory.java:1010)
At Org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean ( abstractautowirecapablebeanfactory.java:472)
... More

then the search for cause by that "java.lang.reflect.MalformedParameterizedTypeException" finally solved the problem, See: http://dikar.iteye.com/blog/1452680

The comment on the bottom floor is still the version of spring, so the Maven config file pom.xml to delete spring's dependency.

Tomcat launcher error Listenerstart Errors | "Beans" must match DOCTYPE root "null" | Java.lang.reflect.MalformedParameterizedTypeException

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.