You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Justin Bertram (Jira)" <ji...@apache.org> on 2022/11/09 01:26:00 UTC

[jira] [Updated] (ARTEMIS-4013) PostgresLargeObjectManager does incorrectly unwrap the jdbc connection

     [ https://issues.apache.org/jira/browse/ARTEMIS-4013?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Justin Bertram updated ARTEMIS-4013:
------------------------------------
    Fix Version/s: 2.27.0

> PostgresLargeObjectManager does incorrectly unwrap the jdbc connection
> ----------------------------------------------------------------------
>
>                 Key: ARTEMIS-4013
>                 URL: https://issues.apache.org/jira/browse/ARTEMIS-4013
>             Project: ActiveMQ Artemis
>          Issue Type: Bug
>          Components: Broker
>    Affects Versions: 2.25.0
>            Reporter: Johannes Edmeier
>            Priority: Minor
>             Fix For: 2.27.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> The {{PostgresLargeObjectManager}} unwraps in an unusual and non-conformative way. It should just do {{connection.unwrap(PGConnection.class)}} instead of the unusual reflection stuff.
> This currently prevents usage of Artemis alongside Testcontainers as it results in this exception:
> {noformat}
> java.lang.ClassCastException: class org.testcontainers.jdbc.ConnectionWrapper cannot be cast to class org.postgresql.PGConnection (org.testcontainers.jdbc.ConnectionWrapper and org.postgresql.PGConnection are in unnamed module of loader 'app')
> 	at org.apache.activemq.artemis.jdbc.store.file.PostgresLargeObjectManager.createLO(PostgresLargeObjectManager.java:69)
> 	at org.apache.activemq.artemis.jdbc.store.file.PostgresSequentialSequentialFileDriver.createFile(PostgresSequentialSequentialFileDriver.java:64)
> 	at org.apache.activemq.artemis.jdbc.store.file.JDBCSequentialFileFactoryDriver.openFile(JDBCSequentialFileFactoryDriver.java:109)
> 	at org.apache.activemq.artemis.jdbc.store.file.JDBCSequentialFile.load(JDBCSequentialFile.java:110)
> 	at org.apache.activemq.artemis.jdbc.store.file.JDBCSequentialFile.open(JDBCSequentialFile.java:104)
> 	at org.apache.activemq.artemis.core.paging.impl.PagingStoreFactoryDatabase.reloadStores(PagingStoreFactoryDatabase.java:220)
> 	at org.apache.activemq.artemis.core.paging.impl.PagingManagerImpl.reloadStores(PagingManagerImpl.java:326)
> 	at org.apache.activemq.artemis.core.paging.impl.PagingManagerImpl.start(PagingManagerImpl.java:430)
> 	at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.initialisePart1(ActiveMQServerImpl.java:3160)
> 	at org.apache.activemq.artemis.core.server.impl.LiveOnlyActivation.run(LiveOnlyActivation.java:68)
> 	at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.internalStart(ActiveMQServerImpl.java:655)
> 	at org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl.start(ActiveMQServerImpl.java:568)
> 	at org.apache.activemq.artemis.core.server.embedded.EmbeddedActiveMQ.start(EmbeddedActiveMQ.java:116)
> 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
> 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.base/java.lang.reflect.Method.invoke(Method.java:568){noformat}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)