Skip to content

Unable to use JdbcStoreFactory - missing class org.logicalcobwebs.proxool.ProxoolDataSource #607

Closed

Description

@brisote

Describe the bug
When I try to use JdbcStoreFactory like this:

MessageStoreFactory messageStoreFactory = new JdbcStoreFactory(settings);
...
this.initiator = new SocketInitiator(this, messageStoreFactory, settings, logFactory, messageFactory);
...

I get the following error (full stack trace at the bottom):

Caused by: java.lang.ClassNotFoundException: org.logicalcobwebs.proxool.ProxoolDataSource
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)

I have tried to download the library from their website: https://proxool.sourceforge.net/download.html and inject manually and I can solve this exception but another once occured that I'm not capable to resolve anymore:

Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make protected final java.lang.Class java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain) throws java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @289d1c02
	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:354)
	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:297)
	at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:199)
	at java.base/java.lang.reflect.Method.setAccessible(Method.java:193)
	at org.logicalcobwebs.cglib.core.ReflectUtils$2.run(ReflectUtils.java:56)
	at java.base/java.security.AccessController.doPrivileged(AccessController.java:318)
	at org.logicalcobwebs.cglib.core.ReflectUtils.<clinit>(ReflectUtils.java:46)

However proxool (https://github.com/proxool/proxool) is not anymore supported so maybe it is good idea to remove this connection pool and use something like HikariCP (https://github.com/brettwooldridge/HikariCP) ?

Activity

  1. chrjohn commented on Jan 27, 2023

    @chrjohn
    Member

    Also see #373

  2. chrjohn commented on Jan 27, 2023

    @chrjohn
    Member

    As you can see in the discussion I mentioned you could use another connection pool by passing the data source to the JdbcStore.

    IMHO we could get rid of Proxool, would you like to provide a pull request?

    As for the exception you are encountering: https://stackoverflow.com/a/41265267/4962355

  3. brisote commented on Feb 6, 2023

    @brisote
    Author

    Thanks for the help @chrjohn. I solved the issue using this code:

    JdbcStoreFactory messageStoreFactory = new JdbcStoreFactory(settings);
    messageStoreFactory.setDataSource(dataSource);
    ...
    this.initiator = new SocketInitiator(this, messageStoreFactory, settings, logFactory, messageFactory);
    ...
    

    I will be not able to create a pull request for such thing as I'm not very familiar with the code base of the library.

  4. changed the title [-]Unable to use JdbcStoreFactory missing class org.logicalcobwebs.proxool.ProxoolDataSource[/-] [+]Unable to use `JdbcStoreFactory` - missing class `org.logicalcobwebs.proxool.ProxoolDataSource`[/+] on Feb 13, 2023
  5. added theissue type on May 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions