Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/jpa/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring boot glassfish/payara容器上的spring boot应用程序jndi_Spring Boot_Jpa_Jndi_Payara - Fatal编程技术网

Spring boot glassfish/payara容器上的spring boot应用程序jndi

Spring boot glassfish/payara容器上的spring boot应用程序jndi,spring-boot,jpa,jndi,payara,Spring Boot,Jpa,Jndi,Payara,我正在尝试在paraya服务器上部署spring boot应用程序。 我已经在paraya的管理面板上配置了连接池和jndi。。现在的问题是在我的spring boot项目中查找这个jndi。。projet在没有jndi配置的情况下成功部署 但是,当我尝试添加jndi配置时,应用程序将落在部署上 这是配置代码 @Configuration public class DataSourceConfigurer { //@Value("${qps.app.jndi

我正在尝试在paraya服务器上部署spring boot应用程序。 我已经在paraya的管理面板上配置了连接池和jndi。。现在的问题是在我的spring boot项目中查找这个jndi。。projet在没有jndi配置的情况下成功部署

但是,当我尝试添加jndi配置时,应用程序将落在部署上

这是配置代码

@Configuration
public class DataSourceConfigurer {
    
    
    //@Value("${qps.app.jndi.name}")
    private final String JNDI = "jdbc/qps_local";

    @Bean(destroyMethod = "")// disable inference of a potential close() method as a destroyer
    public DataSource dataSource() throws DataSourceLookupFailureException, IllegalArgumentException, NamingException {

        JndiDataSourceLookup dataSourceLookup = new JndiDataSourceLookup();

        return dataSourceLookup.getDataSource(JNDI);
               

}
这是我试图在帕亚拉发动战争时得到的一个例外

[2020-09-28T14:14:34.087+0000] [Payara 5.2020.3] [SEVERE] [] [javax.enterprise.system.core] [tid: _ThreadID=5137 _ThreadName=admin-thread-pool::admin-listener(54)] [timeMillis: 1601302474087] [levelValue: 1000] [[
  Exception while loading the app : java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: org.apache.catalina.LifecycleException: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'webSecurityConfig': Unsatisfied dependency expressed through method 'setContentNegotationStrategy' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration$EnableWebMvcConfiguration': Unsatisfied dependency expressed through method 'setConfigurers' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'openEntityManagerInViewInterceptorConfigurer' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/JpaBaseConfiguration$JpaWebConfiguration.class]: Unsatisfied dependency expressed through method 'openEntityManagerInViewInterceptorConfigurer' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'openEntityManagerInViewInterceptor' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/JpaBaseConfiguration$JpaWebConfiguration.class]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean]: Factory method 'entityManagerFactory' threw exception; nested exception is java.lang.AbstractMethodError: com.mysql.jdbc.jdbc2.optional.MysqlDataSource.isWrapperFor(Ljava/lang/Class;)Z]]