How can I active a osgi component only on publish instance or specified author instance in CQ? Is there configuration?
thx
How can I active a osgi component only on publish instance or specified author instance in CQ? Is there configuration?
thx
Hi
We are in the setup phase of our new CQ5.4 environment. The replication system basically works both ways, blog comments entered on publish appear back in the author instance as expected.
But the stored data of form input fails to replicate back to the author system. I think the problem is caused on the publish, because no entries appear in the log of agent "Reverse Replication (outbox)". Is there any additional configuration required for form data to replicate?
Hello,
I see these errors like this when vlt committing:
"[WARN ] Newly created node not found by uuid /content/Scripps-from-Demo2/jcr:content: javax.jcr.ItemNotFoundException: f6aa34bf-f403-4e30-bb32-7bb9d8e80c71"
The content in question was exported from a different CQ data store, in order to be imported into a different data store (where all the nodes in my import set would be new to my target data source -- i.e. no conflicts)
Any idea what might be causing this? or how I can get a good vlt import after this error?
Perhaps I am not using this as intended, so i'll describe step-by-step what i'm doing in more detail:
1. in one instance of CQ, where I've done some development work locally, I've done a "vlt co" using filter.xml to check out some nodes i created and edited (or perhaps i used "vlt export")
2. i close that test instance of CQ, and copy those dirs (jcr_root & META-INF) to a different location
3. i startup a DIFFERENT instance of CQ (which has other work i want to merge with what i've exported in #1)
4. i double-check to make sure the copied filter.xml is good, cd to my copied jcr_root and do a "vlt co --force --filter ../META-INF/vault/filter.xml http://localhost:4502/crx/-/jcr:root ."
5. i do a "vlt add *" to what you have under jcr_root
6. in directories like content/ and app/ i update .context.xml to add any new directories i've added e.g. "<Scripps-from-Demo2/>" (i still get error if i skip this step)
7. i do a "vlt commit".
many "adding....." statements pass by
then, after "Transmitting filte data", i get a number of "[WARN ] Newly created node not found by uuid" (the error I mentiona at the start of this msg)
i also get one or two errors like this: "[ERROR] Error during processing of /content/Scripps-from-Demo2/en/products/triangle/jcr:content/par/1_1219674803642/file: javax.jcr.nodetype.ConstraintViolationException: no matching child node definition found for {http://www.jcp.org/jcr/1.0}content"
before finally: "[ERROR] commit: com.day.jcr.vault.vlt.VltException: Error while committing caused by: javax.jcr.PathNotFoundException: jcr:data"
8. Looking in the directory "Scripps-from-Demo2" (in reponse to the error 1st described), this is what my .content.xml looks like this:
"<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://w
ww.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:mix="http://
www.jcp.org/jcr/mix/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
jcr:primaryType="cq:Page">
<en/>
<jcr:content
cq:allowedTemplates="[/apps/scripps-app/templates/.*,/libs/collab/blog/t
emplates/.*]"
cq:designPath="/etc/designs/scripps-apps"
cq:lastModified="{Date}2011-11-17T15:39:17.755-05:00"
cq:lastModifiedBy="admin"
cq:lastReplicated="{Date}2011-12-02T15:38:38.665-05:00"
cq:lastReplicatedBy="admin"
cq:lastReplicationAction="Activate"
cq:lastRolledout="{Date}2011-11-17T15:39:17.946-05:00"
cq:lastRolledoutBy="admin"
cq:siteOwner=""
jcr:isCheckedOut="{Boolean}true"
jcr:mixinTypes="[cq:LiveSync,cq:ReplicationStatus,mix:versionable]"
jcr:primaryType="nt:unstructured"
jcr:title="Scripps-from-Demo2"
jcr:uuid="f6aa34bf-f403-4e30-bb32-7bb9d8e80c71"
sling:resourceType="foundation/components/redirect"
redirectTarget="/content/Scripps-from-Demo2/en">
<cq:LiveSyncConfig
cq:isDeep="{Boolean}true"
cq:master="/content/scripps-app"
jcr:primaryType="cq:LiveSyncConfig"/>
</jcr:content>
<modules/>
<regions/>
<newregion/>
<region2/>
<region3/>
<region4/>
<region5/>
<page-with-region/>
<scottregionpage/>
<recipes/>
<demo-region-page-ken-1/>
</jcr:root>"
Should having specific "uuid"s trouble me when trying to import these nodes? what about jcr:isCheckedOut="{Boolean}true"?
Am I not using vlt as intended? I realize i could have used Package Manger to package my nodes up per directory as *.crx or *.zip files; but, I did it this way, because we need to be able to store our files & changes to our corporate svn or hg repository. Conversely, other developers must be able to take this code an check it out to their own machines. While this has worked for some of my trivial sample tests, exporting this project has been causing these errors. Any ideas?
Best,
Ken
These instructions: http://dev.day.com/docs/en/cq/current/core/administering/ldap_authentication.html#Switchin g On LDAP Authentication does not seem to be updated for 5.5, because the file crx-quickstart\server\etc\ldap_login.conf does not exist(even the server directory does not exist). Could any one help?
Hi,
i have a requirement, in the multifield one of the field also a multifield. how can i implement this.? any help or direction to solve the problem will be helpful.
Thanks in advance.
The components page section on parsys[1] explains that you can set the sidekick's Allowed Components for a parsys by clicking Design Mode (ruler icon) in sidekick, then clicking Edit on the parsys and putting a checkmark on the components you want. We are defining templates for our authoring users and I don't want them to have to go through that effort for every page. I want to define something at the Template level which specifies the Allowed Components so that the user can use WCM New Page and the parsys on the page will already be set up right. How do I do this?
Our template has sling:resourceType=/apps/hello/components/ourpage, and ourpage has a JSP which specifies:
<cq:include path="par" resourceType="hello/components/ourparsys"/>
We just copied ourparsys from the foundation parsys. Inside it has a design_dialog, which I double-clicked in CRXDE Lite and I see the Design View ("Edit Component," "ParSys (Design)"). I put a checkmark on one of the Allowed Components, clicked Save, but the checkmark was not saved. When I closed this view and double-clicked the design_dialog again, the checkmark was gone, and when I went to WCM Websites and made a New Page from our template the sidekick still did not show our desired component.
So please advise, is there any way to set Allowed Components so it will take effect on all New Page webpages made from a given template?
Hi guys,
I am getting following error when installing the package that contains DAM content.
javax.jcr.nodetype.ConstraintViolationException: /content/dam/general/logo.png/jcr:content/renditions/original/jcr:content: mandatory property {http://www.jcp.org/jcr/1.0}data does not exist"
This only happens to few dam content not to all.
Any thoughts?
Thanks in advance.
Hi,
I created a .js file and placed it in /libs/foundation/cq/ui/widgets/source/widgets/form/multicompositefield.js. When i copy the custom file into my project/widgets folder it is not working as expected. Where am i going wrong? Please give me some suggestions. Thanking you in advance.
I tried below commands But Attached Debug option under Debug menu option is still disabled.
Option 1 :
C:\author>java -debug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_sock
et,server=y,suspend=n,address=30303 -jar cq-author-4502.jar
Listening for transport dt_socket at address: 30303
Loading quickstart properties: default
Loading quickstart properties: instance
Low-memory action set to fork
Using 64bit VM settings, min.heap=1024MB, min permgen=256MB, default fork argume
nts=[-Xmx1024m, -XX:MaxPermSize=256m]
The JVM reports a heap size of 1781 MB, meets our expectation of 1024 MB +/- 20
**** WARNING: insufficent PermGen memory ***************************************
The JVM MBean:PS Perm Gen reports 82 MB but we recommend at least 256 MB +/- 20
Use your JVM's PermGen size option (like -XX:MaxPermSize=256M) to set that size.
Will fork a JVM to get enough memory.
********************************************************************************
Available memory below specified limits and low-memory action set to fork, will
fork to get enough memory
Preparing to fork JVM, OS name=Windows 7, isWindows=true
Forking JVM: [C:\Program Files\Java\jre6\bin\java.exe, -Xmx1024m, -XX:MaxPermSiz
e=256m, -jar, C:/author/cq-author-4502.jar, -nofork, -pt, CHILD]
Loading quickstart properties: default
Loading quickstart properties: instance
Low-memory action set to fork
Using 64bit VM settings, min.heap=1024MB, min permgen=256MB, default fork argume
nts=[-Xmx1024m, -XX:MaxPermSize=256m]
**** WARNING: insufficent heap memory ******************************************
The JVM reports 910 MB but we recommend at least 1024 MB +/- 20
Use your JVM's heap size option (like -Xmx1024M) to set that size.
Will fork a JVM to get enough memory.
********************************************************************************
The JVM MBean:PS Perm Gen reports a maximum size of 256 MB, meets our expectatio
n of 256 MB +/- 20
Available memory below specified limits and low-memory action set to fork, will
fork to get enough memory
Not forking JVM as -nofork option is set
Setting properties from filename 'C:/author/cq-author-4502.jar'
Property '-quickstart.server.port' set to '4502' from filename cq-author-4502.ja
r
Property '-r' set to 'author' from filename cq-author-4502.jar
Property '-r' is already set (author), ignoring new value (author) derived from
filename
System property 'sling.run.modes' set to 'author' by -r option
Verbose option not active, closing stdin and redirecting stdout and stderr
Redirecting stdout to C:\author\.\crx-quickstart\logs\stdout.log
Redirecting stderr to C:\author\.\crx-quickstart\logs\stderr.log
Press CTRL-C to shutdown the Quickstart server...
Shutdown
MAIN process: shutdown hook
MAIN process: Exception in shutdown hook: java.io.IOException: The pipe is being
closed
MAIN process: Wrote shutdown string to child process, waiting for it to exit (ma
x 5000 msec)
Child process did not exit? Destroying it now.
MAIN process: Child process exited.
MAIN process: exiting
Forked JVM process exited with exit code 1
Main JVM process exiting
OPtion 2:
C:\author>java -Xmx512m -Xdebug -Xrunjdwp:transport=dt_socket,server=y,address=3
0303,suspend=n -jar cq-author-4502.jar
Listening for transport dt_socket at address: 30303
Loading quickstart properties: default
Loading quickstart properties: instance
Low-memory action set to fork
Using 64bit VM settings, min.heap=1024MB, min permgen=256MB, default fork argume
nts=[-Xmx1024m, -XX:MaxPermSize=256m]
**** WARNING: insufficent heap memory ******************************************
The JVM reports 455 MB but we recommend at least 1024 MB +/- 20
Use your JVM's heap size option (like -Xmx1024M) to set that size.
Will fork a JVM to get enough memory.
********************************************************************************
**** WARNING: insufficent PermGen memory ***************************************
The JVM MBean:PS Perm Gen reports 82 MB but we recommend at least 256 MB +/- 20
Use your JVM's PermGen size option (like -XX:MaxPermSize=256M) to set that size.
Will fork a JVM to get enough memory.
********************************************************************************
Available memory below specified limits and low-memory action set to fork, will
fork to get enough memory
Preparing to fork JVM, OS name=Windows 7, isWindows=true
Forking JVM: [C:\Program Files\Java\jre6\bin\java.exe, -Xmx1024m, -XX:MaxPermSiz
e=256m, -jar, C:/author/cq-author-4502.jar, -nofork, -pt, CHILD]
Loading quickstart properties: default
Loading quickstart properties: instance
Low-memory action set to fork
Using 64bit VM settings, min.heap=1024MB, min permgen=256MB, default fork argume
nts=[-Xmx1024m, -XX:MaxPermSize=256m]
**** WARNING: insufficent heap memory ******************************************
The JVM reports 910 MB but we recommend at least 1024 MB +/- 20
Use your JVM's heap size option (like -Xmx1024M) to set that size.
Will fork a JVM to get enough memory.
********************************************************************************
The JVM MBean:PS Perm Gen reports a maximum size of 256 MB, meets our expectatio
n of 256 MB +/- 20
Available memory below specified limits and low-memory action set to fork, will
fork to get enough memory
Not forking JVM as -nofork option is set
Setting properties from filename 'C:/author/cq-author-4502.jar'
Property '-quickstart.server.port' set to '4502' from filename cq-author-4502.ja
r
Property '-r' set to 'author' from filename cq-author-4502.jar
Property '-r' is already set (author), ignoring new value (author) derived from
filename
System property 'sling.run.modes' set to 'author' by -r option
Verbose option not active, closing stdin and redirecting stdout and stderr
Redirecting stdout to C:\author\.\crx-quickstart\logs\stdout.log
Redirecting stderr to C:\author\.\crx-quickstart\logs\stderr.log
Press CTRL-C to shutdown the Quickstart server...
Hi there,
I was browsing the forums and saw this thread about building a multfield within a multifield:
http://forums.adobe.com/message/4453594#4453594
It suggested several other alternatives instead of the nested multifield approach, but I just wanted to confirm whether or not CQ5 supports nested multifields or doesn't. I have a top navigation that has topics and then sub-topics that are displayed when the user rolls over an individual topic. Therefore, what I am trying to create is a custom xtype that has a pathfield dialog and a multifield of pathfield dialogs (because each topic could be associated with a variable number of sub-topics). I then need a multifield of this xtype because there could be multiple topics associated with a given section of the top navigation.
I'm happy to provide more detail if this description is confusing. Thanks!
I am using the redirect option in page properties to redirect pages but the page just displays
"This page redirects to <Page Name>" in publisher mode.
Why is it not working?
I am not talking about this:
http://helpx.adobe.com/cq/kb/HowToUseReverseReplication.html
and not this:
http://mkalugin-cq.blogspot.com/2012/02/reverse-replication-woes-solved.html
They work for polls and comments, but they don't seem to be working for forms. As far as I understand, the default servlet for forms creates a "sling:Folder" as a data container, under which all form values are set into properties. However, polls and comments are created as an entity(or node) under a container. A working example for comment is under "/content/usergenerated/content/geometrixx/en/blog/2009/02/shapecon_2009_inveg". All essential properties such as "cq:distribute", "cq:lastModified" are set correctly under this node. I tried to copy the idea of this example, but it never works for me.
Here's how I did.
1. I need to make a node as a "cq:Page", since reverse replication only works for this primary type. Let's name it "Page-1"
2. Create a "jcr:content" node under this node, make it as "cq:PageContent". I also set resourceType and template in "jcr:content". I need to make "Page-1" as a content page.
3. Create a data container under "cq:Page" node, make it "nt:unstructured". Let's name it "form_container". All form values are set into properties in this node. set "cq:lastModified", "cq:lastModifiedBy" and "cq:distribute" under this node.
4. Create a "jcr:content" node under "form_container", make it "nt:structured", set "cq:lastModified", "cq:lastModifiedBy" and "cq:distribute" under this node.
Obviously CQ doesn't know what I did and refuses to reverse replicate. Any help will greatly appreciate.
A finished upload will look like this:
/content
/usergenerated
/newsevent [cq:Page]
/1351359963325_1 [cq:Page]
|
+ form_content [cq:PageContent, cq:distribute==>true, and all form values stored as properties]
|
-- jrc:content [cq:distribute==> true, cq:lastModified==>Date Instance, cq:lastModifiedBy==>admin]
Kevin
Hi all,
I'm using CQ5 to develop some things. and now i am not so clearly how to post a 'FORM' and accept with a SERVLET.
I've seen this 'http://forums.adobe.com/message/4932739#4932739' already, and try it. But once i add a new <input /> like :<input name="age" value="age" />.
and i submit this form, then tell me error: javax.jcr.nodetype.ConstraintViolationException: no matching property definition found for {}age
see the code
jsp:
<!-- String action = /content/myproject/en/thanks -->
<form id="submitForm" method="post" action="<%= action %>.POST.html" onsubmit="return validate();">
<input type="hidden" name=":redirect" value="<%=resourceResolver.map(action)%>" />
<input type="hidden" name=":formpath" value="<%=currentNode.getPath()%>" />
<input type="hidden" name=":formtype" value="<%=component.getResourceType()%>" />
<input type="hidden" name="_charset_" value="utf-8" />
<input name="age" value="26" /> <!-- if i comment this line, it can submit success, otherwise show me Status: 500. -->
<input type="submit" value="Submit"/>
</form>
servlet:
@Component(immediate = true, metatype = false, label = "QuestionnaireServlet")
@Service
@Properties(value = {
@org.apache.felix.scr.annotations.Property(name = "sling.servlet.methods", value = { "POST" }),
@org.apache.felix.scr.annotations.Property(name = "sling.servlet.resourceTypes", value = { "sling/servlet/default" }),
@org.apache.felix.scr.annotations.Property(name = "sling.servlet.selectors", value = { "POST" }),
@org.apache.felix.scr.annotations.Property(name = "sling.servlet.extensions", value = { "html" })
})
public class QuestionnaireServlet extends SlingAllMethodsServlet implements
OptingServlet {
protected void doPost(SlingHttpServletRequest request,
SlingHttpServletResponse response) throws ServletException,
IOException {
//it seems never call this function.
}
}
can anybody told me in details ?
I was having a problem with XPATH libraries not loading correctly in CQ.
I built an OSGI servlet to access an external database using MyBatis 3.2.2.
If I access the servlet directly from its component path,
@SlingServlet(paths="/bin/TestServlet", methods = "GET",extensions = {"html", "do"} )
i.e., "/bin/TestServlet" then it runs fine without any errors.
However if I export functions from the servlet and run then from a component (.JSP),
com.test.Myservice myService = sling.getService(com.test.Myservice.class);
myService.Foo();
It will trigger an path exception:
Caused by: java.lang.RuntimeException: XPathFactory#newInstance() failed to create an XPathFactory for the default object model: http://java.sun.com/jaxp/xpath/dom with the XPathFactoryConfigurationException: javax.xml.xpath.XPathFactoryConfigurationException: No XPathFactory implementation found for the object model: http://java.sun.com/jaxp/xpath/dom
I have found a solution to this problem by editing the sling.properties config and adding:
sling.system.packages.simple=com.sun.org.apache.xpath.internal.jaxp
Which fixes the problem.
My question is why does this problem not happen when directly accessing the servlet via:
/bin/TestServlet
I don't really understand what is going on here. Is there a difference between running by JSP or directly?
Hello,
Marketing team wants to make use of image renditions feature of DAM, but they want the ability to choose from various rendered images and then drag & drop on to a CQ page from content finder. But I found out that renditions are not available in content finder. I am aware of one solution, which is to customize the image component to have a selection of existing renditions of an asset, so that marketing will have the ability to choose from the existing renditions. But I am wondering what is the use of renditions feature, if they can't be accessible directly by users to drag and drop them on to the page or to access them from creative suite of products.
I will appreicate if some one can help me with this.
CQ5 as Windows Service with LDAP Authentication
1 Introduction
2 Steps
1. Install LDAP server,
1) Double click the file(Download from apache website first)
ApacheDirectoryStudio-win32-x86_<architecture>-<version>
2) After start the system, Create a new server (CQ5LDAP)
New-New Server
3) Add group and users and save them
Name: Adobe
Suffix: ou=groups, dc=adobe, dc=com)
Name: Adobe2
Suffix: ou=users, dc=adobe, dc=com)
4) Start the server
5) Create a new connection (CQ5LDAP)
Connection name: CQ5LDAP
Hostname: localhost
Port: 10389
6) Fill in the Authentication information
Bind DNor user: uid=admin, ou=system
Bind password: secret
7) Right click the connection name, Import users with LDIF Import
2. Configure repository.xml
<SecurityManagerclass="com.day.crx.core.CRXSecurityManager">
<WorkspaceAccessManager class="org.apache.jackrabbit.core.
security.simple.SimpleWorkspaceAccessManager"/>
<UserManagerclass="com.day.crx.core.CRXUserManagerImpl">
<paramname="usersPath"value="/home/users"/>
<paramname="groupsPath"value="/home/groups"/>
<paramname="defaultDepth"value="1"/>
</UserManager>
</SecurityManager>
3. Change start.bat and Quickstart.bat
From the command line, start Quickstart with the option:
-Djava.security.auth.login.config=crx-quickstart/conf/ldap_login.conf
For example:
32-bit VM:
java -Djava.security.auth.login.config=crx-quickstart/conf/ldap_login.conf -Xmx384M -jar crx-quickstart-<version>.jar
64-bit VM:
java -Djava.security.auth.login.config=crx-quickstart/conf/ldap_login.conf -XX:MaxPermSize=128m -Xmx512M -jar crx-quickstart-<version>.jar
4. Starting CQ5 as Windows Service
We install CQ5 as a windows service with instsrv.bat located in C:\author\crx-quickstart\opt\helpers.Hence, if we want to use CQ5 service with LDAP. We need to change instsrv.bat and then run instsrv.bat to install CQ5 as a Windows Service.
Replace line 40: set jvm_options=-XX:MaxPermSize=256M
With: set jvm_options=-Djava.security.auth.login.config=C:/author2013/crx-quickstart/conf/ldap_logi n.conf";"-XX:MaxPermSize=256M
5. Start the CQ5 service with CMD or Service of Task Manager
c:>sc start CQ5 (or any service name you installed, say cq5author)
6. Now you can login by LDAP users
I just started with CQ5/CRX/JCR, so I beg your pardon if asking silly questions.
I'm running a CQ5 Standalone Server (CQ_5_5_Quickstart.jar) on my Windows 7 and am fine with accessing it with my browser and the URL "http://localhost:4502".
Now I try to access it via a Java-client using the JcrUtils.getRepository-method, as described in http://dev.day.com/docs/en/crx/current/developing/accessing_the_crx.html.
But this fails with message:
javax.jcr.RepositoryException: Unable to access a repository with the following settings:
org.apache.jackrabbit.repository.uri: http://localhost:4502/crx/server
The following RepositoryFactory classes were consulted:
org.apache.jackrabbit.commons.JndiRepositoryFactory: declined
Perhaps the repository you are trying to access is not available at the moment.
at org.apache.jackrabbit.commons.JcrUtils.getRepository(JcrUtils.java:199)
at org.apache.jackrabbit.commons.JcrUtils.getRepository(JcrUtils.java:239)
at AccessJCR.connectJcrUtils2(AccessJCR.java:32)
at AccessJCR.main(AccessJCR.java:16)
I'm not sure about the used URL; I just took it from cited webpage. There is said: "The default server's endpoint URL is http://host:port/crx/server. Make sure you adapt the client-side connection URL in case of customized server installation.".
I didn't customize anything so this should be ok. I will attach the complete Code, hopefully you can give some hints.
Regards,
Ulrich
[code]
import java.util.*;
import javax.jcr.*;
public class AccessJCR {
public AccessJCR() {}
public static void main(String[] args) {
AccessJCR ajcr = new AccessJCR();
try {
ajcr.connect();
}
catch (Exception ce) {
ce.printStackTrace();
}
}
private void connect() throws Exception {
//Create a connection to the Day CQ repository running on local host
Repository repository = org.apache.jackrabbit.commons.JcrUtils.getRepository("http://localhost:4502/crx/server");
}
}
[/code]
Does anyone have any insight on where to get training on CQ5? it would be helpfull if i can het the information if any third party provides training /certification in cq5.
If anybody
Hi,
I am new to Adobe technologies & products. I need to explore Adobe CQ5 in detail as a developer.
I am following below link for getting started:
http://dev.day.com/docs/en/cq/current/getting_started/download_and_startworking.html
The link is forwarding me to Adobe Licensing Web Site and which asking for user name and password.
My concern is that:
- Where and How can I download CQ5?
- Is CQ5 is available as developer edition?
- Is CQ5 is available free for developers or for non commerical use?
Please guide me.
Thanks,
Tejas
We need CQ5 Developers and Admin training for a few of our team members in Ahmedabad and/or Bangalore.
Can you suggest who would be the best person to contact.