Single Sign-On (ix)-----Encounter problems-----Filenotfoundexception:class Path Resource-usernamepasswordwrapperauthenticatio

Source: Internet
Author: User
Tags addchild



Run the CAS server project times wrong

Filenotfoundexception:class Path Resource-usernamepasswordwrapperauthenticatio


The complete information is as follows:

Org.springframework.beans.factory.BeanDefinitionStoreException:Failed to parse Configuration class [ Org.jasig.cas.authentication.MongoAuthenticationHandler]; Nested exception is java.io.FileNotFoundException:class path resource [org/jasig/cas/integration/pac4j/ Authentication/handler/support/usernamepasswordwrapperauthenticationhandler.class] cannot be opened because it does Not Existat Org.springframework.context.annotation.ConfigurationClassParser.parse (Configurationclassparser.java : 182) at Org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions ( configurationclasspostprocessor.java:321) at Org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry ( configurationclasspostprocessor.java:243) at Org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors (postprocessorregistrationdelegate.java:273) at Org.springframework.context.support.PostProcessorREgistrationdelegate.invokebeanfactorypostprocessors (postprocessorregistrationdelegate.java:98) at Org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors ( abstractapplicationcontext.java:678) at Org.springframework.context.support.AbstractApplicationContext.refresh ( abstractapplicationcontext.java:520) at Org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext (contextloader.java:444) At Org.springframework.web.context.ContextLoader.initWebApplicationContext (contextloader.java:326) at Org.springframework.web.context.ContextLoaderListener.contextInitialized (contextloaderlistener.java:107) at Org.apache.catalina.core.StandardContext.listenerStart (standardcontext.java:4939) at Org.apache.catalina.core.StandardContext.startInternal (standardcontext.java:5434) 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:633) at Org.apache.catalina.startup.HostConfig.deployDirectory (hostconfig.java:1113) at Org.apache.catalina.startup.hostconfig$deploydirectory.run (hostconfig.java:1671) 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.io.FileNotFoundException:class path resource [org/jasig/cas/integration/pac4j/ Authentication/handler/support/usernamepasswordwrapperauthenticationhandler.class] cannot be opened because it does Not Existat Org.springframework.core.io.ClassPathResource.getInputStream (classpathresource.java:172) at Org.springframework.core.type.classreading.SimpleMetadataReader.<init> (SIMPLEMETADATAREADER.JAVA:50) at Org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader ( SIMPLEMETADATAREADERFACTORY.JAVA:98) at Org.springframework.core.type.classreading.CachingMetadataReaderFactory.getMetadataReader ( CACHINGMETADATAREADERFACTORY.JAVA:102) at Org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader ( simplemetadatareaderfactory.java:93) at Org.springframework.context.annotation.ConfigurationClassParser.asSourceClass (Configurationclassparser.java : 641) at Org.springframework.context.annotation.configurationclassparser$sourceclass.getsuperclass ( configurationclassparser.java:804) at Org.springframework.context.annotation.ConfigurationClassParser.doProcessConfigurationClass ( configurationclassparser.java:306) at Org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass ( configurationclassparser.java:232) at Org.springframework.context.annotation.ConfigurationClassParser.parse (configurationclassparser.java:199) at Org.springframework.context.annotation.ConfigurationClassParser.parse ( configurationclassparser.java:168) ... More


It is literal to understand that the file Usernamepasswordwrapperauthenticationhandler is not found in the edit file.


In other words, some packages may not be loaded or the publishing path is incorrect.


The error you quoted may not be the file. But the solution should be similar.



Workaround:

In MyEclipse, click Ctrl+shift+t, then enter the class name and click the double arrow in the Package Explorer to find out which sub-project the class is in.


Then add the project to the reference.


The methods for adding references can be consulted:

Single Sign-On (iv)-----Encounter problems-----CAS Server source deployment Tomcat run error ClassNotFoundException:org.jasig.cas.CasEnvironmentCo








Single Sign-On (ix)-----Encounter problems-----Filenotfoundexception:class Path Resource-usernamepasswordwrapperauthenticatio

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.