EdwardLee03 commented on issue #1164: [Finalizer] WARN in 
[com.alibaba.dubbo.config.ReferenceConfig$1.finalize(ReferenceConfig.java:106)] 
[DUBBO] ReferenceConfig(null) is not DESTROYED when FINALIZE
URL: 
https://github.com/apache/incubator-dubbo/issues/1164#issuecomment-421909694
 
 
   We encountered the same problem by using `XML`, the complete exception log 
is as follows.
   
   ```java
   2018-09-17 14:13:19,684 WARN  [main] 
o.s.c.a.AnnotationConfigApplicationContext:551 - [] [] [] Exception encountered 
during context initialization - cancelling refresh attempt: 
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'dailyReportJob': Injection of autowired dependencies failed; nested 
exception is java.lang.IllegalArgumentException: Could not resolve placeholder 
'spring.profiles.active' in value "${spring.profiles.active}"
   2018-09-17 14:13:19,770 INFO  [Dubbo-Holder] 
c.w.s.d.DubboHolderListener$DubboHolder:64 - [] [] [] Shutdown dubbo holder 
thread: Dubbo-Holder
   2018-09-17 14:13:19,782 INFO  [main] 
o.s.b.a.l.AutoConfigurationReportLoggingInitializer:101 - [] [] [] 
   Error starting ApplicationContext. To display the auto-configuration report 
re-run your application with 'debug' enabled.
   2018-09-17 14:13:19,792 ERROR [main] o.s.boot.SpringApplication:771 - [] [] 
[] Application startup failed
   org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'dailyReportJob': Injection of autowired dependencies failed; nested 
exception is java.lang.IllegalArgumentException: Could not resolve placeholder 
'spring.profiles.active' in value "${spring.profiles.active}"
        at 
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:372)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1264)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
        at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
        at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)
        at 
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)
        at 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543)
        at 
org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693)
        at 
org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360)
        at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:303)
        at 
com.wacai.atm.origin.provider.OriginDubboApplication.main(OriginDubboApplication.java:22)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at 
org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
        at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
        at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51)
   Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder 
'spring.profiles.active' in value "${spring.profiles.active}"
        at 
org.springframework.util.PropertyPlaceholderHelper.parseStringValue(PropertyPlaceholderHelper.java:174)
        at 
org.springframework.util.PropertyPlaceholderHelper.replacePlaceholders(PropertyPlaceholderHelper.java:126)
        at 
org.springframework.core.env.AbstractPropertyResolver.doResolvePlaceholders(AbstractPropertyResolver.java:236)
        at 
org.springframework.core.env.AbstractPropertyResolver.resolveRequiredPlaceholders(AbstractPropertyResolver.java:210)
        at 
org.springframework.context.support.PropertySourcesPlaceholderConfigurer$2.resolveStringValue(PropertySourcesPlaceholderConfigurer.java:172)
        at 
org.springframework.beans.factory.support.AbstractBeanFactory.resolveEmbeddedValue(AbstractBeanFactory.java:831)
        at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1086)
        at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1066)
        at 
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:585)
        at 
org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
        at 
org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:366)
        ... 22 common frames omitted
   2018-09-17 14:13:24,242 WARN  [Finalizer] c.a.dubbo.config.AbstractConfig:54 
- [] [] []  [DUBBO] ReferenceConfig(null) is not DESTROYED when FINALIZE, dubbo 
version: 3.1.1, current host: 127.0.0.1
   ```
   
   com.alibaba.dubbo.config.ReferenceConfig
   ```java
       private final Object finalizerGuardian = new Object() {
           @Override
           protected void finalize() throws Throwable {
               super.finalize();
   
               if(! ReferenceConfig.this.destroyed) {
                   logger.warn("ReferenceConfig(" + url + ") is not DESTROYED 
when FINALIZE");
               }
           }
       };
   ```
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to