You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/10/13 16:33:00 UTC

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

     [ https://issues.apache.org/jira/browse/ARTEMIS-4013?focusedWorklogId=816695&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-816695 ]

ASF GitHub Bot logged work on ARTEMIS-4013:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 13/Oct/22 16:32
            Start Date: 13/Oct/22 16:32
    Worklog Time Spent: 10m 
      Work Description: asfgit closed pull request #4231: ARTEMIS-4013 proper connection unwrap in PostgresLargeObjectManager
URL: https://github.com/apache/activemq-artemis/pull/4231




Issue Time Tracking
-------------------

            Worklog Id:     (was: 816695)
    Remaining Estimate: 0h
            Time Spent: 10m

> 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
>          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)