Sanjay Patidar
Sanjay Patidar

Reputation: 1

Issue in deploying Spring boot 3.3.1 App on Payara 6.2024.6 after adding JNDI configuration with Informix DB

I had created one hello app without JPA I deployed it on Payara, it worked but when I added JNDI name to it and configured properly JNDI in Payara also added all the drivers to payara lib directory, I am still facing below error related to JNDI object not found

INFO:   2024-07-04T07:38:44.465-07:00 DEBUG 9220 --- [min-listener(6)] o.s.jndi.JndiPropertySource              : JNDI lookup for name [spring.datasource.bean-class-loader] threw NamingException with message: Lookup failed for 'spring.datasource.bean-class-loader' in SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming}. Returning null.
INFO:   2024-07-04T07:38:44.469-07:00 DEBUG 9220 --- [min-listener(6)] o.s.b.f.s.DefaultListableBeanFactory     : Autowiring by type from bean name 'dataSource' via factory method to bean named 'spring.datasource-org.springframework.boot.autoconfigure.jdbc.DataSourceProperties'
INFO:   2024-07-04T07:38:44.469-07:00 DEBUG 9220 --- [min-listener(6)] o.s.b.f.s.DefaultListableBeanFactory     : Autowiring by type from bean name 'dataSource' via factory method to bean named 'org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@5f3a6459'
INFO:   2024-07-04T07:38:44.485-07:00 DEBUG 9220 --- [min-listener(6)] org.springframework.jndi.JndiTemplate    : Looking up JNDI object with name [java:comp/env/jdbc/aes]
INFO:   2024-07-04T07:38:44.488-07:00  WARN 9220 --- [min-listener(6)] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Failed to initialize dependency 'dataSourceScriptDatabaseInitializer' of LoadTimeWeaverAware bean 'entityManagerFactory': Error creating bean with name 'dataSourceScriptDatabaseInitializer' defined in class path resource [org/springframework/boot/autoconfigure/sql/init/DataSourceInitializationConfiguration.class]: Unsatisfied dependency expressed through method 'dataSourceScriptDatabaseInitializer' parameter 0: Error creating bean with name 'dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/JndiDataSourceAutoConfiguration.class]: Failed to instantiate [javax.sql.DataSource]: Factory method 'dataSource' threw exception with message: Failed to look up JNDI DataSource with name 'java:comp/env/jdbc/aes'
INFO:   2024-07-04T07:38:44.567-07:00 DEBUG 9220 --- [min-listener(6)] .s.b.a.l.ConditionEvaluationReportLogger

I tried adding latest version of driver jars and verified domain.xml also pinged the connection it is succeeded, But still I was not able to deploy me application on Payara server

Upvotes: 0

Views: 110

Answers (0)

Related Questions