Unable to insert/update the data in Media table through impex - sap

I'm trying to make an entry of an image in the media for email template related customizations as given below:
$contentCatalog=ContentCatalog_en
$contentCV=catalogVersion(CatalogVersion.catalog(Catalog.id[default=$contentCatalog]),CatalogVersion.version[default=Staged])[default=$contentCatalog:Staged]
$jarResourceCms=jar:com.test.core.setup.CoreSystemSetup&/core/import/cockpits/cmscockpit
INSERT_UPDATE Media;$contentCV[unique=true];code[unique=true];mime;realfilename;#media[translator=de.hybris.platform.impex.jalo.media.MediaDataTranslator][forceWrite=true]
;;EmailPageModel_preview;text/gif;EmailPageModel_preview.gif;$jarResourceCms/preview-images/EmailPageModel_preview.gif
How ever,I keep getting the below error in the logs while tryng to import this part of impex.
INFO | jvm 1 | main | 2016/07/26 09:51:57.699 | [mde.hybris.platform.impex.jalo.ImpExException: line 60 at main script: current handler is not set[HY--1]
INFO | jvm 1 | main | 2016/07/26 09:51:57.699 | at de.hybris.platform.impex.jalo.Importer.importNextInternal(Importer.java:763)
INFO | jvm 1 | main | 2016/07/26 09:51:57.699 | at de.hybris.platform.impex.jalo.Importer.importAll(Importer.java:708)
INFO | jvm 1 | main | 2016/07/26 09:51:57.699 | at com.pearson.core.jalo.StoreConfigJobPerformable.importImpexFile(StoreConfigJobPerformable.java:121)
INFO | jvm 1 | main | 2016/07/26 09:51:57.699 | at com.pearson.core.jalo.StoreConfigJobPerformable.importStoreConfigurations(StoreConfigJobPerformable.java:85)
INFO | jvm 1 | main | 2016/07/26 09:51:57.699 | at com.pearson.core.jalo.StoreConfigJobPerformable.perform(StoreConfigJobPerformable.java:49)
INFO | jvm 1 | main | 2016/07/26 09:51:57.699 | at de.hybris.platform.servicelayer.internal.jalo.ServicelayerJob.performCronJob(ServicelayerJob.java:38)
INFO | jvm 1 | main | 2016/07/26 09:51:57.699 | at de.hybris.platform.cronjob.jalo.Job.execute(Job.java:1301)
INFO | jvm 1 | main | 2016/07/26 09:51:57.699 | at de.hybris.platform.cronjob.jalo.Job.performImpl(Job.java:819)
INFO | jvm 1 | main | 2016/07/26 09:51:57.699 | at de.hybris.platform.cronjob.jalo.Job.access$1(Job.java:772)
INFO | jvm 1 | main | 2016/07/26 09:51:57.699 | at de.hybris.platform.cronjob.jalo.Job$JobRunable.run(Job.java:677)
INFO | jvm 1 | main | 2016/07/26 09:51:57.699 | at de.hybris.platform.util.threadpool.PoolableThread.run(PoolableThread.java:198)
INFO | jvm 1 | main | 2016/07/26 09:51:57.699 | Caused by: de.hybris.platform.impex.jalo.ImpExException: current handler is not set[HY--1]
INFO | jvm 1 | main | 2016/07/26 09:51:57.699 | at de.hybris.platform.impex.jalo.imp.ImpExImportReader.processLine(ImpExImportReader.java:692)
INFO | jvm 1 | main | 2016/07/26 09:51:57.699 | at de.hybris.platform.impex.jalo.imp.ImpExImportReader.readLine(ImpExImportReader.java:495)
INFO | jvm 1 | main | 2016/07/26 09:51:57.699 | at de.hybris.platform.impex.jalo.Importer.doImport(Importer.java:254)
INFO | jvm 1 | main | 2016/07/26 09:51:57.699 | at de.hybris.platform.impex.jalo.Importer.importNextInternal(Importer.java:757)
INFO | jvm 1 | main | 2016/07/26 09:51:57.699 | ... 10 more
INFO | jvm 1 | main | 2016/07/26 09:51:57.699 | Caused by: java.lang.IllegalStateException: current handler is not set
INFO | jvm 1 | main | 2016/07/26 09:51:57.699 | at de.hybris.platform.impex.jalo.media.MediaDataTranslator.getHandler(MediaDataTranslator.java:104)
INFO | jvm 1 | main | 2016/07/26 09:51:57.699 | at de.hybris.platform.impex.jalo.media.MediaDataTranslator.performImport(MediaDataTranslator.java:153)
INFO | jvm 1 | main | 2016/07/26 09:51:57.699 | at de.hybris.platform.impex.jalo.header.SpecialColumnDescriptor.performImport(SpecialColumnDescriptor.java:132)
INFO | jvm 1 | main | 2016/07/26 09:51:57.699 | at de.hybris.platform.impex.jalo.imp.DefaultImportProcessor.processUpdateLine(DefaultImportProcessor.java:581)
INFO | jvm 1 | main | 2016/07/26 09:51:57.699 | at de.hybris.platform.impex.jalo.imp.DefaultImportProcessor.processInsertUpdateLine(DefaultImportProcessor.java:409)
INFO | jvm 1 | main | 2016/07/26 09:51:57.699 | at de.hybris.platform.impex.jalo.imp.DefaultImportProcessor.processItemData_Impl(DefaultImportProcessor.java:244)
INFO | jvm 1 | main | 2016/07/26 09:51:57.699 | at de.hybris.platform.impex.jalo.imp.DefaultImportProcessor.processItemData(DefaultImportProcessor.java:149)
INFO | jvm 1 | main | 2016/07/26 09:51:57.699 | at de.hybris.platform.impex.jalo.imp.ImpExImportReader.processLine(ImpExImportReader.java:659)
Can anyone tell me what exactly is going wrong here?

Hi Please do the system update then try to execute below Impex.
# Preview Image for use in the CMS Cockpit
Import config properties into impex macros
$contentCatalog=xxxjapanContentCatalog
$contentCV=catalogVersion(CatalogVersion.catalog(Catalog.id[default=$contentCatalog]),CatalogVersion.version[default=Staged])[default=$contentCatalog:Staged]
INSERT_UPDATE Media;$contentCV[unique=true];code[unique=true];mime;realfilename;#media[translator=de.hybris.platform.impex.jalo.media.MediaDataTranslator][forceWrite=true]
;;EmailPageModel_preview;text/gif;EmailPageModel_preview.gif;$jarResourceCms/preview-images/EmailPageModel_preview.gif

Have you did any custom configuration with any of the code?
Reference:
https://answers.sap.com/questions/12756314/impexexception--javalangillegalstateexception-curr.html

Related

Analyzing ELF memory layout

I was analyzing an ELF Executable with readelf and getting the following Program and header.
|Type | Offset | VirtAddr | PhysAddr | FileSiz | MemSiz | Flg | Align | size | start addr | end addr |
|PHDR | 0x000034 | 0x08048034 | 0x08048034 | 0x00120 | 0x00120 | R E | 0x4 | 288 | 52 | 340 |
|INTERP | 0x000154 | 0x08048154 | 0x08048154 | 0x00013 | 0x00013 | R | 0x1 | 19 | 340 | 359 |
|LOAD | 0x000000 | 0x08048000 | 0x08048000 | 0x00600 | 0x00600 | RE | 0x1000 | 1536 | 0 | 1536 |
|LOAD | 0x000f0c | 0x08049f0c | 0x08049f0c | 0x0010c | 0x00114 | RW | 0x1000 | 276 | 3852 | 4128 |
|DYNAMIC | 0x000f14 | 0x08049f14 | 0x08049f14 | 0x000e8 | 0x000e8 | RW | 0x4 | 232 | 3860 | 4092 |
|NOTE | 0x000168 | 0x08048168 | 0x08048168 | 0x00044 | 0x00044 | R | 0x4 | 68 | 360 | 428 |
|GNU_EH_FRAME | 0x0004c4 | 0x080484c4 | 0x080484c4 | 0x0003c | 0x0003c | R | 0x4 | 60 | 1220 | 1280 |
|GNU_STACK | 0x000000 | 0x00000000 | 0x00000000 | 0x00000 | 0x00000 | RW | 0x10 | | | |
|GNU_RELRO | 0x000f0c | 0x08049f0c | 0x08049f0c | 0x000f4 | 0x000f4 | R | 0x1 | 244 | 3852 | 4096 |
1). Why is GNU_STACK at Program header table doesn't have a size or start addr?
2). At layout why memory position from 1536 to 3852 (2316 bytes) have no information? What this space is used for?
3). What changes to this format are needed to add extra text section?

Why ignite does not load all records into cache when server node count increased?

I have developed ignite sample data grid application with third party persistence. I have an entity named UserInfo. I have generated 3602000 records and added them into database. I have 64 GB ram on my machine. I am running n server nodes and after cluster initialized run a client node to trigger loading caches. When I run one or two server nodes and then load cache everything is fine. All records are loaded into the cache. When I run 4 server nodes approximately half of the records are loaded into the cache. There are a lot of free memory on the machine. I have created a github repo for sample application https://github.com/serdroid/userinfo .
Below free command output and ignitevisorcmd output for both cases.
before starting servers
free --giga
total used free shared buff/cache available
Mem: 65 8 52 0 4 56
2 server nodes running with -Xmx4G
Loaded 3602000 keys with backups in 255911ms.
Free memory
free --giga
total used free shared buff/cache available
Mem: 65 20 38 0 6 45
Cache details
Nodes for: info.serdroid.userinfo.grid.model.UserInfo(#c0)
+================================================================================================================+
| Node ID8(#), IP | CPUs | Heap Used | CPU Load | Up Time | Size | Hi/Mi/Rd/Wr |
+================================================================================================================+
| 800C684F(#n1), 10.251.74.157 | 4 | 87.97 % | 0.40 % | 00:13:07.851 | Total: 1837114 | Hi: 0 |
| | | | | | Heap: 0 | Mi: 0 |
| | | | | | Off-Heap: 1837114 | Rd: 0 |
| | | | | | Off-Heap Memory: 0 | Wr: 0 |
+------------------------------+------+-----------+----------+--------------+----------------------+-------------+
| 40FD7F83(#n0), 10.251.74.157 | 4 | 86.30 % | 0.40 % | 00:13:25.431 | Total: 1764886 | Hi: 0 |
| | | | | | Heap: 0 | Mi: 0 |
| | | | | | Off-Heap: 1764886 | Rd: 0 |
| | | | | | Off-Heap Memory: 0 | Wr: 0 |
+----------------------------------------------------------------------------------------------------------------+
4 server nodes running with -Xmx4G
Loaded 1805474 keys with backups in 98203ms.
Free memory
free --giga
total used free shared buff/cache available
Mem: 65 23 35 0 6 41
Cache details
Nodes for: info.serdroid.userinfo.grid.model.UserInfo(#c0)
+================================================================================================================+
| Node ID8(#), IP | CPUs | Heap Used | CPU Load | Up Time | Size | Hi/Mi/Rd/Wr |
+================================================================================================================+
| 9B36B2E9(#n2), 10.251.74.157 | 4 | 65.52 % | 0.27 % | 00:14:58.116 | Total: 534454 | Hi: 0 |
| | | | | | Heap: 0 | Mi: 0 |
| | | | | | Off-Heap: 534454 | Rd: 0 |
| | | | | | Off-Heap Memory: 0 | Wr: 0 |
+------------------------------+------+-----------+----------+--------------+----------------------+-------------+
| 1222A1A4(#n0), 10.251.74.157 | 4 | 39.65 % | 2.33 % | 00:15:06.421 | Total: 389344 | Hi: 0 |
| | | | | | Heap: 0 | Mi: 0 |
| | | | | | Off-Heap: 389344 | Rd: 0 |
| | | | | | Off-Heap Memory: 0 | Wr: 0 |
+------------------------------+------+-----------+----------+--------------+----------------------+-------------+
| 8699AB89(#n1), 10.251.74.157 | 4 | 62.77 % | 0.23 % | 00:15:01.325 | Total: 441069 | Hi: 0 |
| | | | | | Heap: 0 | Mi: 0 |
| | | | | | Off-Heap: 441069 | Rd: 0 |
| | | | | | Off-Heap Memory: 0 | Wr: 0 |
+------------------------------+------+-----------+----------+--------------+----------------------+-------------+
| 8B43AF4C(#n3), 10.251.74.157 | 4 | 65.44 % | 1.73 % | 00:14:55.624 | Total: 440607 | Hi: 0 |
| | | | | | Heap: 0 | Mi: 0 |
| | | | | | Off-Heap: 440607 | Rd: 0 |
| | | | | | Off-Heap Memory: 0 | Wr: 0 |
+----------------------------------------------------------------------------------------------------------------+
Apache Ignite uses off-heap memory to store your data. Please configure (enlarge) data region as it is described at https://apacheignite.readme.io/docs/memory-configuration.
Apache Ignite works in a Lazy way for loading data into memory from a store by design.
You can force data reload by Cache.loadCache(null) manually, or you can use EventType.EVT_NODE_JOINED local event as a trigger. Please see https://apacheignite.readme.io/docs/events for more details.

SSAS Rollup Measure for Parent in Flattened Ragged Hierarchy - Optimal Solution

Okay, so, I have a flattened hierarchy as a dimension table in a cube in the data warehouse and I need to roll-up a measure to all parents to the top of the hierarchy.
A little data to show you what I'm trying to accomplish..
DimWBS
---------------------------------------------------------
| DimWBSKey | Name | SortableWBS |
|------------|--------------------|---------------------|
| 1 | Recapitalization | 0050 |
| 2 | Recap Child | 0050.0001 |
| 3 | Recap Grandchild | 0050.0001.0002 |
| 4 | Recap GG | 0050.0001.0002.0003 |
| 5 | Recap GG 2 | 0050.0001.0002.0004 |
| 6 | Program Management | 0050.0002 |
| 7 | Program Child | 0050.0002.0002 |
| 8 | Program Grandchild | 0050.0002.0002.0001 |
---------------------------------------------------------
FactBudget
---------------------------
| DimWBSKey | Budget |
|------------|------------|
| 4 | $150,000 |
| 5 | $25,000 |
| 8 | $50,000 |
---------------------------
Expected Output
----------------------------------------------------------------------
| DimWBSKey | Name | SortableWBS | Budget |
|------------|--------------------|---------------------|------------|
| 1 | Recapitalization | 0050 | $225,000 |
| 2 | Recap Child | 0050.0001 | $175,000 |
| 3 | Recap Grandchild | 0050.0001.0002 | $175,000 |
| 4 | Recap GG | 0050.0001.0002.0003 | $150,000 |
| 5 | Recap GG 2 | 0050.0001.0002.0004 | $25,000 |
| 6 | Program Management | 0050.0002 | $50,000 |
| 7 | Program Child | 0050.0002.0002 | $50,000 |
| 8 | Program Grandchild | 0050.0002.0002.0001 | $50,000 |
----------------------------------------------------------------------
If I just do a basic MDX query like below, I get NULLS (as expected) for all of the parents.
SELECT {
[Measures].[Budget]
} ON COLUMNS, {
[DimWBS].[SortableWBS].[SortableWBS].MEMBERS
} ON ROWS FROM [G2 Summary]
Generates this:
----------------------------------------------------------------------
| DimWBSKey | Name | SortableWBS | Budget |
|------------|--------------------|---------------------|------------|
| 1 | Recapitalization | 0050 | NULL |
| 2 | Recap Child | 0050.0001 | NULL |
| 3 | Recap Grandchild | 0050.0001.0002 | NULL |
| 4 | Recap GG | 0050.0001.0002.0003 | $150,000 |
| 5 | Recap GG 2 | 0050.0001.0002.0004 | $25,000 |
| 6 | Program Management | 0050.0002 | NULL |
| 7 | Program Child | 0050.0002.0002 | NULL |
| 8 | Program Grandchild | 0050.0002.0002.0001 | $50,000 |
----------------------------------------------------------------------
There are a couple things I have tried already unsuccessfully
Just rolling up these values in the SQL stored procedures (i.e. pre-calculating the totals at each level of the hierarchy) before I populate the cube. This was a huge performance hit.
Creating a hierarchy in the DimWBS table using PATHITEM and calculating using DESCENDANTS. I was unable to successfully leverage these functions correctly. Maybe I'm missing something here, but I would like to avoid having to do this because it required me to create a static 12 level hierarchy.
If it helps, I do have the ParentWBSKey in the DimWBS table, though I didn't visualize it here.
So, my question is.. what is the best method for rolling up the budget measure in a flattened ragged hierarchy?

"Header" information row required for logical SQL information chunk

I have this current view (SQL Query already developed):
| Application Control ID | Application Name | System |
-----------------------------------------------------------
| A0037 | ABR_APP1 | ABR |
| A1047 | ABR_APP2 | ABR |
| A2051 | ABR_APP3 | ABR |
| A2053 | ABR_APP4 | ABR |
| A1909 | ABR_APP5 | ABR |
| A0032 | AIS_APP1 | AIS |
| A0029 | AIS_APP2 | AIS |
| A0030 | AIS_APP3 | AIS |
| A0039 | AOL_APP1 | AOL |
| A0038 | AOL_APP2 | AOL |
I need to change it to this:
| Application Control ID | Application Name | System |
------------------------------------------------------
| S0001 | [blank] | ABR |
| A0037 | ABR_APP1 | ABR |
| A1047 | ABR_APP2 | ABR |
| A2051 | ABR_APP3 | ABR |
| A2053 | ABR_APP4 | ABR |
| A1909 | ABR_APP5 | ABR |
| S0002 | [blank] | AIS |
| A0032 | AIS_APP1 | AIS |
| A0029 | AIS_APP2 | AIS |
| A0030 | AIS_APP3 | AIS |
| S0003 | [blank] | AOL |
| A0039 | AOL_APP1 | AOL |
| A0038 | AOL_APP2 | AOL |
The datamart tables in our knowledge management system are as follows:
- ATO_ATO_Application
- ATO_ATO_System
- ATO_APPLICATION_TO_SYSTEM
Question: Those sub-headers (S0001..., S0002..., S0003...) – are they easy to add to the view through SQL query programming?
- Somehow I need to show these “sub-header” data from the ATO_ATO_System table and place it above the logical application chunk / set as per shown above.
Thanks in advance..
Albert

Changing the orientation of a SplitView

I'm making a UWP (Windows 10) app. I'd like to know, is it possible to change the orientation of a SplitView? Typically, it's ordered like this:
______________________________________________
| | |
| | |
| | |
| | |
| | |
| Pane | Content |
| | |
| | |
| | |
| | |
| | |
----------------------------------------------
Is it possible to change the orientation to:
______________________________________________
| |
| |
| Pane |
| |
| |
| |
----------------------------------------------
| |
| |
| |
| |
| Content |
| |
| |
| |
----------------------------------------------
It is not supported by the platform (SplitVew.PanePlacement property can only be left or right).
You can likely achieve a somewhat similar affect by placing a command bar at the top of your application.