[
https://issues.apache.org/jira/browse/ARTEMIS-1614?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sami Korhonen updated ARTEMIS-1614:
-----------------------------------
Description:
WebSphere Application Server (classic) does a class scan (for properties)
during resource adapter installation. The scan causes artemis resource adapter
classes to initialize, which in turn causes a NPE at ActiveMQRALogger
(artemis-ra).
The issue is that during the scan WebSphere seems to use a classloader, which
does not support Class.getPackage() properly.
In order to support WebSphere, getPackage().getName() should be replaced with a
static string.
-Proper fix: Resolving NPE at ActiveMQRALogger leads to another NPE in logging.
Similar fix would be required for jboss-logging (LoggerProviders). I believe
that changing static initializer to lazy initalizer or initializing the logger
at resource adapter startup would resolve both issues. I have yet to verify
this fix.-
I had a deeper look at resource adapter's source code. I would rather suggest
applying similar patch to jboss-logging (LoggerProviders class) than going
through the effort of changing logger references to support lazy initialization
in artemis-ra (_and hoping that none of the dependencies are using
jboss-logging)_.
If you are familiar with WebSphere, you can find instructions on how to compile
and install adapter here ( [https://github.com/skorhone/websphere-artemis] )
was:
WebSphere Application Server (classic) does a class scan (for properties)
during resource adapter installation. The scan causes artemis resource adapter
classes to initialize, which in turn causes a NPE at ActiveMQRALogger
(artemis-ra).
The issue is that during the scan WebSphere seems to use a classloader, which
does not support Class.getPackage() properly.
A quick fix: In order to support WebSphere, getPackage().getName() should be
replaced with a static string.
Proper fix: Resolving NPE at ActiveMQRALogger leads to another NPE in logging.
Similar fix would be required for jboss-logging (LoggerProviders). I believe
that changing static initializer to lazy initalizer or initializing the logger
at resource adapter startup would resolve both issues. I have yet to verify
this fix.
If you are familiar with WebSphere, you can find instructions on how to compile
and install adapter here ( [https://github.com/skorhone/websphere-artemis] )
> Resource adapter installation on WebSphere Application Server fails
> -------------------------------------------------------------------
>
> Key: ARTEMIS-1614
> URL: https://issues.apache.org/jira/browse/ARTEMIS-1614
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Affects Versions: 2.3.0, 2.4.0
> Reporter: Sami Korhonen
> Priority: Minor
>
> WebSphere Application Server (classic) does a class scan (for properties)
> during resource adapter installation. The scan causes artemis resource
> adapter classes to initialize, which in turn causes a NPE at ActiveMQRALogger
> (artemis-ra).
> The issue is that during the scan WebSphere seems to use a classloader, which
> does not support Class.getPackage() properly.
> In order to support WebSphere, getPackage().getName() should be replaced with
> a static string.
> -Proper fix: Resolving NPE at ActiveMQRALogger leads to another NPE in
> logging. Similar fix would be required for jboss-logging (LoggerProviders). I
> believe that changing static initializer to lazy initalizer or initializing
> the logger at resource adapter startup would resolve both issues. I have yet
> to verify this fix.-
> I had a deeper look at resource adapter's source code. I would rather suggest
> applying similar patch to jboss-logging (LoggerProviders class) than going
> through the effort of changing logger references to support lazy
> initialization in artemis-ra (_and hoping that none of the dependencies are
> using jboss-logging)_.
> If you are familiar with WebSphere, you can find instructions on how to
> compile and install adapter here (
> [https://github.com/skorhone/websphere-artemis] )
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)