[
https://issues.apache.org/jira/browse/ARTEMIS-3665?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17485306#comment-17485306
]
Robbie Gemmell commented on ARTEMIS-3665:
-----------------------------------------
I dont know about the actual NPE, but yes the finalization can occur even if
the constructor fails so the 'left open' log will likely be spurious after the
earlier construction exception as you surmised, since the class doesnt properly
account for that possibility. That specific erroneous logging was very nearly
fixed in a prior PR when it came up in another context recently, but instead
the finalize calls were simply removed
([https://github.com/apache/activemq-artemis/pull/3872)] as had already been
intended due to their general issues, deprecation, and coming removal from Java
itself.
> NullPointerException in ServerLocator.createSessionFactory
> ----------------------------------------------------------
>
> Key: ARTEMIS-3665
> URL: https://issues.apache.org/jira/browse/ARTEMIS-3665
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Components: ActiveMQ-Artemis-Native
> Affects Versions: 2.17.0
> Environment: Linux version 3.10.0-1160.49.1.el7.x86_64
> ([email protected]) (gcc version 4.8.5 20150623 (Red Hat
> 4.8.5-44) (GCC) ) #1 SMP Tue Nov 30 15:51:32 UTC 2021
> Artemis 2.17.0
> Connection string is:
> (tcp://ba-artms21.qa.raveu.net:61616,tcp://ba-artms22.qa.raveu.net:61616)
> Reporter: Stephen Baker
> Assignee: Clebert Suconic
> Priority: Major
>
> In one environment I am frequently seeing a NullPointerException in
> ServerLocator.createSessionFactory():
> java.lang.NullPointerException
> at
> org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.<init>(ClientSessionFactoryImpl.java:189
> at
> org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:683)
>
> The line in the report is:
> `connectorFactory =
> instantiateConnectorFactory(connectorConfig.getA().getFactoryClassName());`
> Unfortunately I'm not able to reproduce in my development environment which
> makes debugging difficult.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)