Topic "Troubleshooting" no response inside browser console - sapui5

I cannot get this to work as stated in the UI5 documentation topic Troubleshooting for browser developer tools.
I already typed the code but I see no response.
myView=sap.ui.getCore().byId("HeapOfShards---app").
myView.byId("myButton").

Issue 1
When pasting code snippet from the documentation, you need to omit the full stop (.).
Otherwise, the console will think that the expression is not complete, hence, no response.
But just omitting the full stop will lead to an error that myView is undefined. See Issue 2.
Issue 2
Since UI5 1.61.0, the component in the sample code (id="HeapOfShards") gets an additional auto-prefixed ID from the parent ComponentContainer (id="container"). Therefore, when accessing the root view via the global ID like in the topic, the ID of the ComponentContainer needs to be prepended:
myView = sap.ui.getCore().byId("container-HeapOfShards---app");
myView.byId("myButton");
This is clearly a documentation issue that needs to be fixed. Update: It's fixed now.
Why it didn't work
In 1.61, the sample code for Troubleshooting moved from creating the ComponentContainer via inline-script to creating it declaratively via the module sap/ui/core/ComponentSupport.commit
The reason why .byId("HeapOfShards---app") suddenly failed is that ComponentSupport sets several settings beforehand when creating the ComponentContainer, among which the autoPrefixId gets true by default. src
When creating the ComponentContainer directly without the ComponentSupport, autoPrefixId is false by default which is why it was all fine in previous versions.

Related

How to disable wss4j timestamp cache

I need to update a javaEE application (still in java 1.7) that provides a SOAP web service. And I'd like to disable the TIMESTAMP_CACHE that wss4j (v2.0.2) uses to control reply attacks. It creates too many files and the OS reaches the maximum open files allowed, repeatedly. The files start to appear, one for each request that has been made and are named in the following way:
wss4j%002etimestamp%002ecache-e%0058ga%0058l%0058%004b%0057g%004ah%0050w==.data
The documentation states that the TIMESTAMP_CACHE can be changed (or so I understand):
ConfigurationConstants.ENABLE_TIMESTAMP_CACHE ("enableTimestampCache"): Whether to cache Timestamp Created Strings (these are only cached in conjunction with a message Signature). The default value is "true".
I've found many examples to change some of these ConfigurationConstants when a client application creates the Call object. See an example to change the PASSWORD_TYPE constant:
Service service = new Service();
Call call = (Call) service.createCall();
...
call.setProperty(UsernameToken.PASSWORD_TYPE, WSConstants.PASSWORD_TEXT);
call.setProperty(WSHandlerConstants.USER,"werner");
However, my application is not on the client side but on the server side and I haven't found so far the way to change the ENABLE_TIMESTAMP_CACHE constant.
Any idea?
I couldn't find a way to disable the timestamp cache. However, the wss4j behaviour described above happened to be a bug that not only resulted in lots of open files but in lots of open threads. It has already been fixed in version 2.0.9. Upgrading to the "newer" version did the trick.
You can find here the discussion in full that drove to the bug discovery and here the fix in wss4j's jira

MyBatis Ignite L2 cache Integration does not work with Ignite 2.0

Following the steps mentioned at mybatis-ignite integration page # mybatis-ignite with Ignite 2.0, i see that the call to the mapper hangs & never returns. This is after working around several other issues like requiring ignite-cache configuration to be placed in IGNITE_HOME/config/default-config.xml which still doesn't get picked up unless i place it in a physical location in the project dir (otherwise i see the error in the log "Initializing the default cache. Consider properly configuring 'config/default-config.xml' instead.") which again also seems to have no effect.
Since the integration seems to have several issues i am not sure if it is still supported..any thoughts from any one who has successfully done this or from the mybatis-ignite team would be great.
Edit: If it helps, i have placed a small self contained project # https://github.com/softwarebrahma/MyBatis-Ignite-L2-cache-POC that can be used to reproduce the issues i have mentioned.
I missed mentioning in the repo..but only the Ports table & schema is used for the purposes of the demo the other tables are not used. What happens is that in the file (github.com/softwarebrahma/MyBatis-Ignite-L2-cache-POC/blob/master/domain/src/main/java/com/brocade/dcm/domain/xml/PostsMapper.xml) if i remove the line "cache type="org.mybatis.caches.ignite.IgniteCacheAdapter" />" then everything will work fine without ignite caching. But the moment i add that line as shown in the uploaded file the mapper method calls just hangs.

Error updating service reference

When trying to update a service reference in a class library (VS2013), i get the following error.
"The configuration for the service reference could not be updated due to the following issue: An error occurred creating the configuration section handler for system.serviceModel/bindings: AssemblyResolveEvent handlers cannot return Assemblies loaded for reflection only."
This same error happens when i try to delete the reference as well.
Any help in sorting would be greatly appreciated.
I've had the same issue after updating to VS2013 Update 2.
I've solved the issue by temporarily cutting the whole system.serviceModel section out of web.config, pasting it somewhere else like Notepad. Then, I've saved the web.config without the service model section. Then, I was able to update the service reference successfully. After updating the service reference, I've pasted the service model section back to web.config and it worked successfully.
I was able to work around this similarly to Can by temporarily removing the extensions element of the system.serviceModel section and any associated extension elements. In my case the extensions were Azure Service Bus extensions.
In my experience it has been as simple as to delete the service reference and re-adding it. For example, last time it happened it was on a WebService (not WCF, the old one), and the error started appearing after we changed one of the classes that was being sent as a return from different routines/functions. After adding one more property to the class, it started going crazy and prompting errors everywhere.
Just a simple Delete and re-Add Service Reference did the trick.
Only need to one time remove <system.serviceModel> section from web.config. After Create first service refrence , this section rebuild by Vs.

In CQ5, my responsive emulator devices list is empty

To start, I followed these directions exactly as it's stated: http://dev.day.com/docs/en/cq/5-6/developing/mobile/responsive.html
The problem is, despite all of that, my Devices dropdown on the sidekick in preview mode is empty.
The list works without issue in the Geometrixx Media without issue.
I made sure I set the cq:deviceGroups and the sling:OsgiConfig as required, and also included the simulator.js in the head tags.
Edit: I have found that if I set the resourceType on the root level page to geometrixx-media/components/page, which is their working demo, it works. I have completely removed all jsp and config items from that component page and it still continues to work anyways.
Does anyone know of something that is missing from the documents, and how to fix the issue?
Thanks.
This is what I did to resolve this issue:
I am going to assume your application name is jason-riis
In CRXDE|Lite create a config folder in /apps/jason-riis/
Now create a node of:
TYPE=sling:OsgiConfig
NAME=com.day.cq.wcm.mobile.core.impl.MobileEmulatorProvider-<*alias>
*alias could be anything, I gave my application name. What it does is it will get you a unique PID when you look at it in configuration Manager
If you go to your configuration manager now, you should be able to see two MobileEmulatorProvider config settings.
Add a node property to node you just created:
NAME=mobile.resourceTypes
TYPE=String[] (you have to click multi at the end of the value textbox)
VALUE=jason-riis/components/<*page>
*page is all the components that has sling:resourceSuperType of foundation/components/page and it is a multi array so it should look like this
jason-riis/components/page, jason-riis/components/widepage, jason-riis/components/newspage
I assume you already have the cq:include for simulation in your header. This makes the devices button appear in preview mode.
Last thing is, go to your website root page's jcr:content [/content/jason-riis/jcr:content] and add node property
NAME=cq:deviceGroups
TYPE=String[]
*VALUE=/etc/mobile/groups/touch, /etc/mobile/groups/smart
*If you go to this etc path in CRXDE|Lite; you will see more relevant information in jcr:content node. This will help you in creating your own custom emulator list.
You should be able to see the dropdown now, with options of iPhone and iPad and all. I know AEM docs are frustrating, let me know if there is any confusion.

Dynamically loaded javascript doesn't show in sources panel?

For example, I have an ajax request and it returns <script src='buggy.js'></script>.
Problem is, it doesn't show up in sources or resources panel. That means I can't do all the cool stuffs like adding breakpoint and inspecting the elements as they run.
I could only see the source of the js file under the Network panel.
Is there anyway to make chrome add them to the sources panel?
Or how do you guys go about debugging dynamically added scripts?
Using Canary.
I was having the same problem, and I found a workaround that is better than the deliberate exception. It does still require changing the code as opposed to just setting a breakpoint inside the chrome dev tools.
I tried using the "//# sourceURL=dynamicScript.js" that was suggested as a workaround by the OP, but it still wasn't showing up for me unless it already existed in my tabs from a previous time when it produced an exception.
Coding a "debugger;" line forced it to break at that location. Then once it was in my tabs in the Sources panel, I could set breakpoints like normal and remove the "debugger;" line.
Please refer to https://developer.chrome.com/devtools/docs/javascript-debugging#breakpoints-dynamic-javascript
(Original link is broken-- archived link below)
http://web.archive.org/web/20141016164821/https://developer.chrome.com/devtools/docs/javascript-debugging#breakpoints-dynamic-javascript ("Breakpoints in Dynamic JavaScript").