Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use ConfigData.Option.IGNORE_IMPORTS #1793

Closed
spencergibb opened this issue Jan 27, 2021 · 7 comments
Closed

Use ConfigData.Option.IGNORE_IMPORTS #1793

spencergibb opened this issue Jan 27, 2021 · 7 comments
Labels
Projects
Milestone

Comments

@spencergibb
Copy link
Member

See #1788 (comment)

@spencergibb spencergibb added this to the 3.0.2 milestone Jan 27, 2021
@spencergibb spencergibb added this to To do in 2020.0.1 via automation Jan 27, 2021
@spencergibb spencergibb removed this from To do in 2020.0.1 Jan 27, 2021
@spencergibb spencergibb removed this from the 3.0.2 milestone Jan 27, 2021
@spencergibb
Copy link
Member Author

If I add that I get the following:


java.lang.NullPointerException: null
	at org.springframework.boot.context.config.ConfigDataEnvironmentContributor.withBoundProperties(ConfigDataEnvironmentContributor.java:201) ~[spring-boot-2.4.2-20210111.155855-61.jar:2.4.2-SNAPSHOT]
	at org.springframework.boot.context.config.ConfigDataEnvironmentContributors.withProcessedImports(ConfigDataEnvironmentContributors.java:109) ~[spring-boot-2.4.2-20210111.155855-61.jar:2.4.2-SNAPSHOT]
	at org.springframework.boot.context.config.ConfigDataEnvironment.processWithProfiles(ConfigDataEnvironment.java:309) ~[spring-boot-2.4.2-20210111.155855-61.jar:2.4.2-SNAPSHOT]
	at org.springframework.boot.context.config.ConfigDataEnvironment.processAndApply(ConfigDataEnvironment.java:234) ~[spring-boot-2.4.2-20210111.155855-61.jar:2.4.2-SNAPSHOT]
	at org.springframework.boot.context.config.ConfigDataEnvironmentPostProcessor.postProcessEnvironment(ConfigDataEnvironmentPostProcessor.java:97) ~[spring-boot-2.4.2-20210111.155855-61.jar:2.4.2-SNAPSHOT]
	at org.springframework.boot.context.config.ConfigDataEnvironmentPostProcessor.postProcessEnvironment(ConfigDataEnvironmentPostProcessor.java:89) ~[spring-boot-2.4.2-20210111.155855-61.jar:2.4.2-SNAPSHOT]
	at org.springframework.boot.env.EnvironmentPostProcessorApplicationListener.onApplicationEnvironmentPreparedEvent(EnvironmentPostProcessorApplicationListener.java:100) ~[spring-boot-2.4.2-20210111.155855-61.jar:2.4.2-SNAPSHOT]
	at org.springframework.boot.env.EnvironmentPostProcessorApplicationListener.onApplicationEvent(EnvironmentPostProcessorApplicationListener.java:86) ~[spring-boot-2.4.2-20210111.155855-61.jar:2.4.2-SNAPSHOT]
	at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:176) ~[spring-context-5.3.3-20210111.155059-45.jar:5.3.3-SNAPSHOT]
	at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:169) ~[spring-context-5.3.3-20210111.155059-45.jar:5.3.3-SNAPSHOT]
	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:143) ~[spring-context-5.3.3-20210111.155059-45.jar:5.3.3-SNAPSHOT]
	at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:131) ~[spring-context-5.3.3-20210111.155059-45.jar:5.3.3-SNAPSHOT]
	at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:82) ~[spring-boot-2.4.2-20210111.155855-61.jar:2.4.2-SNAPSHOT]
	at org.springframework.boot.SpringApplicationRunListeners.lambda$environmentPrepared$2(SpringApplicationRunListeners.java:63) ~[spring-boot-2.4.2-20210111.155855-61.jar:2.4.2-SNAPSHOT]
	at java.util.ArrayList.forEach(ArrayList.java:1257) ~[na:1.8.0_252]
	at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:117) ~[spring-boot-2.4.2-20210111.155855-61.jar:2.4.2-SNAPSHOT]
	at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:111) ~[spring-boot-2.4.2-20210111.155855-61.jar:2.4.2-SNAPSHOT]
	at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:62) ~[spring-boot-2.4.2-20210111.155855-61.jar:2.4.2-SNAPSHOT]
	at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:362) ~[spring-boot-2.4.2-20210111.155855-61.jar:2.4.2-SNAPSHOT]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:320) ~[spring-boot-2.4.2-20210111.155855-61.jar:2.4.2-SNAPSHOT]
	at org.springframework.boot.test.context.SpringBootContextLoader.loadContext(SpringBootContextLoader.java:123) [spring-boot-test-2.4.2-20210111.155855-61.jar:2.4.2-SNAPSHOT]
	at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContextInternal(DefaultCacheAwareContextLoaderDelegate.java:99) [spring-test-5.3.3-20210111.155059-45.jar:5.3.3-SNAPSHOT]
	at org.springframework.test.context.cache.DefaultCacheAwareContextLoaderDelegate.loadContext(DefaultCacheAwareContextLoaderDelegate.java:124) [spring-test-5.3.3-20210111.155059-45.jar:5.3.3-SNAPSHOT]
	at org.springframework.test.context.support.DefaultTestContext.getApplicationContext(DefaultTestContext.java:124) [spring-test-5.3.3-20210111.155059-45.jar:5.3.3-SNAPSHOT]
	at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:118) [spring-test-5.3.3-20210111.155059-45.jar:5.3.3-SNAPSHOT]
	at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:83) [spring-test-5.3.3-20210111.155059-45.jar:5.3.3-SNAPSHOT]
	at org.springframework.boot.test.autoconfigure.SpringBootDependencyInjectionTestExecutionListener.prepareTestInstance(SpringBootDependencyInjectionTestExecutionListener.java:43) [spring-boot-test-autoconfigure-2.4.2-20210111.155855-61.jar:2.4.2-SNAPSHOT]
	at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:244) [spring-test-5.3.3-20210111.155059-45.jar:5.3.3-SNAPSHOT]
	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:227) [spring-test-5.3.3-20210111.155059-45.jar:5.3.3-SNAPSHOT]
	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:289) [spring-test-5.3.3-20210111.155059-45.jar:5.3.3-SNAPSHOT]
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) [junit-4.13.1.jar:4.13.1]
	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:291) [spring-test-5.3.3-20210111.155059-45.jar:5.3.3-SNAPSHOT]
	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:246) [spring-test-5.3.3-20210111.155059-45.jar:5.3.3-SNAPSHOT]
	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:97) [spring-test-5.3.3-20210111.155059-45.jar:5.3.3-SNAPSHOT]
	at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331) [junit-4.13.1.jar:4.13.1]
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79) [junit-4.13.1.jar:4.13.1]
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329) [junit-4.13.1.jar:4.13.1]
	at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66) [junit-4.13.1.jar:4.13.1]
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293) [junit-4.13.1.jar:4.13.1]
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) [junit-4.13.1.jar:4.13.1]
	at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) [spring-test-5.3.3-20210111.155059-45.jar:5.3.3-SNAPSHOT]
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) [junit-4.13.1.jar:4.13.1]
	at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70) [spring-test-5.3.3-20210111.155059-45.jar:5.3.3-SNAPSHOT]
	at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306) [junit-4.13.1.jar:4.13.1]
	at org.junit.runners.ParentRunner.run(ParentRunner.java:413) [junit-4.13.1.jar:4.13.1]
	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:190) [spring-test-5.3.3-20210111.155059-45.jar:5.3.3-SNAPSHOT]
	at org.junit.runner.JUnitCore.run(JUnitCore.java:137) [junit-4.13.1.jar:4.13.1]
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69) [junit-rt.jar:na]
	at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33) [junit-rt.jar:na]
	at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:220) [junit-rt.jar:na]
	at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:53) [junit-rt.jar:na]

Any idea @philwebb?

@philwebb
Copy link

That's not good. The stacktrace doesn't seem to line up with the latest code. The version also looks a bit sus, should this be using the 2.4.3-SNAPSHOT?

@spencergibb
Copy link
Member Author

No, using 2.4.2, so this will need to wait for 2.4.3 as well?

@philwebb
Copy link

Oh no, that should work. I wonder why the line numbers don't match. I can't tell what's actually null. Can I run that test myself?

@spencergibb
Copy link
Member Author

it's actually 2.4.2-SNAPSHOT, maybe that's why line numbers are off? You can run that test, but you'd have to change ConfigServerConfigDataLoader to add the option.

@philwebb
Copy link

@spencergibb spencergibb added this to To do in 2020.0.2 via automation Mar 10, 2021
@spencergibb spencergibb added this to the 3.0.3 milestone Mar 10, 2021
@spencergibb
Copy link
Member Author

Closed via 587cc97

2020.0.2 automation moved this from To do to Done Mar 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
2020.0.2
  
Done
Development

No branches or pull requests

2 participants