[
https://jira.jboss.org/jira/browse/GTNPORTAL-856?page=com.atlassian.jira....
]
Thomas Heute updated GTNPORTAL-856:
-----------------------------------
Fix Version/s: 3.1.0-GA
StackOverflow on JsonGeneratorImpl
----------------------------------
Key: GTNPORTAL-856
URL:
https://jira.jboss.org/jira/browse/GTNPORTAL-856
Project: GateIn Portal
Issue Type: Bug
Security Level: Public(Everyone can see)
Affects Versions: 3.0.0-CR01
Environment: tomcat with WCM 2.0-Beta01-SNAPSHOT, GateIn 3.0.0 CR01-CP01
Reporter: Benjamin Paillereau
Priority: Blocker
Fix For: 3.1.0-GA
Caused by: java.lang.StackOverflowError
at java.security.AccessController.doPrivileged(Native Method)
at java.lang.Package.defineSystemPackage(Package.java:520)
at java.lang.Package.getSystemPackages(Package.java:511)
at java.lang.ClassLoader.getPackages(ClassLoader.java:1551)
at java.lang.ClassLoader.getPackages(ClassLoader.java:1549)
at java.lang.ClassLoader.getPackages(ClassLoader.java:1549)
at java.lang.Package.getPackages(Package.java:281)
at sun.reflect.GeneratedMethodAccessor162.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
org.exoplatform.ws.frameworks.json.impl.JsonGeneratorImpl.createJsonObject(JsonGeneratorImpl.java:94)
at
org.exoplatform.ws.frameworks.json.impl.JsonGeneratorImpl.createJsonValue(JsonGeneratorImpl.java:221)
at
org.exoplatform.ws.frameworks.json.impl.JsonGeneratorImpl.createJsonObject(JsonGeneratorImpl.java:97)
at
org.exoplatform.ws.frameworks.json.impl.JsonGeneratorImpl.createJsonValue(JsonGeneratorImpl.java:221)
at
org.exoplatform.ws.frameworks.json.impl.JsonGeneratorImpl.createJsonObject(JsonGeneratorImpl.java:97)
at
org.exoplatform.ws.frameworks.json.impl.JsonGeneratorImpl.createJsonValue(JsonGeneratorImpl.java:221)
at
org.exoplatform.ws.frameworks.json.impl.JsonGeneratorImpl.createJsonObject(JsonGeneratorImpl.java:97)
at
org.exoplatform.ws.frameworks.json.impl.JsonGeneratorImpl.createJsonValue(JsonGeneratorImpl.java:221)
at
org.exoplatform.ws.frameworks.json.impl.JsonGeneratorImpl.createJsonObject(JsonGeneratorImpl.java:97)
...
the code is the following :
import org.exoplatform.portal.webui.util.Util;
import org.exoplatform.services.wcm.navigation.NavigationService;
def navigations = Util.getUIPortal().getNavigations();
def navigationService = uicomponent.getApplicationComponent(NavigationService.class);
def JSONnavigation = navigationService.getNavigationsAsJSON(navigations);
the method at the origin of the stack overflow :
public String getNavigationsAsJSON(List<PageNavigation> navigations) throws
Exception {
PortalNavigation portalNavigation = new PortalNavigation(navigations);
JsonValue jsonValue = new JsonGeneratorImpl().createJsonObject(portalNavigation);
String JSONnavigation = jsonValue.toString();
JSONnavigation = JSONnavigation.substring(1, JSONnavigation.length() - 1);
JSONnavigation = JSONnavigation.replaceFirst("\"navigations\":",
"");
return JSONnavigation;
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira