Skip to content

Spring 5.x DataSource proxying does not work with Oracle UCP on JDK 9+ [SPR-17003] #21541

Closed

Activity

  1. spring-projects-issues commented on Jul 4, 2018

    @spring-projects-issues
    CollaboratorAuthor

    Juergen Hoeller commented

    Which kind of proxying is attempted here? In other words, what does the DataSource setup look like specifically?

  2. spring-projects-issues commented on Jul 4, 2018

    @spring-projects-issues
    CollaboratorAuthor

    David J. M. Karlsen commented

    For my case (it is another user at stack-overflow) it is:

    
    @Bean
    public PoolDataSource dataSource() throws SQLException, UniversalConnectionPoolException {
     shutdown(); //needed after 12.0.2 - bug or feature - nevertheless...
    
     PoolDataSource poolDataSource = PoolDataSourceFactory.getPoolDataSource();
     poolDataSource.setConnectionPoolName("JFRPOOL");
     poolDataSource.setConnectionFactoryClassName(OracleDataSource.class.getName());
     poolDataSource.setMinPoolSize(minPoolSize);
     poolDataSource.setMaxPoolSize(maxPoolSize);
     poolDataSource.setInitialPoolSize(initialPoolSize);
     poolDataSource.setValidateConnectionOnBorrow(validateConnectionOnBorrow);
     poolDataSource.setMaxConnectionReuseTime(maxConnectionReuseTimeSec);
     poolDataSource.setInactiveConnectionTimeout(inactiveConnectionTimeoutSec);
     poolDataSource.setAbandonedConnectionTimeout(abandonedConnectionTimeout);
     poolDataSource.setTimeToLiveConnectionTimeout(timeToLiveConnectionTimeout);
     poolDataSource.setConnectionWaitTimeout(connectionWaitTimeout);
     poolDataSource.setONSConfiguration(ONSConfiguration);
     poolDataSource.setFastConnectionFailoverEnabled(fastConnectionFailoverEnabled);
     poolDataSource.setMaxStatements(maxStatements);
    
     poolDataSource.setURL(URL);
     poolDataSource.setUser(user);
     poolDataSource.setPassword(password);
     poolDataSource.setLoginTimeout(loginTimeout);
    
     Properties properties = new Properties();
     properties.put(OracleConnection.CONNECTION_PROPERTY_THIN_READ_TIMEOUT, readTimeoutMillis.toString());
     properties.put("DMSStatementMetrics", Boolean.TRUE.toString());
     properties.put("oracle.jdbc.DMSStatementMetrics", Boolean.TRUE.toString());
     poolDataSource.setConnectionProperties(properties);
    
     return poolDataSource;
    }
    
    
  3. spring-projects-issues commented on Jul 4, 2018

    @spring-projects-issues
    CollaboratorAuthor

    Juergen Hoeller commented

    And some AOP advice is trying to build an interface-based proxy for that PoolDataSource, I assume? Since that's the only known source of such signature conflicts in interfaces...

  4. spring-projects-issues commented on Jul 5, 2018

    @spring-projects-issues
    CollaboratorAuthor
  5. spring-projects-issues commented on Jul 22, 2018

    @spring-projects-issues
    CollaboratorAuthor

    Juergen Hoeller commented

    This turns out to be a side effect of #21264 where we're trying to combine interfaces for AspectJ pointcut matching. We ignore any such failures now, proceeding with the original target method (as we did before). This is ready for release in 5.1 RC1 and 5.0.8 this week; feel free to give it an early try against the upcoming 5.1.0.BUILD-SNAPSHOT / 5.0.8.BUILD-SNAPSHOT.

  6. added
    type: bug
    in: data
    on Jan 11, 2019
  7. added this to the 5.0.8 milestone on Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

in: datatype: bug

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions