Year: 2016

  1. Home
  2. Blog
  3. Year: 2016

What maximum value of a dval ID can be set?

What’s the Maximum value for dval ID is? Ans: 2^32-1 = 4,294,967,295 Why? Because Forge is a 32-bit program and can’t handle integers outside the 32-bit range. In practice, highest ID value that Forge uses (for auto-generated or external dimension values) is actually 2^32 – 2 (4294967294): and not recommended to exceed this. When assigning IDs to auto-generated or external […]

Continue Reading

Looping Map in Java

Below code snippet shows how to loop a Map or HashMap in Java. Map<String, String> map = new HashMap<String, String>(); map.put(“1”, “Mon”); map.put(“2”, “Tue”); map.put(“3”, “Wed”); //loop a Map for (Map.Entry<String, String> entry : map.entrySet()) { System.out.println(“Key : ” + entry.getKey() + ” Value : ” + entry.getValue()); } System.out.println(“####################”); //Java 8 only, forEach and Lambda map.forEach((k,v)->System.out.println(“Key : ” + k + […]

Continue Reading

Index KeyDescriptors for RecordCache do not match those of the join RecordAssembler

This problem occurs, when record cache upstream from record assembler is missing record index. Error may look like below FATAL 03/29/16 23:08:15.535 UTC (1459217295538) FORGE {config}: The index KeyDescriptors for the RecordCache ‘Demo Cache’ do not match those of the join in the RecordAssembler ‘Join_Demo_data’. Therefore, the join is invalid! ERROR 03/29/16 23:08:15.535 UTC (1459217295538) FORGE {config}: DValIdServer was destroyed […]

Continue Reading

Convert HashMap To ArrayList

Two of the most used data structures used in java are HashMap and ArrayList. Inherited from different hierarchies, HashMap inherited from Map interface which represents key-value pairs form of data. ArrayList is inherited from List interface which arranges the data in sequential manner. Conversion of HashMap to ArrayList is not straight forward as there is no direct methods in HashMap which converts HashMap to ArrayList. Let’s see how to convert HashMap to ArrayList in java with examples.

Continue Reading

Java Properties File

To store come configurable attributes of an application, we sometime use .properties files. Also know as Property Resource Bundles can be used to store strings for Internationalization.It’s like storing parameters as key value pairs. Let’s see an example here. First we will create a java project, let’s name it as “javaProperties” and added few classes to it with one properties […]

Continue Reading

Basics Of Cartridge Handlers

When working on projects, with Oracle Experience Manager implementation. We play a lot with cartridge templates and their handlers. Cartridge handlers are used to connect to external resources [MDEX Engine, database, ATG, CQ5, WCS, etc] and much more to create a response object [ContentItem]. ContentItem is then given to a web application and is responsible to render the content. For example: If we have […]

Continue Reading
Show Buttons
Hide Buttons