SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 60980: SAS Merchandise Intelligence Client generates error: 'java.lang.NumberFormatException: For input string: "n,nn"'

DetailsHotfixAboutRate It

The SAS® Merchandise Intelligence Client might generate the following error in the distudio.log file:

<YYYY-MM-DD> <HH:MM:SS,sss> FATAL Worker-4 java.lang.StackTraceElement - For input string: "n,nn"
java.lang.NumberFormatException: For input string: "n,nn"
    at sun.misc.FloatingDecimal.readJavaFormatString(FloatingDecimal.java:1222)
    at java.lang.Double.parseDouble(Double.java:510)
    at com.sas.solutions.di.server.api.core.AttributeFactory.createAttributeValue(AttributeFactory.java:44)
    at com.sas.solutions.di.server.dm.AttributeServiceBase.getCustomAttributeValues(AttributeServiceBase.java:480)
    at com.sas.solutions.di.server.dm.AttributeServiceBase.getCustomAttributeValues(AttributeServiceBase.java:407)

This error occurs when a decimal custom attribute that was loaded in a SAS session where the locale uses a comma as a decimal separator is displayed in the client. Attribute values are stored in the PRODUCT_ATTRIBUTES and GEOGRAPHY_ATTRIBUTES tables as character data even when the attribute is defined as a decimal attribute (ATTR_TYPE=1). In a locale where commas are used as decimal separators, these values are stored as "n,nn." The error is generated when the client attempts to convert that string to a decimal number for display. 

To work around this issue, all data values for decimal custom attributes in the PRODUCT_ATTRIBUTES and GEOGRAPHY_ATTRBUTE must be stored as "n.nn". The jobs that load data into these tables should be run using a locale that uses a period as the decimal separator. For simplified implementations, the jobs that might be impacted are Load_STG2DM_Geo_attribute_values and Load_STG2DM_Prod_attribute_values. For classic implementations, the jobs that might be impacted are Load_STG2DM_Product_attributes and Load_STG2DM_Geography_attributes.

The middle-tier and client locale settings determine whether a comma or period is used as a decimal separator when the data is displayed.

Click the Hot Fix tab in this note to access the hot fix for this issue.



Operating System and Release Information

Product FamilyProductSystemProduct ReleaseSAS Release
ReportedFixed*ReportedFixed*
SAS SystemSAS Regular Price OptimizationMicrosoft® Windows® for x645.2_M49.3 TS1M2
Linux for x645.2_M49.3 TS1M2
SAS SystemSAS Markdown OptimizationMicrosoft® Windows® for x645.2_M49.3 TS1M2
Linux for x645.2_M49.3 TS1M2
SAS SystemSAS Promotion OptimizationMicrosoft® Windows® for x645.2_M49.3 TS1M2
Linux for x645.2_M49.3 TS1M2
SAS SystemSAS Size ProfilingMicrosoft® Windows® for x643.2_M49.3 TS1M2
64-bit Enabled AIX3.2_M49.3 TS1M2
Linux for x643.2_M49.3 TS1M2
SAS SystemSAS Pack OptimizationMicrosoft® Windows® for x643.2_M49.3 TS1M2
64-bit Enabled AIX3.2_M49.3 TS1M2
Linux for x643.2_M49.3 TS1M2
* For software releases that are not yet generally available, the Fixed Release is the software release in which the problem is planned to be fixed.