Ted,

Does cas run with no debug config or is the error only happen when trying to 
debug?

Perhaps search for 'localeResolver' to see why it is defined more than once.

Ray

On Thu, 2021-06-24 at 19:37 -0700, Ted wrote:
Notice: This message was sent from outside the University of Victoria email 
system. Please be cautious with links and sensitive information.

I want to run cas in ide and debug it.
I 've done as https://apereo.github.io/cas/developer/Build-Process-6X.html
clone cas-server master success
this is debug configuration
[20210625103500.png]

but it can't run

D:\DevInstall\Java\jdk-11.0.2\bin\java.exe 
-agentlib:jdwp=transport=dt_socket,address=127.0.0.1:62571,suspend=y,server=n 
-XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always 
-Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true 
-Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true 
-javaagent:C:\Users\wangzihao\AppData\Local\JetBrains\IntelliJIdea2020.1\groovyHotSwap\gragent.jar
 
-javaagent:C:\Users\wangzihao\AppData\Local\JetBrains\IntelliJIdea2020.1\captureAgent\debugger-agent.jar=file:/C:/Users/wangzihao/AppData/Local/Temp/capture2.props
 -Dfile.encoding=UTF-8 
@C:\Users\wangzihao\AppData\Local\Temp\idea_arg_file104131012 
org.apereo.cas.web.CasWebApplication
Connected to the target VM, address: '127.0.0.1:62571', transport: 'socket'
2021-06-25 10:31:26.680  INFO 87516 --- [  restartedMain] 
.e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! 
Set 'spring.devtools.add-properties' to 'false' to disable


     _    ____  _____ ____  _____ ___     ____    _    ____
    / \  |  _ \| ____|  _ \| ____/ _ \   / ___|  / \  / ___|
   / _ \ | |_) |  _| | |_) |  _|| | | | | |     / _ \ \___ \
  / ___ \|  __/| |___|  _ <| |__| |_| | | |___ / ___ \ ___) |
 /_/   \_\_|   |_____|_| \_\_____\___/   \____/_/   \_\____/


CAS Version: Not Available
CAS Branch: Not Available
CAS Commit Id: Not Available
CAS Build Date/Time: 2021-06-24T09:01:40.143Z
Spring Boot Version: 2.5.1
Spring Version: 5.3.8
Java Home: D:\DevInstall\Java\jdk-11.0.2
Java Vendor: Oracle Corporation
Java Version: 11.0.2
JVM Free Memory: 131 MB
JVM Maximum Memory: 3 GB
JVM Total Memory: 274 MB
OS Architecture: amd64
OS Name: Windows 10
OS Version: 10.0
OS Date/Time: 2021-06-25T10:31:31.033356
OS Temp Directory: C:\Users\WANGZI~1\AppData\Local\Temp\
------------------------------------------------------------
Apache Tomcat Version: Apache Tomcat/9.0.48
------------------------------------------------------------


2021-06-25 10:31:31.257  INFO 87516 --- [  restartedMain] 
c.c.c.ConfigServicePropertySourceLocator : Fetching config from server at : 
http://localhost:8888
2021-06-25 10:31:33.741  INFO 87516 --- [  restartedMain] 
c.c.c.ConfigServicePropertySourceLocator : Connect Timeout Exception on Url - 
http://localhost:8888. Will be trying the next url if available
2021-06-25 10:31:33.743  WARN 87516 --- [  restartedMain] 
c.c.c.ConfigServicePropertySourceLocator : Could not locate PropertySource: I/O 
error on GET request for "http://localhost:8888/application/default": 
Connection refused: connect; nested exception is java.net.ConnectException: 
Connection refused: connect
2021-06-25 10:31:33.749  INFO 87516 --- [  restartedMain] 
o.a.c.w.CasWebApplication                : No active profile set, falling back 
to default profiles: default
2021-06-25 10:31:41.551  WARN 87516 --- [  restartedMain] 
o.a.c.w.CasWebApplicationContext         : Exception encountered during context 
initialization - cancelling refresh attempt: 
org.springframework.beans.factory.support.BeanDefinitionOverrideException: 
Invalid bean definition with name 'localeResolver' defined in BeanDefinition 
defined in class path resource 
[org/apereo/cas/config/CasWebAppConfiguration.class]: Cannot register bean 
definition [Root bean: class 
[org.springframework.aop.scope.ScopedProxyFactoryBean]; scope=; abstract=false; 
lazyInit=null; autowireMode=0; dependencyCheck=0; autowireCandidate=true; 
primary=false; factoryBeanName=null; factoryMethodName=null; 
initMethodName=null; destroyMethodName=null; defined in BeanDefinition defined 
in class path resource [org/apereo/cas/config/CasWebAppConfiguration.class]] 
for bean 'localeResolver': There is already [Root bean: class [null]; scope=; 
abstract=false; lazyInit=null; autowireMode=3; dependencyCheck=0; 
autowireCandidate=true; primary=false; 
factoryBeanName=org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration$EnableWebMvcConfiguration;
 factoryMethodName=localeResolver; initMethodName=null; 
destroyMethodName=(inferred); defined in class path resource 
[org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]]
 bound.
2021-06-25 10:31:41.565  INFO 87516 --- [  restartedMain] 
ConditionEvaluationReportLoggingListener :

Error starting ApplicationContext. To display the conditions report re-run your 
application with 'debug' enabled.
2021-06-25 10:31:41.795 ERROR 87516 --- [  restartedMain] 
o.s.b.d.LoggingFailureAnalysisReporter   :

***************************
APPLICATION FAILED TO START
***************************

Description:

The bean 'localeResolver', defined in BeanDefinition defined in class path 
resource [org/apereo/cas/config/CasWebAppConfiguration.class], could not be 
registered. A bean with that name has already been defined in class path 
resource 
[org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]
 and overriding is disabled.

Action:

Consider renaming one of the beans or enabling overriding by setting 
spring.main.allow-bean-definition-overriding=true

Disconnected from the target VM, address: '127.0.0.1:62571', transport: 'socket'

Process finished with exit code 0





==============================
where did i do wrong?or what setting i didn't set? someone help me?

-- 
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
--- 
You received this message because you are subscribed to the Google Groups "CAS 
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/74bf39ec31d81411f812be83c14f1942ddb73313.camel%40uvic.ca.

Reply via email to