Skip to content
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

it don't work :( #50

Closed
dimzon opened this issue Mar 28, 2014 · 4 comments
Closed

it don't work :( #50

dimzon opened this issue Mar 28, 2014 · 4 comments
Labels

Comments

@dimzon
Copy link

dimzon commented Mar 28, 2014

I'm using my custom ClassLoader (nothing special, just this)

            ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
            Thread.currentThread().setContextClassLoader(new ClassLoader(contextClassLoader) {
            });

Seems like bytecode modifications doesn't take effect :(

            IHikariConnectionProxy proxyConnection = ProxyFactory.getProxyConnection(this, connection, transactionIsolation, isAutoCommit, isReadOnly, catalog);
            proxyConnection.resetConnectionState();

proxyConnection is null (seems like no code generation affected) !!!

        JavassistProxyFactory.initialize();
        HikariConfig config = new HikariConfig();
        setBeanValues(properties, config);
        config.setPassword(null);
        config.setUsername(null);
        config.setDataSource(dataSource);
        return new HikariDataSource(config);

removing custom classloader fixes issue

@dimzon
Copy link
Author

dimzon commented Mar 28, 2014

@brettwooldridge
Copy link
Owner

Try HikariCP 1.3.5-SNAPSHOT on the dev branch. I have checked in a fix for the issue.

@dimzon
Copy link
Author

dimzon commented Mar 29, 2014

btw replace return null to something like throw new AssertionError("Something wrong with generated bytecode");

@brettwooldridge
Copy link
Owner

Good idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants