javax.jcr.version.VersionException: Cannot set property. Node is checked in - aem

I am trying to upload an image in DAM and workflow (OOTB) gets stuck. following is the error I am getting.
12.07.2018 09:58:27.712 *ERROR* [JobHandler: /etc/workflow/instances/server1/2018-07-11_2/update_asset_923:/content/../../../../../../icon-1.png/jcr:content/renditions/original] com.day.cq.dam.core.impl.AssetImpl addRendition: cannot add new rendition [cq5dam.thumbnail.48.48.png] for asset [/content/dam/____________________________]:
com.adobe.granite.asset.api.AssetException: javax.jcr.version.VersionException: Cannot set property. Node is checked in.
at com.adobe.granite.asset.core.impl.DefaultRenditionHandler.setRendition(DefaultRenditionHandler.java:79)
at com.adobe.granite.asset.core.impl.AssetImpl.setRendition(AssetImpl.java:131)
at com.day.cq.dam.core.impl.AssetImpl.addRendition(AssetImpl.java:490)
at com.day.cq.dam.core.impl.AssetImpl.addRendition(AssetImpl.java:484)
at com.day.cq.dam.core.impl.RenditionMakerImpl$PlanBasedTemplate.apply(RenditionMakerImpl.java:129)
at com.day.cq.dam.core.impl.RenditionMakerImpl.generateRenditions(RenditionMakerImpl.java:184)
at com.day.cq.dam.core.process.CreateThumbnailProcess.execute(CreateThumbnailProcess.java:121)
at com.day.cq.workflow.compatibility.CQWorkflowProcessRunner.execute(CQWorkflowProcessRunner.java:93)
at com.adobe.granite.workflow.core.job.HandlerBase.executeProcess(HandlerBase.java:215)
at com.adobe.granite.workflow.core.job.JobHandler.process(JobHandler.java:143)
at org.apache.sling.event.impl.jobs.queues.JobQueueImpl.startJob(JobQueueImpl.java:395)
at org.apache.sling.event.impl.jobs.queues.JobQueueImpl.access$100(JobQueueImpl.java:66)
at org.apache.sling.event.impl.jobs.queues.JobQueueImpl$1.run(JobQueueImpl.java:238)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1152)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:622)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.jcr.version.VersionException: Cannot set property. Node is checked in.
at org.apache.jackrabbit.oak.jcr.session.NodeImpl$35.checkPreconditions(NodeImpl.java:1330)
at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.prePerform(SessionDelegate.java:606)
After image upload I can see the property set on the asset node is
What can be the possible cause of this.

This is a known product bug affecting AEM 6.0, 6.1 and 6.2.
From official documentation
This is a known product bug CQ-4215298. When a user creates a version
or publishes ("activates") a page that is locked by another user, then
it causes the page to go into an inconsistent state.
Resolution
This issue is fixed in AEM6.3 and AEM6.2 SP1 Cumulative Fix Pack 8.
With or without the fix pack applied, you would have to fix the broken
pages. To fix the pages, follow the steps below:
Go to /crx/explorer/index.jsp and log in as admin user. Open Content
Explorer. Browse to the jcr: content subnode of the broken page. For
example: /content/geometrixx/en/services/jcr:content Go to Versions =>
CheckOut. Go to /sites.html UI and browse to the page and open it for
editing. Unlock the page by clicking the lock icon on the top left.

Related

Laravel Backpack devtools add-on not working?

