Quantcast
Channel: Adobe Community : Popular Discussions - CQ5 (read only)
Viewing all 12476 articles
Browse latest View live

Vaultclipse plugin

$
0
0

Has anyone got vaultclipse plugin working for Eclipse in windows machine.  I have it working just fine in Mac.

In windows, same configuration gives me filenotfound error when "import".  It looks like it exports in different folder and tries to import from different folder.

 

Any thoughts?


Connect to JCR from Java via JcrUtils without WebDAV

$
0
0

Hi,

 

I'm trying to connect to the JCR from a Java application, but the CQ5 instance has Apache Sling Simple WebDAV Access to repositories and Apache Sling DavEx Access to repositories turned off in the OSGi console.  If these are turned on, I can successfully use the following code:

 

repository = JcrUtils.getRepository( "http://123.123.123.123:4502/crx/server" );

session = repository.login( new SimpleCredentials( "admn", "admin".toCharArray( ) ) );

 

All is lovely, and I get a valid session returned.  But in production, when WebDAV is turned off, I get the following warnings when trying jcrUtils.getRepository:

 

[main] INFO org.apache.commons.httpclient.auth.AuthChallengeProcessor - basic authentication scheme selected

[main] INFO org.apache.commons.httpclient.HttpMethodDirector - No credentials available for BASIC 'Sling (Development)'@123.123.123.123:4502

[main] WARN org.apache.jackrabbit.spi2dav.RepositoryServiceImpl - Authentication required to access repository descriptors

 

and then this exception when trying to get the session:

 

javax.jcr.nodetype.ConstraintViolationException: Method Not Allowed

          at org.apache.jackrabbit.spi2dav.ExceptionConverter.generate(ExceptionConverter.java:105)

          at org.apache.jackrabbit.spi2dav.ExceptionConverter.generate(ExceptionConverter.java:51)

          at org.apache.jackrabbit.spi2dav.ExceptionConverter.generate(ExceptionConverter.java:45)

          at org.apache.jackrabbit.spi2dav.RepositoryServiceImpl.obtain(RepositoryServiceImpl.java:782 )

          at org.apache.jackrabbit.spi2dav.RepositoryServiceImpl.obtain(RepositoryServiceImpl.java:726 )

          at org.apache.jackrabbit.spi2davex.RepositoryServiceImpl.obtain(RepositoryServiceImpl.java:3 01)

          at org.apache.jackrabbit.jcr2spi.RepositoryImpl.login(RepositoryImpl.java:151)

          at org.apache.jackrabbit.commons.AbstractRepository.login(AbstractRepository.java:123)

          at au.com.btes.cq.CQServer.connectToRepository(CQServer.java:746)

          at au.com.btes.cq.CQServer.updateOSGiConfiguration(CQServer.java:543)

          at au.com.btes.cq.CQServer.updateOSGiConfigurations(CQServer.java:521)

          at au.com.btes.cq.deployer.CQDeployer.configureOSGi(CQDeployer.java:494)

          at au.com.btes.cq.deployer.CQDeployer.startDeployment(CQDeployer.java:186)

          at au.com.btes.cq.deployer.Main.main(Main.java:13)

Caused by: org.apache.jackrabbit.webdav.DavException: Method Not Allowed

          at org.apache.jackrabbit.webdav.client.methods.DavMethodBase.getResponseException(DavMethodB ase.java:165)

          at org.apache.jackrabbit.webdav.client.methods.DavMethodBase.getResponseBodyAsMultiStatus(Da vMethodBase.java:91)

          at org.apache.jackrabbit.spi2dav.RepositoryServiceImpl.obtain(RepositoryServiceImpl.java:754 )

          ... 10 more

 

 

WebDEV is not enabled, so fair enough.  So based on the documentation at http://dev.day.com/docs/en/crx/current/developing/accessing_the_crx.html, I then tried an RMI connection with the following:

 

repository = JcrUtils.getRepository( "rmi://123.123.123.123:4502/crx" );

session = repository.login( new SimpleCredentials( "admn", "admin".toCharArray( ) ) );

 

When it hits the line getting the repo, it waits for about 30 seconds, then returns with:

 

javax.jcr.RepositoryException: Unable to access a repository with the following settings:

    org.apache.jackrabbit.repository.uri: rmi://123.123.123.123:4502/crx

The following RepositoryFactory classes were consulted:

    org.apache.jackrabbit.commons.JndiRepositoryFactory: declined

    org.apache.jackrabbit.jcr2dav.Jcr2davRepositoryFactory: declined

    org.apache.jackrabbit.jcr2spi.Jcr2spiRepositoryFactory: declined

    org.apache.jackrabbit.rmi.repository.RmiRepositoryFactory: failed

        because of RepositoryException: Failed to look up the RMI resource //123.123.123.123:4502/crx

        because of ConnectIOException: error during JRMP connection establishment; nested exception is:

          java.io.EOFException

        because of EOFException: null

Perhaps the repository you are trying to access is not available at the moment.

 

It does not even try and get the session, as it failed on the retreiving of the repository.

 

Is there some setting on CQ5/CRX that needs to be applied to enable RMI connections?  If so, what are the security (or other) ramifications of turning it on?  If there's no setting, then can anyone see where I'm going wrong here?

 

Thanks for the help,

K

Need learning material or links for CQ5

$
0
0

Hi All,

 

I am planning to learn Adobe CQ5. Can anyone give me more information on Adobe CQ5?

 

Also share me the links to download the tool, learning material etc if any one has?

 

Thank you

Adding custom buttons to the Rich Text Editor in CQ

$
0
0

Hi,

 

I have added custom buttons to the rich text editor in order to allow our editors to add specific content, such as popovers, custom videos and other data necessary data.

 

I have successfully modifed the Rich Text editor so, that it includes the custom buttons in the actions panel.

 

I have also managed to make the buttons work and include the data where necessary, when user highlights the text and clicks on a certain button.

 

The last bit I am struggling with, is the visual feedback we give to the users when this text has associated action with it.

 

E.g. when we select this text and make it bold when we click on the word B the button B becomes highlighted in the actions panel, later when we continue typing our text and click again on "bold" the letter B becomes highlighted again.

 

Is there any button related callback/method I could overwrite to add this functionality and make my button highlighted ?

 

Thanks,

Puzanovs

How to avoid extra div tags, when we add components using

$
0
0

I tried using the below code in my component jsp from forums to remove those extra div tags when we try to add components using <cq:include tags.

 

<%

 

   if (WCMMode.fromRequest(request) != WCMMode.EDIT && WCMMode.fromRequest(request) != WCMMode.DESIGN) {

       IncludeOptions.getOptions(request, true).forceSameContext(Boolean.TRUE);

 

 

    }

 

%>

 

 

But this code helped to remove most of the extra div tags , but still adds this extra div tag to the first component I add using  <cq:include tag.

 

its a basic and very critical necessity to maintain our markup design,But due to this  dynamically added extra div tag will hinder the html and css behaviour of the page.

Appreciate your help to resolve this issue.

 

Thanks

Issue while installing SP2 on CQ5.5

$
0
0

Hi,

 

I have been trying to upgrade CQ5 5.5 to Service Pack 2.

Out of 10, the upgrade gets successful 7 times but it fails for the rest of the times.

 

Script that I am using:

 

#cq5-update-pkg-5.5.10.zip and cq5-service-pack-2.zip

        curl -u ${crx_site_user}:${crx_site_password} -F package=@$PACKAGE_DIR/cq5-update-pkg-5.5.10.zip http://${privateIP}:${cq5_author_listen_port}/crx/packmgr/service/.json/?cmd=upload

 

 

        curl -u ${crx_site_user}:${crx_site_password} -F package=@$PACKAGE_DIR/cq5-service-pack-2.zip http://${privateIP}:${cq5_author_listen_port}/crx/packmgr/service/.json/?cmd=upload

 

 

        curl -u ${crx_site_user}:${crx_site_password} -X POST http://${privateIP}:${cq5_author_listen_port}/crx/packmgr/service/.json/etc/packages/day/cq550/upd ate/cq-update-pkg-5.5.10.zip?cmd=install

 

 

        curl -u ${crx_site_user}:${crx_site_password} -X POST http://${privateIP}:${cq5_author_listen_port}/crx/packmgr/service/.json/etc/packages/day/cq550/upd ate/cq-service-pack-5.5.2.20121012.zip?cmd=install

 

 

CQ5 Update Package gets installed but it gets failed while installation of cq5-service-pack-2.zip

 

<html><head><title>

500

Internal Server Error

</title></head><body><h1>

Internal Server Error

 

Internal Server Error

</title></head><body><h1>

Internal Server Error

</h1>

</body></html>

 

This error corrupts my cq5 Author Package. Same behavior is observed for Publisher Package. Though, this issue is intermittent, but the after-effects leads to fresh installation of CQ5.

 

Any help would be appreciated.

How to get the user details using sling API classes/methods?

$
0
0

Hi,

