Skip to content

Dubbo 2.7.1 : delay export function doesn't work... #3952

@spiritme1984

Description

@spiritme1984

I set 'delay' label in dubbo config file as below:

  <dubbo:provider timeout="${dubbo.timeout}" retries="${dubbo.retry}" accesslog="${dubbo.accesslog}" delay="30000" filter="dubboSofaTracrFilter"/> 

But when I start the project come across an error:

2019-04-29 17:12:21.525 [crm7] [ERROR] [,] [ContainerBackgroundProcessor[StandardEngine[Catalina]]] org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:331) Context initialization failed
java.lang.NullPointerException
	at org.apache.dubbo.config.ServiceConfig.export(ServiceConfig.java:335)
	at org.apache.dubbo.config.spring.ServiceBean.export(ServiceBean.java:319)
	at org.apache.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:113)
	at org.apache.dubbo.config.spring.ServiceBean.onApplicationEvent(ServiceBean.java:59)
        ....

And I debug the code and found in ServiceConfig.java, there is a method named 'export':

    public synchronized void export() {
        checkAndUpdateSubConfigs();
        if (!shouldExport()) {
            return;
        }
        if (shouldDelay()) {
            delayExportExecutor.schedule(this::doExport, delay, TimeUnit.MILLISECONDS);
        } else {
            doExport();
        }
    }

In this method the 'delay' param is null , and I can't found codes where set value for it.
Please correct me if I was wrong, thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/bugBugs to being fixed

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions