-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Fail to use JIB with JAXWS dependencies #1907
Comments
I assume Can you do |
Hi @chanseokoh , Yap, if I don't use jib, it work. |
It may be that the order of loading dependencies is different between the Jib run and the spring run. I tried excluding the dependency like below, and I do see that it avoids the conflict. (You need to do <dependency>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http-netty-server</artifactId>
<version>3.3.2</version>
<exclusions>
<exclusion>
<groupId>org.apache.geronimo.specs</groupId>
<artifactId>geronimo-servlet_2.5_spec</artifactId>
</exclusion>
</exclusions>
</dependency> However, I only think this is a stopgap workaround. I have no idea about this Apache CFX Runtime dependency, but from the fact that it embeds the Servlet API (runtime or API only, I don't know), I conjecture this is a standalone HTTP server based on Jetty. Maybe the project shouldn't really be set up this way to pull this dependency, which I think is a standalone server runtime competing with undertow? (I may be wrong though.) This link says CFX includes two HTTP options: one for deploying into a Servlet container (like tomcat), and a Jetty-based standalone HTTP server. |
Basically, #1871 |
Ass i've seen with de develop team, this dependency was made to help construct stubs to SOAP. We need call an external webservice with SOAP. Probaly it uses the servlet in specific executions. |
@chanseokoh It works ! Thank you so much for your help |
So we think the difference between the Spring run and the Jib run comes from the difference in the order of loading JARs. Jib just does But at least it's clear that your project pulls in two different JARs that contain exact same classes, which I think is never good and can easily lead to a situation like this whenever there is a change to the order of JAR/class loading. I think you should try to avoid or resolve it somehow. Excluding the dependency as I suggested can be one way. Aside, personally I feel strange that |
First, for me it's a great solution that you have give me, it's simple and resolve my problem. My question is more: " Can we help (jib) in any more thing? Logs or any functional solution, you know?" |
for some reason any time I try to post the error log it breaks github's rendering and removes half my content... we are also encountering this with jib (at least I think it's jib). It fails to start with this message: Details2019-09-30 21:34:19.428 INFO 1 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$79dd7fdd] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying), 2019-09-30 21:34:19.904 WARN 1 --- [ main] s.c.a.AnnotationConfigApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.boot.context.properties.ConfigurationPropertiesBindException: Error creating bean with name 'spring.cloud.vault.consul-org.springframework.cloud.vault.config.consul.VaultConsulProperties': Could not bind properties to 'VaultConsulProperties' : prefix=spring.cloud.vault.consul, ignoreInvalidFields=false, ignoreUnknownFields=true; nested exception is org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under 'spring.cloud.vault.consul' to org.springframework.cloud.vault.config.consul.VaultConsulProperties, 2019-09-30 21:34:19.920 INFO 1 --- [ main] ConditionEvaluationReportLoggingListener : , , Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled., 2019-09-30 21:34:19.924 ERROR 1 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter : , , ***************************, APPLICATION FAILED TO START, ***************************, , Description:, , Failed to bind properties under 'spring.cloud.vault.consul' to org.springframework.cloud.vault.config.consul.VaultConsulProperties:, , Property: spring.cloud.vault.consul.enabled, Value: false, Origin: class path resource [bootstrap.yml]:25:18, Reason: HV000030: No validator could be found for constraint 'javax.validation.constraints.NotEmpty' validating type 'java.lang.String'. Check configuration for 'backend', , Action:, , Update your application's configuration, , 2019-09-30 21:34:19.936 ERROR 1 --- [ main] o.s.boot.SpringApplication : Application run failed, , org.springframework.boot.context.properties.ConfigurationPropertiesBindException: Error creating bean with name 'spring.cloud.vault.consul-org.springframework.cloud.vault.config.consul.VaultConsulProperties': Could not bind properties to 'VaultConsulProperties' : prefix=spring.cloud.vault.consul, ignoreInvalidFields=false, ignoreUnknownFields=true; nested exception is org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under 'spring.cloud.vault.consul' to org.springframework.cloud.vault.config.consul.VaultConsulProperties, at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.bind(ConfigurationPropertiesBindingPostProcessor.java:110) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE], at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.postProcessBeforeInitialization(ConfigurationPropertiesBindingPostProcessor.java:93) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE], at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:414) ~[spring-beans-5.1.8.RELEASE.jar:5.1.8.RELEASE], at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1770) ~[spring-beans-5.1.8.RELEASE.jar:5.1.8.RELEASE], at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593) ~[spring-beans-5.1.8.RELEASE.jar:5.1.8.RELEASE], at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) ~[spring-beans-5.1.8.RELEASE.jar:5.1.8.RELEASE], at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.8.RELEASE.jar:5.1.8.RELEASE], at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.8.RELEASE.jar:5.1.8.RELEASE], at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.1.8.RELEASE.jar:5.1.8.RELEASE], at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.1.8.RELEASE.jar:5.1.8.RELEASE], at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:845) ~[spring-beans-5.1.8.RELEASE.jar:5.1.8.RELEASE], at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:877) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE], at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE], at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE], at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE], at org.springframework.boot.SpringApplication.run(SpringApplication.java:316) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE], at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:139) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE], at org.springframework.cloud.bootstrap.BootstrapApplicationListener.bootstrapServiceContext(BootstrapApplicationListener.java:203) ~[spring-cloud-context-2.1.2.RELEASE.jar:2.1.2.RELEASE], at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:114) ~[spring-cloud-context-2.1.2.RELEASE.jar:2.1.2.RELEASE], at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:71) ~[spring-cloud-context-2.1.2.RELEASE.jar:2.1.2.RELEASE], at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE], at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE], at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE], at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE], at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:75) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE], at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:54) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE], at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:347) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE], at org.springframework.boot.SpringApplication.run(SpringApplication.java:306) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE], at com.promontech.Application.main(Application.java:46) [classes/:na], Caused by: org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under 'spring.cloud.vault.consul' to org.springframework.cloud.vault.config.consul.VaultConsulProperties, at org.springframework.boot.context.properties.bind.Binder.handleBindError(Binder.java:249) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE], at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:225) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE], at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:208) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE], at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:190) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE], at org.springframework.boot.context.properties.ConfigurationPropertiesBinder.bind(ConfigurationPropertiesBinder.java:83) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE], at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.bind(ConfigurationPropertiesBindingPostProcessor.java:107) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE], ... 28 common frames omitted, Caused by: javax.validation.UnexpectedTypeException: HV000030: No validator could be found for constraint 'javax.validation.constraints.NotEmpty' validating type 'java.lang.String'. Check configuration for 'backend', at org.hibernate.validator.internal.engine.constraintvalidation.ConstraintTree.throwExceptionForNullValidator(ConstraintTree.java:228) ~[hibernate-validator-5.4.2.Final.jar:5.4.2.Final], at org.hibernate.validator.internal.engine.constraintvalidation.ConstraintTree.getConstraintValidatorNoUnwrapping(ConstraintTree.java:309) ~[hibernate-validator-5.4.2.Final.jar:5.4.2.Final], at org.hibernate.validator.internal.engine.constraintvalidation.ConstraintTree.getConstraintValidatorInstanceForAutomaticUnwrapping(ConstraintTree.java:243) ~[hibernate-validator-5.4.2.Final.jar:5.4.2.Final], at org.hibernate.validator.internal.engine.constraintvalidation.ConstraintTree.getInitializedConstraintValidator(ConstraintTree.java:164) ~[hibernate-validator-5.4.2.Final.jar:5.4.2.Final], at org.hibernate.validator.internal.engine.constraintvalidation.ConstraintTree.validateConstraints(ConstraintTree.java:109) ~[hibernate-validator-5.4.2.Final.jar:5.4.2.Final], at org.hibernate.validator.internal.engine.constraintvalidation.ConstraintTree.validateConstraints(ConstraintTree.java:88) ~[hibernate-validator-5.4.2.Final.jar:5.4.2.Final], at org.hibernate.validator.internal.metadata.core.MetaConstraint.validateConstraint(MetaConstraint.java:73) ~[hibernate-validator-5.4.2.Final.jar:5.4.2.Final], at org.hibernate.validator.internal.engine.ValidatorImpl.validateMetaConstraint(ValidatorImpl.java:617) ~[hibernate-validator-5.4.2.Final.jar:5.4.2.Final], at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraint(ValidatorImpl.java:582) ~[hibernate-validator-5.4.2.Final.jar:5.4.2.Final], at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraintsForSingleDefaultGroupElement(ValidatorImpl.java:528) ~[hibernate-validator-5.4.2.Final.jar:5.4.2.Final], at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraintsForDefaultGroup(ValidatorImpl.java:496) ~[hibernate-validator-5.4.2.Final.jar:5.4.2.Final], at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraintsForCurrentGroup(ValidatorImpl.java:461) ~[hibernate-validator-5.4.2.Final.jar:5.4.2.Final], at org.hibernate.validator.internal.engine.ValidatorImpl.validateInContext(ValidatorImpl.java:411) ~[hibernate-validator-5.4.2.Final.jar:5.4.2.Final], at org.hibernate.validator.internal.engine.ValidatorImpl.validate(ValidatorImpl.java:208) ~[hibernate-validator-5.4.2.Final.jar:5.4.2.Final], at org.springframework.validation.beanvalidation.SpringValidatorAdapter.validate(SpringValidatorAdapter.java:108) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE], at org.springframework.boot.context.properties.ConfigurationPropertiesJsr303Validator.validate(ConfigurationPropertiesJsr303Validator.java:52) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE], at org.springframework.boot.context.properties.bind.validation.ValidationBindHandler.lambda$validateAndPush$1(ValidationBindHandler.java:111) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE], at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) ~[na:1.8.0_222], at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) ~[na:1.8.0_222], at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948) ~[na:1.8.0_222], at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) ~[na:1.8.0_222], at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) ~[na:1.8.0_222], at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) ~[na:1.8.0_222], at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) ~[na:1.8.0_222], at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[na:1.8.0_222], at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:485) ~[na:1.8.0_222], at org.springframework.boot.context.properties.bind.validation.ValidationBindHandler.validateAndPush(ValidationBindHandler.java:111) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE], at org.springframework.boot.context.properties.bind.validation.ValidationBindHandler.validate(ValidationBindHandler.java:89) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE], at org.springframework.boot.context.properties.bind.validation.ValidationBindHandler.onFinish(ValidationBindHandler.java:72) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE], at org.springframework.boot.context.properties.bind.Binder.handleBindResult(Binder.java:235) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE], at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:222) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE], ... 32 common frames omitted, , 2019-09-30 22:11:58.274 INFO 1 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration' of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$c878053b] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying), 2019-09-30 22:11:58.594 WARN 1 --- [ main] s.c.a.AnnotationConfigApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.boot.context.properties.ConfigurationPropertiesBindException: Error creating bean with name 'spring.cloud.vault.consul-org.springframework.cloud.vault.config.consul.VaultConsulProperties': Could not bind properties to 'VaultConsulProperties' : prefix=spring.cloud.vault.consul, ignoreInvalidFields=false, ignoreUnknownFields=true; nested exception is org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under 'spring.cloud.vault.consul' to org.springframework.cloud.vault.config.consul.VaultConsulProperties, 2019-09-30 22:11:58.608 INFO 1 --- [ main] ConditionEvaluationReportLoggingListener : , , Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled., 2019-09-30 22:11:58.611 ERROR 1 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter : , , ***************************, APPLICATION FAILED TO START, ***************************, , Description:, , Failed to bind properties under 'spring.cloud.vault.consul' to org.springframework.cloud.vault.config.consul.VaultConsulProperties:, , Property: spring.cloud.vault.consul.enabled, Value: false, Origin: class path resource [bootstrap.yml]:25:18, Reason: HV000030: No validator could be found for constraint 'javax.validation.constraints.NotEmpty' validating type 'java.lang.String'. Check configuration for 'tokenProperty', , Action:, , Update your application's configuration, , 2019-09-30 22:11:58.623 ERROR 1 --- [ main] o.s.boot.SpringApplication : Application run failed, , org.springframework.boot.context.properties.ConfigurationPropertiesBindException: Error creating bean with name 'spring.cloud.vault.consul-org.springframework.cloud.vault.config.consul.VaultConsulProperties': Could not bind properties to 'VaultConsulProperties' : prefix=spring.cloud.vault.consul, ignoreInvalidFields=false, ignoreUnknownFields=true; nested exception is org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under 'spring.cloud.vault.consul' to org.springframework.cloud.vault.config.consul.VaultConsulProperties, at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.bind(ConfigurationPropertiesBindingPostProcessor.java:110) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE], at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.postProcessBeforeInitialization(ConfigurationPropertiesBindingPostProcessor.java:93) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE], at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:414) ~[spring-beans-5.1.8.RELEASE.jar:5.1.8.RELEASE], at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1770) ~[spring-beans-5.1.8.RELEASE.jar:5.1.8.RELEASE], at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593) ~[spring-beans-5.1.8.RELEASE.jar:5.1.8.RELEASE], at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) ~[spring-beans-5.1.8.RELEASE.jar:5.1.8.RELEASE], at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.8.RELEASE.jar:5.1.8.RELEASE], at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.8.RELEASE.jar:5.1.8.RELEASE], at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.1.8.RELEASE.jar:5.1.8.RELEASE], at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.1.8.RELEASE.jar:5.1.8.RELEASE], at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:845) ~[spring-beans-5.1.8.RELEASE.jar:5.1.8.RELEASE], at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:877) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE], at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE], at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE], at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE], at org.springframework.boot.SpringApplication.run(SpringApplication.java:316) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE], at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:139) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE], at org.springframework.cloud.bootstrap.BootstrapApplicationListener.bootstrapServiceContext(BootstrapApplicationListener.java:203) ~[spring-cloud-context-2.1.2.RELEASE.jar:2.1.2.RELEASE], at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:114) ~[spring-cloud-context-2.1.2.RELEASE.jar:2.1.2.RELEASE], at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:71) ~[spring-cloud-context-2.1.2.RELEASE.jar:2.1.2.RELEASE], at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE], at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE], at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE], at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:127) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE], at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:75) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE], at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:54) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE], at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:347) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE], at org.springframework.boot.SpringApplication.run(SpringApplication.java:306) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE], at com.promontech.Application.main(Application.java:46) [classes/:na], Caused by: org.springframework.boot.context.properties.bind.BindException: Failed to bind properties under 'spring.cloud.vault.consul' to org.springframework.cloud.vault.config.consul.VaultConsulProperties, at org.springframework.boot.context.properties.bind.Binder.handleBindError(Binder.java:249) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE], at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:225) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE], at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:208) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE], at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:190) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE], at org.springframework.boot.context.properties.ConfigurationPropertiesBinder.bind(ConfigurationPropertiesBinder.java:83) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE], at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.bind(ConfigurationPropertiesBindingPostProcessor.java:107) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE], ... 28 common frames omitted, Caused by: javax.validation.UnexpectedTypeException: HV000030: No validator could be found for constraint 'javax.validation.constraints.NotEmpty' validating type 'java.lang.String'. Check configuration for 'tokenProperty', at org.hibernate.validator.internal.engine.constraintvalidation.ConstraintTree.throwExceptionForNullValidator(ConstraintTree.java:228) ~[hibernate-validator-5.4.2.Final.jar:5.4.2.Final], at org.hibernate.validator.internal.engine.constraintvalidation.ConstraintTree.getConstraintValidatorNoUnwrapping(ConstraintTree.java:309) ~[hibernate-validator-5.4.2.Final.jar:5.4.2.Final], at org.hibernate.validator.internal.engine.constraintvalidation.ConstraintTree.getConstraintValidatorInstanceForAutomaticUnwrapping(ConstraintTree.java:243) ~[hibernate-validator-5.4.2.Final.jar:5.4.2.Final], at org.hibernate.validator.internal.engine.constraintvalidation.ConstraintTree.getInitializedConstraintValidator(ConstraintTree.java:164) ~[hibernate-validator-5.4.2.Final.jar:5.4.2.Final], at org.hibernate.validator.internal.engine.constraintvalidation.ConstraintTree.validateConstraints(ConstraintTree.java:109) ~[hibernate-validator-5.4.2.Final.jar:5.4.2.Final], at org.hibernate.validator.internal.engine.constraintvalidation.ConstraintTree.validateConstraints(ConstraintTree.java:88) ~[hibernate-validator-5.4.2.Final.jar:5.4.2.Final], at org.hibernate.validator.internal.metadata.core.MetaConstraint.validateConstraint(MetaConstraint.java:73) ~[hibernate-validator-5.4.2.Final.jar:5.4.2.Final], at org.hibernate.validator.internal.engine.ValidatorImpl.validateMetaConstraint(ValidatorImpl.java:617) ~[hibernate-validator-5.4.2.Final.jar:5.4.2.Final], at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraint(ValidatorImpl.java:582) ~[hibernate-validator-5.4.2.Final.jar:5.4.2.Final], at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraintsForSingleDefaultGroupElement(ValidatorImpl.java:528) ~[hibernate-validator-5.4.2.Final.jar:5.4.2.Final], at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraintsForDefaultGroup(ValidatorImpl.java:496) ~[hibernate-validator-5.4.2.Final.jar:5.4.2.Final], at org.hibernate.validator.internal.engine.ValidatorImpl.validateConstraintsForCurrentGroup(ValidatorImpl.java:461) ~[hibernate-validator-5.4.2.Final.jar:5.4.2.Final], at org.hibernate.validator.internal.engine.ValidatorImpl.validateInContext(ValidatorImpl.java:411) ~[hibernate-validator-5.4.2.Final.jar:5.4.2.Final], at org.hibernate.validator.internal.engine.ValidatorImpl.validate(ValidatorImpl.java:208) ~[hibernate-validator-5.4.2.Final.jar:5.4.2.Final], at org.springframework.validation.beanvalidation.SpringValidatorAdapter.validate(SpringValidatorAdapter.java:108) ~[spring-context-5.1.8.RELEASE.jar:5.1.8.RELEASE], at org.springframework.boot.context.properties.ConfigurationPropertiesJsr303Validator.validate(ConfigurationPropertiesJsr303Validator.java:52) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE], at org.springframework.boot.context.properties.bind.validation.ValidationBindHandler.lambda$validateAndPush$1(ValidationBindHandler.java:111) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE], at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) ~[na:1.8.0_222], at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) ~[na:1.8.0_222], at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948) ~[na:1.8.0_222], at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) ~[na:1.8.0_222], at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) ~[na:1.8.0_222], at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) ~[na:1.8.0_222], at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) ~[na:1.8.0_222], at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[na:1.8.0_222], at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:485) ~[na:1.8.0_222], at org.springframework.boot.context.properties.bind.validation.ValidationBindHandler.validateAndPush(ValidationBindHandler.java:111) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE], at org.springframework.boot.context.properties.bind.validation.ValidationBindHandler.validate(ValidationBindHandler.java:89) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE], at org.springframework.boot.context.properties.bind.validation.ValidationBindHandler.onFinish(ValidationBindHandler.java:72) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE], at org.springframework.boot.context.properties.bind.Binder.handleBindResult(Binder.java:235) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE], at org.springframework.boot.context.properties.bind.Binder.bind(Binder.java:222) ~[spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE], ... 32 common frames omitted, , We do not see this error when using docker to build, or running with |
Hi @snowe2010, Can you share your |
I can attempt to. |
@snowe2010 what libs are you import in your project? Which versions of spring, java and libs?
Obs: java1.11 |
@raizoor I believe this might be an issue with overriding dependencies. We have an enterprise bom that is declared as a dependency in both a maven 'common' project and a spring boot gradle project. the spring boot gradle project has these dependencies: springBootVersion=2.1.4.RELEASE
springDataVersion=Lovelace-SR9
springCloudVersion=Greenwich.SR2
springCloudVaultVersion=2.1.1.RELEASE
implementation(platform("org.springframework.boot:spring-boot-dependencies:${extra["springBootVersion"]}"))
implementation(platform("org.springframework.cloud:spring-cloud-dependencies:${extra["springCloudVersion"]}"))
implementation(platform("org.springframework.cloud:spring-cloud-vault-dependencies:${extra["springCloudVaultVersion"]}"))
implementation(platform("org.springframework.data:spring-data-releasetrain:${extra["springDataVersion"]}"))
implementation(platform("org.springframework:spring-framework-bom:${extra["springBootVersion"]}"))
implementation("org.hibernate.common:hibernate-commons-annotations")
implementation("org.hibernate:hibernate-core")
implementation("org.hibernate:hibernate-entitymanager") while the BOM has these: <hibernate.common.version>5.0.1.Final</hibernate.common.version>
<hibernate.version>5.2.5.Final</hibernate.version>
<hibernate.jpa.version>1.0.1.Final</hibernate.jpa.version>
<hibernate-pg-json.version>0.6.0</hibernate-pg-json.version>
<hibernate-validator.version>5.4.1.Final</hibernate-validator.version>
<spring.boot.version>1.5.6.RELEASE</spring.boot.version>
<spring.cloud.version>1.3.1.RELEASE</spring.cloud.version>
<spring.cloud.consul.version>1.3.1.RELEASE</spring.cloud.consul.version>
<spring.cloud.vault.version>1.1.2.RELEASE</spring.cloud.vault.version>
<spring.rabbit.version>1.6.6.RELEASE</spring.rabbit.version>
<spring.retry.version>1.2.0.RELEASE</spring.retry.version>
<dependency>
<!-- Import dependency management from Spring Boot -->
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring.boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.amqp</groupId>
<artifactId>spring-rabbit-test</artifactId>
<version>${spring.rabbit.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-commons</artifactId>
<version>${spring.cloud.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-consul-discovery</artifactId>
<version>${spring.cloud.consul.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-consul-config</artifactId>
<version>${spring.cloud.consul.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-context</artifactId>
<version>${spring.cloud.consul.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
<version>${spring.boot.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.retry</groupId>
<artifactId>spring-retry</artifactId>
<version>${spring.retry.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>${hibernate.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>${hibernate.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<version>${hibernate-validator.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate.common</groupId>
<artifactId>hibernate-commons-annotations</artifactId>
<version>${hibernate.common.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.0-api</artifactId>
<version>${hibernate.jpa.version}</version>
</dependency> I have tried changing those versions to be higher <hibernate.common.version>5.0.1.Final</hibernate.common.version>
<hibernate.version>5.4.5.Final</hibernate.version>
<hibernate.jpa.version>1.0.1.Final</hibernate.jpa.version>
<hibernate-pg-json.version>0.6.0</hibernate-pg-json.version>
<hibernate-validator.version>6.0.17.Final</hibernate-validator.version> But am still seeing the issue even with that. I think some other component might be bringing in an older version of hibernate-validator and jib decides that's the best one to use. |
@snowe2010 I assume the A few ideas on top of my head at the moment:
Based on what you find out on these, I might be able to suggest an ugly workaround as a last resort. |
correct
yes, I believe this is the case as well. I was just adding more information to the issue. The more information the easier I think it will be for Google to fix.
✅
Hadn't done this yet, I'll try it.
Yes I've been using the dependencyReport plugin to figure this out. It's not clear since it's being resolved through a bom. I'm still working on it though.
Hadn't tried this yet. Will do it as well. |
If it's the same problem that I have faced, problaly yes, you're alrigth !
run gradle dependency:tree and search another dependencies that might have another hibernate version |
I think that's just maven. But running |
Can't you set to gradle get the dependency tree of the boom? |
If you're using java1.11, you can try jdeps to .. |
Got past the above error to even more errors though. Still only present when using jib. This time it's not even at startup though, it fails to even compile. |
@raizoor I think your original issue is resolved with the workaround, and at the heart of the issue is #1871, so I'm closing this as a dup of #1871. @snowe2010 it's not clear what you are up to or if you are asking for a potential workaround, but feel free to update. |
@chanseokoh my issue is covered under #1871 as well. Thanks |
@raizoor @snowe2010 we've released Jib 2.7.0 which added a new configuration option (
instead of the default
Expanding the dependency list can be useful in AppCDS too. Note that an expanded dependency list can become very long in practice, and we are not sure if there may be a potential issue due to a long command line ("argument list too long" or "command line is too long"). As with other Jib configurations, this option can also be set through the system property ( |
@raizoor @snowe2010 Jib 3.1.1 is released, which creates two JVM argument files inside an image. One of them is the Java runtime classpath where all the dependencies are explicitly enumerated, which enables Jib to preseve the depending loading order by using this file for Java 9+. (For Java 8, you have to continue to set For those interested, see here for more details. |
Environment:
Description of the issue:
Team,
Today, i have this problem:
As I search, this error occours when spring detect two classes to do same thing, but in this case, he uses the bad servlet =/
If eu use mvn clean install, i have success.
Exists an option where can i set which class I want use? Or do you know how can i resolve this?
Now i'm using undertow, but I already test with tomcat, but not success.
The text was updated successfully, but these errors were encountered: