
|
If you were logged in you would be able to see more operations.
|
|
|
|
Environment:
|
JBoss:
------
Version: 4.0.3SP1(build: CVSTag=JBoss_4_0_3_SP1 date=200510231054)
Version Name: Zion
Built on: October 23 2005
Environment:
------------
Start date: Wed Apr 12 22:38:03 PDT 2006
Hardware:
---------
#CPU: 4
OS: Linux 2.6.9-11.ELsmp (i386)
JVM Environment:
----------------
JVM Version: 1.5.0_05-b05 (Sun Microsystems Inc.)
JVM Name: Java HotSpot(TM) Server VM
JBoss:
------
Version: 4.0.3SP1(build: CVSTag=JBoss_4_0_3_SP1 date=200510231054)
Version Name: Zion
Built on: October 23 2005
Environment:
------------
Start date: Wed Apr 12 22:38:03 PDT 2006
Hardware:
---------
#CPU: 4
OS: Linux 2.6.9-11.ELsmp (i386)
JVM Environment:
----------------
JVM Version: 1.5.0_05-b05 (Sun Microsystems Inc.)
JVM Name: Java HotSpot(TM) Server VM
|
|
|
This problem occurs only on linux. When run on 1.5 and winXP, everything works fine.
When application that utilized struts-menu 2.3 is under load that is simulated be openload, struts-menu crashes one thread after another untill the whole app dies.
Here is the exception that is thrown:
java.lang.NullPointerException
at net.sf.navigator.taglib.DisplayMenuTag.setLocation(DisplayMenuTag.java:217)
at net.sf.navigator.taglib.DisplayMenuTag.setPageLocation(DisplayMenuTag.java:173)
at net.sf.navigator.taglib.DisplayMenuTag.setPageLocation(DisplayMenuTag.java:205)
at net.sf.navigator.taglib.DisplayMenuTag.doStartTag(DisplayMenuTag.java:123)
According to the stacktrace the exception is thrown DisplayMenuTag.java:217:
protected void setLocation(MenuComponent menu) throws MalformedURLException {
211 HttpServletRequest request =
212 (HttpServletRequest) pageContext.getRequest();
213
214 // if the location attribute is null,
215 // then set it with a context relative page
216 // attribute if it exists
217 if (menu.getLocation() == null) { ---> here is the exception.
......................
.....................
. Looking through the code revealed that menus are reinitialized on every request (should it be static and cached??) and it uses ArrayList to hold the submenu elements, see MenuComponent.
Once I substituted ArrayList to Vector, the problem was gone.
29 //~ Instance fields ========================================================
30
31 protected List menuComponents = new ArrayList(); ---> ArrayList for some reason created problems
32 protected MenuComponent parentMenu = null;
33
|
|
Description
|
This problem occurs only on linux. When run on 1.5 and winXP, everything works fine.
When application that utilized struts-menu 2.3 is under load that is simulated be openload, struts-menu crashes one thread after another untill the whole app dies.
Here is the exception that is thrown:
java.lang.NullPointerException
at net.sf.navigator.taglib.DisplayMenuTag.setLocation(DisplayMenuTag.java:217)
at net.sf.navigator.taglib.DisplayMenuTag.setPageLocation(DisplayMenuTag.java:173)
at net.sf.navigator.taglib.DisplayMenuTag.setPageLocation(DisplayMenuTag.java:205)
at net.sf.navigator.taglib.DisplayMenuTag.doStartTag(DisplayMenuTag.java:123)
According to the stacktrace the exception is thrown DisplayMenuTag.java:217:
protected void setLocation(MenuComponent menu) throws MalformedURLException {
211 HttpServletRequest request =
212 (HttpServletRequest) pageContext.getRequest();
213
214 // if the location attribute is null,
215 // then set it with a context relative page
216 // attribute if it exists
217 if (menu.getLocation() == null) { ---> here is the exception.
......................
.....................
. Looking through the code revealed that menus are reinitialized on every request (should it be static and cached??) and it uses ArrayList to hold the submenu elements, see MenuComponent.
Once I substituted ArrayList to Vector, the problem was gone.
29 //~ Instance fields ========================================================
30
31 protected List menuComponents = new ArrayList(); ---> ArrayList for some reason created problems
32 protected MenuComponent parentMenu = null;
33 |
Show » |
Sort Order:
made changes - 08/May/06 05:21 PM
| Field |
Original Value |
New Value |
|
Fix Version/s
|
|
2.4
[ 10051
]
|
made changes - 10/May/06 01:13 AM
|
Resolution
|
|
Fixed
[ 1
]
|
|
Status
|
Open
[ 1
]
|
Resolved
[ 5
]
|
|
protected List menuComponents = Collections.synchronizedList(new ArrayList());
Tested with WAPT - now handles 100 simultaneous users w/ no exceptions. There were many exceptions before.
Thanks for solving this issue!