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 2020/06/22 15:37:00 UTC

[jira] [Work logged] (AMQ-7121) IntrospectionSupport.setProperty should call method.setAccessible(true)

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

ASF GitHub Bot logged work on AMQ-7121:
---------------------------------------

                Author: ASF GitHub Bot
            Created on: 22/Jun/20 15:36
            Start Date: 22/Jun/20 15:36
    Worklog Time Spent: 10m 
      Work Description: jbonofre opened a new pull request #545:
URL: https://github.com/apache/activemq/pull/545


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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

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

> IntrospectionSupport.setProperty should call method.setAccessible(true)
> -----------------------------------------------------------------------
>
>                 Key: AMQ-7121
>                 URL: https://issues.apache.org/jira/browse/AMQ-7121
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.15.8
>            Reporter: Ollie Robertshaw
>            Assignee: Jean-Baptiste Onofré
>            Priority: Minor
>             Fix For: 5.16.0
>
>         Attachments: AMQ-7121_Set_accessible.patch
>
>   Original Estimate: 2m
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> We are trying to run a broker in JDK 11 and run into the following exception:
> {code:java}
> 2018-12-07 12:44:41,363 ERROR main o.a.a.u.IntrospectionSupport Could not set property soTimeout on ServerSocket[addr=/0:0:0:0:0:0:0:0,localport=9505]
> java.lang.IllegalAccessException: class org.apache.activemq.util.IntrospectionSupport cannot access a member of class sun.nio.ch.ServerSocketAdaptor (in module java.base) with modifiers "public"
> at java.base/jdk.internal.reflect.Reflection.newIllegalAccessException(Reflection.java:361)
> at java.base/java.lang.reflect.AccessibleObject.checkAccess(AccessibleObject.java:591)
> at java.base/java.lang.reflect.Method.invoke(Method.java:558)
> at org.apache.activemq.util.IntrospectionSupport.setProperty(IntrospectionSupport.java:184)
> at org.apache.activemq.util.IntrospectionSupport.setProperties(IntrospectionSupport.java:155)
> at org.apache.activemq.transport.tcp.TcpTransportServer.configureServerSocket(TcpTransportServer.java:187)
> at org.apache.activemq.transport.tcp.TcpTransportServer.bind(TcpTransportServer.java:142)
> at org.apache.activemq.transport.tcp.TcpTransportFactory.doBind(TcpTransportFactory.java:62)
> at org.apache.activemq.transport.TransportFactorySupport.bind(TransportFactorySupport.java:40)
> at org.apache.activemq.broker.TransportConnector.createTransportServer(TransportConnector.java:318)
> at org.apache.activemq.broker.TransportConnector.getServer(TransportConnector.java:141){code}
> Note that we also see
> {code:java}
> Could not set property reuseAddress ...{code}
> These are caused by {{sun.nio.ch.ServerSocketAdaptor}} becoming a non-public class in JDK 11 (if not earlier).
> It can be fixed simply by having {{IntrospectionSupport.setProperty}} call {{setter.setAccessible(true)}} before it invokes any methods on it.
> Otherwise we find our local broker runs perfectly fine. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)