I have a liquibase config for my spring boot project.
oracle:thin:#(DESCRIPTION=(FAILOVER=yes)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=exa3-scan)(PORT=XXXX))(ADDRESS=(PROTOCOL=TCP)(HOST=exa2-scan)(PORT=XXXX))(ADDRESS=(PROTOCOL=TCP)(HOST=XXX)(PORT=XXXX)))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=XXX.XXX.COM)))
getting an error:
Error creating bean with name 'liquibase' defined in class path resource [org/springframework/boot/autoconfigure/liquibase/LiquibaseAutoConfiguration$LiquibaseConfiguration.class]: Invocation of init method failed; nested exception is liquibase.exception.LiquibaseException: java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1
When I changed this url to simple config like;
jdbc:oracle:thin:#//XXX.mkk.com.tr:1525/XX.XXX.COM.TR
It works.
Additional information messages like below;
it works.
Where do I have to change in config ?
Related
I am building Spring Cloud Config server with Sprint Boot v2.6.12 and Spring Cloud Config Server v3.1.1. Below is the application.yml configuration,
spring:
application:
name: config-server
main:
allow-bean-definition-overriding: true
cloud:
config:
server:
git:
uri: git#github.aus.thenational.com:demo/case_configuration.git
skip-ssl-validation: true
default-label: master
clone-on-start: true
clone-submodules: true
force-pull: true
refresh-rate: 60
search-paths:
- case/folder1
- case/folder2
Exception we are getting while server startup is as below,
2022-12-21 09:51:10.827 WARN 11524 --- [main] [CID:] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'healthContributorRegistry' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Unsatisfied dependency expressed through method 'healthContributorRegistry' parameter 2; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'configServerHealthIndicator' defined in class path resource [org/springframework/cloud/config/server/config/EnvironmentRepositoryConfiguration$ConfigServerActuatorConfiguration.class]: Unsatisfied dependency expressed through method 'configServerHealthIndicator' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'searchPathCompositeEnvironmentRepository' defined in class path resource [org/springframework/cloud/config/server/config/CompositeConfiguration.class]: Unsatisfied dependency expressed through method 'searchPathCompositeEnvironmentRepository' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'defaultEnvironmentRepository' defined in class path resource [org/springframework/cloud/config/server/config/DefaultRepositoryConfiguration.class]: Unsatisfied dependency expressed through method 'defaultEnvironmentRepository' parameter 1; nested exception is org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'multipleJGitEnvironmentProperties' is expected to be of type 'org.springframework.cloud.config.server.environment.MultipleJGitEnvironmentProperties' but was actually of type 'com.sun.proxy.$Proxy140'
***************************
APPLICATION FAILED TO START
***************************
Description:
The bean 'multipleJGitEnvironmentProperties' could not be injected because it is a JDK dynamic proxy
The bean is of type 'com.sun.proxy.$Proxy140' and implements:
org.springframework.cloud.config.server.support.HttpEnvironmentRepositoryProperties
org.springframework.cloud.config.server.support.EnvironmentRepositoryProperties
org.springframework.aop.SpringProxy
org.springframework.aop.framework.Advised
org.springframework.core.DecoratingProxy
Expected a bean of type 'org.springframework.cloud.config.server.environment.MultipleJGitEnvironmentProperties' which implements:
Action:
Consider injecting the bean as one of its interfaces or forcing the use of CGLib-based proxies by setting proxyTargetClass=true on #EnableAsync and/or #EnableCaching.
I tried configuring http and https proxy settings along with other GIT configurations. But that didnt work.
Expectation is, config server should be up successfully.
Tried to solve the issue by configuring spring AOP related configurations in application.yml , but that didnt work too.
Seems like something something to do with libraries versions.
I'm unable to run springboot application because of below error.
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'defaultValidator' defined in class path resource [org/springframework/boot/autoconfigure/validation/ValidationAutoConfiguration.class]: Invocation of init method failed; nested exception is java.lang.AbstractMethodError: org.hibernate.validator.internal.engine.ConfigurationImpl.getDefaultParameterNameProvider()Ljavax/validation/ParameterNameProvider;
Please help me.
This looks like an error caused by an illegal mix of spring versions.
Try to run mvn dependency:tree and see whether there are different versions of spring mixed in the classpath.
I am getting the following issue when Spring boot hibernates Connection.
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'bookController': Unsatisfied dependency expressed through field 'bookService'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'bookServiceImp': Unsatisfied dependency expressed through field 'bookDao'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'bookDaoImp': Unsatisfied dependency expressed through field 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'getSessionFactory' defined in class path resource [com/go/myapp/Config/AppConfig.class]: Invocation of init method failed; nested exception is org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.env.spi.JdbcEnvironment]
If you are building your project with maven look for the pom file. when you add dependencies there are Compile Dependencies for those dependencies. For an Example SpringBoot Starter 1.5.8.Release has https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-starter/1.5.8.RELEASE
SpringBoot 1.5.8.Release
SpringCore 4.3.12.Release
So please check your dependencies and there compile dependencies .
posting your POM file would help
So, i have a problem that can't solve.
I have a multi module gradle project with spring boot runners. With Jpa, Elastic, OrientDb and another configurations provided by spring-data and spring-integration. And i try to start my web application! Write web starter, make annotation scan, so when I use task 'gradle bootRun' - everything start perfectly - app works, all contexts up and life is good.BUT, when i try use my favorite IDE like Intellij idea, or colleague use Eclipse - get an error :
org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with
name 'org.springframework.integration.config.IdGenerato rConfigurer#0':
BeanPostProcessor before instantiation of bean failed; nested exception is
org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with
name org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration':
Initialization of bean failed; nested exception is java.lang.NoSuchMethodError:
org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration.setBeanFactory(Lo rg/springframework/beans/factory/BeanFactoryV
That cause by (projectName - is fake):
java.lang.RuntimeException: error trying to scan <jar-file>:
file:/home/<user>/project/<projectName>/classes/production/<projectName>-system-webapp/
But i have NO /projectName/classes/production/ folder! Anyway - with gradle it's work fine.
And to be honestly, before this another error catched:
Error creating bean with name 'entityManagerFactory' defined in class com.project.system.jpa.PepperJpaConfiguration: Invocation of init method failed
caused by:
error trying to scan <jar-file>: file:/home/<user>/project/<projectName>/classes/production/<projectName>-system-webapp/
Thank you for advice! Can give additional info.
P.S : Edited
So, the problem was solved:
I do not provide important error stacktrace like:
at org.hibernate.ejb.packaging.NativeScanner.getFilesInJar(NativeScanner.java:195)
at org.hibernate.ejb.Ejb3Configuration.addScannedEntries(Ejb3Configuration.java:506)
at org.hibernate.ejb.Ejb3Configuration.scanForClasses(Ejb3Configuration.java:861)
... 21 more
Caused by: java.io.IOException: invalid constant type: 18 at 50
And this was and JDK8-Hibernate-javassist problem https://hibernate.atlassian.net/browse/HHH-8286
When upgrade javassist version to 3.18.1-GA - all problems was solved(but why run through gradle worked perfectly...)
i m running hello world program in spring which works fine with eclipse but when i run it in tomcat separately it shows me error
rg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'urlMapping' defined in ServletContext resource [/WEB-INF/dispatcher-servlet.xml]: Cannot resolve reference to bean 'helloController' while setting bean property 'urlMap' with key [TypedStringValue: value [/hello.html], target type [null]]; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [net.roseindia.web.HelloWorldController] for bean with name 'helloController' defined in ServletContext resource [/WEB-INF/dispatcher-servlet.xml]; nested exception is java.lang.ClassNotFoundException: net.roseindia.web.HelloWorldController
Looks like net.roseindia.web.HelloWorldController is not in your classpath.