Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potential java.lang.NumberFormatException in Dashboard Analytics portlet #9775

Closed
jcastro-dotcms opened this issue Sep 12, 2016 · 3 comments
Closed

Comments

@jcastro-dotcms
Copy link
Contributor

Reported via Support: https://my.dotcms.com/tickets/detail.dot?id=f1116e05-a3a4-41ab-9129-53f3ca98f557

The client is getting a "Ooops, sorry. This has caused a problem" message when trying to see the Dashboard Analytics portlet. The following is a snippet of the stacktrace from the logs:

[12/09/16 10:43:42:516 HKT] ERROR priv.c: getTopAssets failed:java.lang.NumberFormatException: For input string: ""
java.lang.NumberFormatException: For input string: ""
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[?:1.8.0_66]
at java.lang.Long.parseLong(Long.java:601) ~[?:1.8.0_66]
at java.lang.Long.parseLong(Long.java:631) ~[?:1.8.0_66]
at com.dotcms.enterprise.priv.c.getTopAssets(SourceFile:1075) [ee-gaf7f4f0.jar:?]
at com.dotmarketing.portlets.dashboard.business.DashboardAPIImpl.getTopAssets(DashboardAPIImpl.java:124) [dotcms_3.5_g14af2ce.jar:?]

Expected Behavior

No exception should be displayed when viewing the Dashboard Analytics portlet.

Current Behavior

The exception is preventing users from viewing the portlet.

Possible Solution

This line here: https://github.com/dotCMS/enterprise-2.x/blob/master-3.6/src/com/dotcms/enterprise/priv/DashboardFactoryImpl.java#L1075 must return zero when the "count" column of the returned record is an empty String.

Known Workarounds

No available workarounds.

Steps to Reproduce (for bugs)

The issue is not reproducible with the starter data. Only with customer's DB.

Context

This is just a common potential casting error that needs to be fixed.

Your Environment

  • dotCMS version used: 3.5
  • Browser Name and version: Any
  • Operating System and version: Any
  • Application Server and version: Any
  • Java Brand and version: Any
  • Database and version: Any
  • Application module: Dashboard Analytics
@jcastro-dotcms jcastro-dotcms self-assigned this Sep 12, 2016
@jcastro-dotcms jcastro-dotcms added this to the 3.7.0 milestone Sep 12, 2016
@jcastro-dotcms
Copy link
Contributor Author

@agomez-dotcms
Copy link
Contributor

agomez-dotcms commented Mar 20, 2017

This issue was experienced by another client which reported it at https://my.dotcms.com/tickets/detail.dot?id=bb39cb2f-a46d-4638-a028-c9f96e4c2c28 (this time, against 3.7.1). After investigation, a better fix was found and was implemented as part of hotfix https://github.com/dotCMS/support/tree/master/hotfixes/hotfix-GIT-9775_v3.7.1 . So, the fix for this issue may be borrowed from hot-fix at https://github.com/dotCMS/support/tree/master/hotfixes/hotfix-GIT-9775_v3.7.1

@bryanboza
Copy link
Member

passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants