struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sunil D (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (WW-3689) NullPointerException coming from Settings / LegacyPropertiesConfigurationProvider (thread-safety issue?)
Date Fri, 08 Nov 2013 06:47:17 GMT

    [ https://issues.apache.org/jira/browse/WW-3689?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13817050#comment-13817050
] 

Sunil D commented on WW-3689:
-----------------------------

Right, I set <constant name="struts.enable.DynamicMethodInvocation" value="true" />
and continued to use DMI, and tested the 2.3.16-SNAPSHOT jars for a few days. I didn't get
the loadSettings() NPE. A few days later I reverted to the old 2.3.15.1 jars, and while most
of the time I don't get the NPE, today I did get the NPE. It's hard to test this, since it
only happens occasionally. But tentatively, it looks like your fix is working. :)

> NullPointerException coming from Settings / LegacyPropertiesConfigurationProvider (thread-safety
issue?)
> --------------------------------------------------------------------------------------------------------
>
>                 Key: WW-3689
>                 URL: https://issues.apache.org/jira/browse/WW-3689
>             Project: Struts 2
>          Issue Type: Bug
>    Affects Versions: 2.0.14, 2.2.3.1
>         Environment: Any; multi-core machines tend to demonstrate the problem more readily
though.
>            Reporter: James Abley
>            Assignee: Lukasz Lenart
>             Fix For: 2.3.15
>
>         Attachments: WW-3689-locked-initialisation.patch
>
>
> When running a load test, we intermittently see failures with this stack trace (the line
numbers are for 2.0.14, but we also see this with 2.2.3.1):
> {noformat}
> Exception in thread "MultiThreadTestRunner-5" java.lang.NullPointerException
> 	at org.apache.struts2.config.Settings.get(Settings.java:175)
> 	at org.apache.struts2.config.Settings.getDefaultInstance(Settings.java:293)
> 	at org.apache.struts2.config.Settings.getInstance(Settings.java:109)
> 	at org.apache.struts2.config.LegacyPropertiesConfigurationProvider.register(LegacyPropertiesConfigurationProvider.java:67)
> 	at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:131)
> 	at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)
> 	at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:395)
> 	at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:452)
> 	at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:205)
> 	at com.example.platform.test.servlet.OurServlet.handleRequest(OurServlet.java:64)
> {noformat}
> or
> {noformat}
> Caused by: java.lang.NullPointerException
> 	at org.apache.struts2.config.LegacyPropertiesConfigurationProvider.loadSettings(LegacyPropertiesConfigurationProvider.java:86)
> 	at org.apache.struts2.config.LegacyPropertiesConfigurationProvider.register(LegacyPropertiesConfigurationProvider.java:69)
> 	at com.opensymphony.xwork2.config.impl.DefaultConfiguration.reload(DefaultConfiguration.java:131)
> 	at com.opensymphony.xwork2.config.ConfigurationManager.getConfiguration(ConfigurationManager.java:52)
> 	at org.apache.struts2.dispatcher.Dispatcher.init_PreloadConfiguration(Dispatcher.java:395)
> 	at org.apache.struts2.dispatcher.Dispatcher.init(Dispatcher.java:452)
> 	at org.apache.struts2.dispatcher.FilterDispatcher.init(FilterDispatcher.java:205)
> {noformat}
> Our suspicion is that the initialisation isn't thread-safe; we've not seen this failure
on older, single-processor / single-core machines.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message