Since I'm new to cq-5, I have this very basic question. I'm writing my own custom form action to store data entered by the user in the repository. For doing this, I'm writing my own custom jsp page to define all the actions when the submit button is clicked. Now in this jsp page I need to get the details of the user who has logged-in in the current session.

 

So can someone please tell me which classes and methods do I need to use to get these user details?

 

Please help. Thanks.

Maven plugin for managing CQ5 packages

$
0
0

Hi,

 

Here's some new documentation that explains how to use the Content Package Maven plugin. You can package and install content from your maven build...for example, in your POM, add goals for package creation and installation to automatically deploy the OSGi bundle that was built. You can perform other package management tasks on remote servers, like rebuild packages,  and list, uninstall, and remove them.

 

http://dev.day.com/docs/en/cq/current/core/how_to/how_to_use_the_vlttool/vlt-mavenplugin.h tml

 

scott


Change Default Authenticator in CQ5

$
0
0

Hi

We have a multiple sites on different locales (de, fr, br etc) with different login pages for each country. With the default OOB Login Selector Authenticator provided as part of Geometrixx,

 

I could see the OSGI setting referenced here:

/libs/cq/security/config.publish/com.day.cq.impl.LoginSelectorHandler

 

We have written our own custom login authenticator, and have multiple sites hosted on one CQ instance and want to have different login pages for each, then how to configure them ?

 

I tried finding out in geometrixx but not able to find the code piece (java files) which is redirecting the user login page.

Any pointers on where can I find the corresponding bundle/java authenticator files in CQ5 ?

Thanks! 

CQ5.5 Session Timeout

$
0
0

Hello,

 

We would like to change the session timeout value for the Author server so that if an Author doesn't do anything for 30 minutes the CQ session expires.  Seems the default is several hours.

REGARDING EXTRACTING OF PROPERTIES

$
0
0

Hi,

I am fairly new to ADOBE DAY CQ.. I want to extract properties of a particular node...

 

I am using the following code....

 

Node aName= session.getNode(absPath);

String propertyName= aName.getPRoperty("Name").getValue().getString();

 

I am aware that there is an abstract class named ABSTRACTSESSION which extends the OBJECT class and implements SESSION interface...

 

and getNode is a method defined in the class ABSTRACTSESSION...

 

What i want to know is "is there any class which extends the ABSTRACTSESSION??? Where can i find material to read about the session management in cq?

 

 

Regards and Thanks in advance,

 

Heidi.

jcr:content not getting replaced by _jcr_content

$
0
0

Hi,

 

we have a problem with some image paths rendered in the markup which points to a specific image rendition, i.e the "jcr:content" node is a part of the path. For some of the image paths, "jcr:content" is not getting replaced by "_jcr_content" causing the dispatcher to reply with 403 responses for theses images since ':' is a reserved character. We also see different behaviour in different environments (test vs prod).

 

Anybody who has an idea why this happens for some images?

 

Thanks,

Joakim

Send Email - ${payload.email}

$
0
0

Hi all,

In my workflow i am using "Send Email " step to send emails using custom
templates.

I done following steps in my execution

1 .  Added properties to email , userId, password and fullname with values
to "/content/geometrixx/en/jcr:content"

https://lh6.googleusercontent.com/-kXybosRoO_0/UJpL22Xw-QI/AAAAAAAAAVg/aH8QcNEo32E/s1600/Payload.png

2 .  Created "test workflow"  with "Send Email " workflow step and selected
the template "/etc/workflow/geometrixx/email/welcome.txt"
3.    Started "test workflow" for /content/geometrixx/en .

EMail is not working

error.log

07.11.2012 17:14:42.533 *INFO* [127.0.0.1 [1352288682531] POST
/bin/workflow/inbox HTTP/1.1] com.day.cq.workflow.impl.CQWorkflowSession
Attempting to complete work item with ID:
/etc/workflow/instances/2012-11-07/model_7535626098811/workItems/node1_etc_ workflow_instances_2012-11-07_model_7535626098811
07.11.2012 17:14:42.607 *INFO* [JobHandler:
/etc/workflow/instances/2012-11-07/model_7535626098811:/content/geometrixx/ en]
com.day.cq.workflow.impl.job.JobHandler Start processing:
/etc/workflow/instances/2012-11-07/model_7535626098811:/content/geometrixx/ en
07.11.2012 17:14:42.608 *WARN* [JobHandler:
/etc/workflow/instances/2012-11-07/model_7535626098811:/content/geometrixx/ en]
com.day.cq.collab.commons.SendEmailProcess cannot send email:
org.apache.commons.mail.EmailException: Missing final '@domain'
at org.apache.commons.mail.Email.createInternetAddress(Email.java:605)
at org.apache.commons.mail.Email.addTo(Email.java:727)
at org.apache.commons.mail.Email.addTo(Email.java:710)
at
com.day.cq.collab.commons.SendEmailProcess.createEmail(SendEmailProcess.jav a:190)
at
com.day.cq.collab.commons.SendEmailProcess.execute(SendEmailProcess.java:11 6)
at
com.day.cq.workflow.impl.job.HandlerBase.executeProcess(HandlerBase.java:18 4)
at com.day.cq.workflow.impl.job.JobHandler.process(JobHandler.java:112)
at org.apache.sling.event.jobs.JobUtil$1.run(JobUtil.java:272)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: javax.mail.internet.AddressException: Missing final '@domain' in
string ``${payload.email}''
at
javax.mail.internet.InternetAddress.checkAddress(InternetAddress.java:915)
at javax.mail.internet.InternetAddress.validate(InternetAddress.java:856)
at org.apache.commons.mail.Email.createInternetAddress(Email.java:601)
... 10 more

Publish instance takes a long instance to load

$
0
0

Hi ,

 

      I have a server.bat running with 4502 at author instance . I installed the publish instance as well on 4503 and started running with the server.bat file .

 

      Its taking a very long time to load the page , almost 3 minutes  on the server.bat file , following message is being displayed recursively for the entire time we are trying to display in here :

 

 

      05.12.2012 12:27:47 *WARN * DocId$UUIDDocId: Unknown parent node with id d2cca173-8b9e-4957-af5c-9e22bdbf3ae8 (DocId.java, line 268)

 

      I am checking at logs folder under the server/logs but only see access.txt file .

 

     Not able to figure out where the error lies and why is taking such a long time to load the page  ?  Does anybody know about this behavior ?

 

 

Thanks

How to write a subquery using JCR SQL2 in CQ5(without ModeShape)

$
0
0

Hi,

 

We have a parent node with several levels of child nodes. We are trying to do a node level search i.e., if the search key is present in any of the properties in the parent node or the child nodes, the query must return the parent node alone(NOT the child nodes).

 

The below JCR SQL2 query will do the above said functionality,

SELECT * FROM [nt:base] AS s WHERE ISDESCENDANTNODE([/DB/ParentNode]) and CONTAINS(s.*, 'searchKey')

 

The constraint is that we have other filters, which when applied, will give only the nodes which has the required property. For example

SELECT * FROM [nt:base] AS s WHERE ISDESCENDANTNODE([/DB/ParentNode]) and CONTAINS(s.*, 'searchKey') and column1 = 'filter1'

 

where column1 is present only in the ParentNode and not the child nodes.

 

Hence the above query will limit the search to the ParentNode only and it will not search the child nodes. Also when you use the first query you are getting child node path but my requirement is to get all the Parent Node paths.

 

And so I decided to write a sub-query like the one shown below,

SELECT * FROM [nt:base] as a

WHERE PATH() IN (

   SELECT * FROM [nt:base] AS s WHERE ISDESCENDANTNODE([/DB/ParentNode]) and CONTAINS(s.*, 'searchKey')

)

and column1 = 'filter1'

 

But the above query is not working in CRXDE Lite. When i searched the web it is said that sub-query and join conditions are possible only using ModeShape.

 

I have no idea what ModeShape is. If any one has any idea on writing a sub query using JCR SQL2 in CQ5 without ModeShape, please help. Thanks in advance.


Permission sensitive caching

$
0
0

Hello,

 