I'm having an issue with devtools.
I just did a clean install of Laravel followed by new backpack install. During the install when I was prompted to install paid add-ons, I went to the backpack site and purchased "backpack pro" and "devtools". Went back to installer and installed both add-ons. Everything worked as expected with no errors.
Then went to http://project.test/admin. Registered an admin account. Logged in. Then went to http://project.test/admin/devtools. App/Models/User is shown on the models screen so I clicked the generate CRUD button. It seemed like it was doing something, but I didn't see anything change.
Now on the Models screen, the "Generate button" under actions is disabled and the disabled class is present on the button in the inspector. The CRUDs link in the top navbar links to nothing (a href="#").
So now I click the "Generate All CRUDs button". It pops up the green notification which displays "CRUD generated for: " nothing, it doesn't show a CRUD name.
When I click the "See files" button on the model, it shows a list of all the files it created except the Route link and the Menu link are disabled.
I'm not sure if missing something - what do I do now?
NEW INFO
I finally found an error. Creating a new model with migration works. However, when trying to generate a CRUD for any model, I get this error:
str_repeat(): Argument #2 ($times) must be greater than or equal to 0
It's happening in the middleware:
App\Http\Middleware\CheckIfAdmin
in the handle function on line 66. Line 66 is: return $next($request);
I've just create a new Laravel app and followed the steps to add the PRO and Devtools repo.
I did the same as you did, opened the "Models" and saw only User. I made sure I deleted the user migration before as you said that Models without migration wouldn't work.
I clicked Generate CRUD, and got the green notifications.
This is what I get when I click on See Files
https://prnt.sc/t7kbQme68yVM
Route and Menu are disabled because it's a feature we are still working on, nothing that impacts the application.
If your issue persist please open a issue report on https://github.com/Laravel-Backpack/devtools-issues
UPDATE: We found a situation where that str_repeat could trigger, we are working on it and will patch it ASAP. I will let you know here when we do it
UPDATE 2: It was fixed. Thanks for the report!
Cheers

Page is not loading properly with editor.html in the url AEM6.1

My page is not loading properly with the url having "editor.html" (http://localhost:4502/editor.html/content/mypage.html). But when I remove editor.html, it loads perfectly (http://localhost:4502/content/mypage.html).
I am using AEM6.1. If I open the page in classic UI, its looks good. But when I open it in touch UI, its not loading properly.
I already have a property "sling:resourceSuperType = wcm/foundation/components/page"
Some of the content is coming on the page.
It can be a JS issue, but even if I remove all the js files from my component, the issue is still there.
Anyone experienced the same issue?
This issue might be due to the 'Apache Sling Main Servlet' default configuration.
And also we can observe the error message 'components could not be loaded' or 'out of memory' in browser console when we are in Touch UI editor Mode.
By default 'Apache Sling Main Servlet' is configured with 1000 calls per request. If we increase this limit then the issue will be resolved.
For updating this follow the steps.
1. Go to the http://<host>:<port-number>/system/console/configMgr (ex: http://localhost:4502/system/console/configMgr)
2. Ctrl + F and Search for "Apache Sling Main Servlet".
3. Change the value of 'Number of Calls per Request' from 1000 (defaulut value) to 1500 or 2000.
4. Click on Save.
5. Now you can go to Touch UI edit mode and can be able to edit the components.
Check in your CRXDE under the folder /libs/wcm/core/content and look for a folder called "editor.html" with the sibling of just "editor". If you delete the editor.html folder and keep "editor", then your page will start working again.

Unable to delete content resources on JasperReports Server

I'm using JasperReports Server 5.6 and I have some reports deployed there.
The problem starts when I generate a PDF output for my reports. I can see the output file in the repository, but I'm unable to delete it.
I'm able to delete other types of resources, as an image or report, for example. But when I need to delete a generated PDF, the upper options bar doesn't offer me any options (including deleting). If I try to right-click the PDF, it doesn't open any pop-up menus (as it does for images, for example).
The image below shows what happens to the options bar:
Here goes some interesting things I've noticed:
The type column in the repo tells me the PDF is a "Content Resource". If I manually upload another PDF from my local machine to the repo as a "Content Resource", the UI also doesn't let me delete the resource.
I'm logged in as the administrator user. It's set with ROLE_USER and ROLE_ADMINISTRATOR roles (it's the default jasperadmin user).
The directory which contains the PDF is set with permissions Read+Write+Delete for the ROLE_USER.
Tried to log in as another user with ROLE_USER and I got the same result.
The JasperReports Server's tomcat is running as root (it's a test environment).
I went through the JasperReports Server's User's Guide and Administrator's Guide. Both said that I need to have the right permissions (and I do), and also I need to have no references to the resources to be deleted. In the case above, where I have an uploaded PDF as a "Content Resource", I don't have any references to it inside the repo, and I still can't delete it!
If I delete the super directory that contains the PDF, it works fine.
So, do you guys have any ideas of what I can try to get rid of these PDF outputs?
So far the best solution, I didn't find any better, for this is to use the delete button on the keyboard
I really don't know why is the menu button disabled but nevermind.
I am facing the same problem. There is a work around for this: Use Jaspersoft Studio.
Add a JasperReports Server Connection, expand the node and locate the file you wanted, then right-click and select Delete.
This is not an elegance solution but works for the moment.
EDIT - found the problem and have a fix.
The JS is missing "Utils" scope in getInitConfiguration. The original source is:
var Utils = {
restOfString: function(str, fromStr) {
var from = str.lastIndexOf(fromStr) + fromStr.length;
return str.substring(from, str.length).trim();
},
getInitOptions: function () {
return localContext.rsInitOptions || __jrsConfigs__.repositorySearch["localContext"].rsInitOptions;
},
getInitConfiguration: function () {
return getInitOptions().configuration;
}
};
Just change "return getInitOptions().configuration;" to get "return Utils.getInitOptions().configuration;"
You'll have to make this change in the optimized version of the script (optimized-scripts/results.page.js). Fortunately there are only two occurrences of getInitOptions so it's easy to find and fix the correct one.
The root cause is a javascript error:
uncaught ReferenceError: getInitOptions is not defined
This is coming from results.page.js, but I haven't found a fix for it yet. This code is attempting to change the state of the toolbar buttons. I tried using the latest 6.x version of the script, and that did not fix the problem either.
Also listed at http://community.jaspersoft.com/questions/843951/unable-delete-report-output-jasperserver-56
When you are going to delete the content resource Delete button show disable. I am also experiencing the same problem so for time being I am deleting my content resources by using following query on Jasperserver schema.
Delete from jicontentresource where id in
(
Select id from jiresource
where resourcetype='com.jaspersoft.jasperserver.api.metadata.common.domain.ContentResource'
and to_char(update_date,'YYYY-MM-DD') = '2014-11-25');
Delete from jiresource where resourcetype='com.jaspersoft.jasperserver.api.metadata.common.domain.ContentResource'
and to_char(update_date,'YYYY-MM-DD') = '2014-11-25';
You have only to mark all files and then push the Delete-Button

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.

QTP - See through invisible window (JBoss error mask upon returning to page from a popup)

Steps:
QTP identifies a few links on a web App.
I click on this link (using qtp).
Application opens a popup to change a few values.
I submit the Image button after changing the values.
I return back to the original page, which is open in the background (never closed).
But QTP now does not recognize those few links (as said in point 1), instead it only shows a hierarchy upto Page as shown below:
Browser("name:=JBoss Web/2.1.7 - Error report").Page("title:=JBoss Web/2.1.7 - Error report")
I have to use a Browser("name:=JBoss Web/2.1.7 - Error report").refresh code to get the properties visible again everytime I get back from the popup.
Notes - This occurs on a few machines (different behavior on different machines). Very few systems do not show the JBoss error when accessing through QTP. OS, QTP and browser versions are same with default settings.
Upon changing registry value as shown below, I was able to access all of the web elements most of the times. However, at times, I get the JBOSS error (browser,page) mask again which seems to be impenetrable.
[HKEY_CURRENT_USER\Software\Mercury Interactive\QuickTest Professional\MicTest\Packages\StdPackage\Settings]
"SkipWndMovedOut"=dword:00000001
Any suggestions on what needs to be done to access all the elements every time - by surpassing the JBOSS error mask page every time?
Thanks,
Anuroop.
What version of QTP are you using?
This sounds like a known bug which was fixed for QTP10 by hotfix QTPWEB_00065 (there are hotfixes for other versions too).
I suggest you contact HP support in order to get the relevant hotfix.
As a workaround in the meantime you can use Browser's undocumented RefreshWebSupport method which reconnects QTP to the page without refreshing the page.