I am trying to use permission sensitive caching on my website "www.domain.com" for resources that are in a particular location in the DAM. I want to make sure users are logged in when they download resources using this URL: www.domain.com/content/dam/secured/*.*

 

That "secured" folder has been secured using a CUG.

 

I've done the following:

 

1) Configured the dispatcher.any file (under the website directive) with the following /URL:

/url /custom/path/to/servlet

 

2) I've configured the filter to check "/content/dam/secured/*.*"

 

3) After restarting the dispatcher I can see from the logs that auth_checker is configured

 

4) I've created a servlet that implements the dohead method of SlingAllMethodsServlet. The value of the path has been set to /custom/path/to/servlet. I added quite a bit of logging into this servlet/

 

From the dispatchers'log file it looks like all is configured correctly. However, the servlet is never called. I don't see anything appear in the error.log (nor the logging I put in, nor any errors with that servlet). When I use the sling resource resolver tool in system/console/ all seems to work fine when I type www.domain.com/custom/path/to/servlet?uri=test in the test box.

 

Any suggestions about what else I can do to debug this? Has anyone else used sensitive caching before, would you mind sharing your dispatcher exact details + servlet?

 

Many thanks!

Unable to set maximum for tags widget

$
0
0

Hello,

 

according to the 'tags' widget (/libs/cq/tagging/widgets/source/widgets/TagInputField.js) documentation it should be possible to restrict the namespaces to select from usint the 'namespaces' attribute.

This works fine if I only specify the namespaces to restrict to (namespaces = [namespace1,namespace2].

But still according to the documentation, it should also be possible to restrict the number of tags that can be selected using the following format for each namespace in the 'namespaces' array:

 

{

    name: "namespace",

    maximum: 1

}

 

Unfortunately, that does not work. I have tried all sorts of combinations.

 

Anyone else stumbled into this issue?

 

Kind regards,

 

Luc

sling:ResourceSuperType foundation/components/page

$
0
0

Hi Everybody,

 

I'm new to CQ and really enjoying it.  I have a question if someone can please help?

 

Can anyone help me understand how sling resolves a page component that has a resourceSuperType of  foundation/components/page ?  I created a page structure similar to the geometrixx pages, and have the following page component.

 

components/page/contentpage

body.jsp

content.jsp

footer.jsp

header.jsp

 

Therefore I discovered that I can override the body.jsp as this is the page selected by sling (I originally had contentpage.jsp).  Also using this structure I understand that if I have another template and page component I just extend the above "contentpage" component and override "content.jsp" keeping my web site structure (Nice!).

 

But what I don't understand is how how sling resolves to the body.jsp as the preferred script in the first place? Can anyone help me understand?

 

Thanks

Darren

Client Context customization in CQ5 to personalize the content based on user profile

$
0
0

Hi,

 

I would like to customize the CQ5 client context to personalize the content based on the user profile information which we receives from third party systems(ex: Oxygen single sign on).

I have looked the CQ5 documentation but didn't find enough information.

 

Here is the link, I have referred http://dev.day.com/docs/en/cq/current/developing/client_context_detail.html

 

Could you please provide me some informaiton/examples, how to customize the client context in CQ5?

 

It would be great, if you could provide more details/examples for this.

 

 

 

Thanks

Muni

Send Email Using CQ API and custom template

$
0
0

Is is possible to send email using CQ API and custom template.

 

If yes how can i pass template as Subject

 

http://blogs.adobe.com/learningwem/2011/11/27/cq5-4-workflow-process-to-send-an-email-usin g-messagegateway/

 

I was followed this and able send email to the recipients .

 

But is it possible to send email CQ APi and custome email template ?

 

I was tried this using workflow process

................................................................................

public class SendEmailWorkflowProcess implements WorkflowProcess {

 

    @Reference

           private MessageGatewayService messageGatewayService;

   

    public void execute(WorkItem item, WorkflowSession wfsession,MetaDataMap metaData) throws WorkflowException {

 

 

              HtmlEmail email = new HtmlEmail();

 

         try{

               .......................

               ...................

               email.setTo( emailRecipients );

              email.setSubject( "This is subject");

              email.setHtmlMsg( "Email testing is on");

 

              String template = "/apps/cq/workflow/email/test/en.txt";

              Session session = wfsession.getSession();

 

              Resource templateRsrc = jcrResolverFactory.getResourceResolver(session).getResource(template);

 

              if (templateRsrc.getChild("file") != null) {

                 templateRsrc = templateRsrc.getChild("file");

              }

              if (templateRsrc == null) {

                 throw new IllegalArgumentException("Missing template:---------- " + template);

              }

             

              final MailTemplate mailTemplate = MailTemplate.create(templateRsrc.getPath(),

                      templateRsrc.getResourceResolver().adaptTo(Session.class));

           

                        email = mailTemplate.getEmail(StrLookup.lookup(properties,HtmlEmail.class));

      

              //Check the logs to see that messageGatewayService is not null

              log.info("messageGatewayService : " + messageGatewayService);

 

 

              messageGateway = messageGatewayService.getGateway(HtmlEmail.class);

 

 

              //Check the logs to see that messageGateway is not null

              log.info("messageGateway : " + messageGateway);

 

 

              messageGateway.send( email );

             }

          catch ( Exception e ) {

              e.printStackTrace();

              log.error( "Fatal error while sending email in workflow", e );

          }

 

 

     } 

 

 

    }

 

..............................................

 

If this is correct procedure ,

 

email = mailTemplate.getEmail(StrLookup.lookup(properties,HtmlEmail.class));

 

what value required for " properties "(properties can't be resolved)

 

All sugestions are accepted

Viewing all 12476 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>