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

Setting Eclipse Environment: required jar file for

$
0
0

Hi,

 

I am setting up Eclipse development environment for CQ 5.4, and am facing an issue with finding the exact jar files that will parse the <cq:defineObjects>  tag. I have the followed the instructions under : http://wem.help.adobe.com/enterprise/en_US/10-0/wem/developing/developmenttools/developing _with_eclipse.html

 

And I have included the  sling.scripting.jsp.taglib-2.0.6.jar  in my classpath. I get the following error : "The TagExtraInfo class for "cq:defineObjects" (com.day.cq.wcm.tags.DefineObjectsTEI) could not be instantiated".

 

Do I need any other jars to included in the classpath?

 

thanks,

pvr


"cache file is newer than last flush" issue

$
0
0

I am unable to overwrite cached html files due to this following error, cache file is newer than lastflush -> use cache

 

The publish, render and live boxes have their time sync working, so I am at a loss to this issue. Files are being pushed to a box with Windows Server 2003 and IIS6 running Dispatcher 4.1.1. Here is the full log:

 

[Mon Jun 18 11:12:26 2012] [debug] Found farm website for x.x.x.x
[Mon Jun 18 11:12:26 2012] [debug] checking [/population_health/hello-world.html]
[Mon Jun 18 11:12:26 2012] [debug] cache file is newer than lastflush -> use cache [E:\inetpub\wwwroot\population_health\hello-world.html]
[Mon Jun 18 11:12:26 2012] [debug] cache-action for [/population_health/hello-world.html]: SPOOL
[Mon Jun 18 11:12:26 2012] [debug] request declined
[Mon Jun 18 11:12:26 2012] [info] "GET /population_health/hello-world.html" 0 - 0ms

Hybris + Adobe CQ integration issue

$
0
0

Hi All,

 

I'm working on external Hybris + Adobe CQ integration. My website for products display has been initialized based on geometrixx-outdoors template.

I'm using following article as an howto:

http://dev.day.com/docs/en/cq/current/ecommerce/eCommerce-framework.html

 

For now have some success

1. I've already loaded my catalog and with products on Adobe

2. User/Session sharing also works partially

The only problem here is for anonimous user. The method call commerceSession.getCartEntryCount() on start page -> userinfo panel throws

org.apache.sling.api.scripting.ScriptEvaluationException: javax.servlet.ServletException: com.adobe.cq.commerce.api.NotAuthorizedException: You are not authorized.

 

The other problem connected with product displaying:

 

 

Caused by: java.lang.NullPointerException

 

at com.adobe.cq.commerce.hybris.impl.HybrisSessionImpl.getProductPriceInfo(HybrisSessionImpl .java:184)

at com.adobe.cq.commerce.hybris.impl.HybrisSessionImpl.getProductPriceInfo(HybrisSessionImpl .java:171)

at com.adobe.cq.commerce.hybris.impl.HybrisSessionImpl.getPriceInfo(HybrisSessionImpl.java:1 66)

 

All this stuff happens without any code modification from myside just out-of-the-box.

 

Does somebody have such a problems and if so how does he solved them?

How to create a non component jsp ?

$
0
0

Hi,

 

I want to apply a password policy in our site, so I need redirect to a new jsp called changepassword after sucessfully login. I try to change the action of login's form but it desn't work. How can I do it?

I have copy all of /libs/cq/core/component/login and /libs/cq/core/content/login to /apps/cq/core/component/login and /apps/cq/core/content/login before I try do it.

 

After I changed the action of login's form to changepassword.html, I got a respose as below.

Content modified /libs/cq/core/content/changepassword/changepassword.html

Status

200

Message

OK

Location/libs/cq/core/content/changepassword/changepassword.html
Parent Location/libs/cq/core/content/changepassword
Path

/libs/cq/core/content/changepassword/changepassword.html

Refererhttp://localhost:4502/libs/cq/core/content/login.html?mode=login
ChangeLog

<pre>modified("/libs/cq/core/content/changepassword/changepassword.html/resource");<br/></ pre>

Go Back

Modified Resource

Parent of Modified Resource

 

Thanks a lot.

Event listener when a particular field value changes in dialog

$
0
0

Hi there,  Issue is that I need to change a jcr property when a specific field value is changed in dialog. Since all the fileds are modified / rewriten in jcr when the dialog is saved, i can not identify the modification on a particular field.

This node already exists: /etc/packages

$
0
0

Hello all!

 

I've been trying to upload packages into CQ5 via Java, based on the documented curl commands at http://dev.day.com/docs/en/crx/current/how_to/package_manager.html, but I've hit a strange issue when trying to upload packages to publish instances.  The reason I'm uploading to the publisher directly is because the package only contains ACL nodes, and these do not seem to replicate from author to publisher (from everything that I've read and tried).

 

I'm using the older /crx/packmgr/service.jsp method in my Java - I know that this is outdated, but it gives me a better debug output of what goes wrong than the /crx/packmgr/service/.json/?cmd=upload method.  I get the same failures with the newer json methos as well.

 

When I run my code specifying "author", I get the following response, and the package has uploaded successfully:

 

<crx version="2.3.15" user="admin" workspace="crx.default">

  <request>

    <param name="file" value="author_package.zip"/>

    <param name="name" value="author_packagename"/>

  </request>

  <response>

    <data>

      <package>

        <group></group>

        <name>author_packagename</name>

        <version>0.01</version>

        <downloadName>author_package.zip</downloadName>

        <size>1754056</size>

        <created></created>

        <createdBy>admin</createdBy>

        <lastModified></lastModified>

        <lastModifiedBy>admin</lastModifiedBy>

        <lastUnpacked></lastUnpacked>

        <lastUnpackedBy>null</lastUnpackedBy>

      </package>

    </data>

    <status code="200">ok</status>

  </response>

</crx>

 

 

If I run the following curl command, I get the exact same response as my Java, so I'm happy that the Java is correct and working:

 

curl -u admin:admin -F file=@author_package.zip -F name=author_packagename http://127.0.0.1:4504/crx/packmgr/service.jsp

 

 

 

If I run my Java code specifying "publisher", I get the following response, and the package does not upload:

 

<crx version="2.3.15" user="anonymous" workspace="crx.default">

  <request>

    <param name="file" value="publisher_package.zip"/>

    <param name="name" value="publisher_packagename"/>

  </request>

  <response>

    <status code="500">javax.jcr.ItemExistsException: This node already exists: /etc/packages</status>

  </response>

</crx>

 

 

Trying the equivelant curl command, I get the following response, and the package has uploaded:

 

curl -u admin:admin -F file=@publisher_package.zip -F name=publisher_packagename http://127.0.0.1:4505/crx/packmgr/service.jsp

 

<crx version="2.3.15" user="admin" workspace="crx.default">

  <request>

    <param name="file" value="publisher_package.zip"/>

    <param name="name" value="publisher_packagename"/>

  </request>

  <response>

    <data>

      <package>

        <group></group>

        <name>publisher_packagename</name>

        <version>0.99</version>

        <downloadName>publisher_package.zip</downloadName>

        <size>12890709</size>

        <created></created>

        <createdBy>null</createdBy>

        <lastModified></lastModified>

        <lastModifiedBy>null</lastModifiedBy>

        <lastUnpacked></lastUnpacked>

        <lastUnpackedBy>null</lastUnpackedBy>

      </package>

    </data>

    <status code="200">ok</status>

  </response>

</crx>

 

 

If I take away the -u parameter of the successful curl command, I get the following response, which is the same as my "publisher" Java response:

 

curl -F file=@publisher_package.zip -F name=publisher_packagename http://127.0.0.1:4505/crx/packmgr/service.jsp

 

<crx version="2.3.15" user="anonymous" workspace="crx.default">

  <request>

    <param name="file" value="publisher_package.zip"/>

    <param name="name" value="publisher_packagename"/>

  </request>

  <response>

    <status code="500">javax.jcr.ItemExistsException: This node already exists: /etc/packages</status>

  </response>

</crx>

 

So....

 

Does anyone know if a publish instance deals with authentication in a different way from an author instance?  The Java code does not change, but the results are different depending on the type of server I'm trying to upload to.  The fact that the Java "publish" upload reports back as being an anonymous user (which I replicated with the last curl call), but uses the same code as the successful (and authorised) "author" upload besides the package details and port, leads me to believe that it's the CQ5 server that is turning this into an anonymous call.

 

Anyone have any thoughts on what might be happening here, and the best way to solve it?

 

Cheers,

K

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

Installation procedure of AEM on AWS

$
0
0

Dear,

I would like to install AEM on amazon cloub service, is there any procedure for the installation.Thanks, Sara


Configure dispatcher on ubuntu

$
0
0

Am not able to get dispatcher working on my Ubuntu machine, following is the error that I get after apache restart

 

Syntax error on line 2 of /etc/apache2/conf.d/dispatcher.any:

Invalid command '/farms', perhaps misspelled or defined by a module not included in the server configuration

Action 'configtest' failed.

 

Am using the default dispatcher.any file without any changes.

 

I've enabled the dispatcher module as below:

 

 

LoadModule dispatcher_module /usr/lib/apache2/modules/dispatcher-apache2.2-4.1.4.so

 

<IfModule disp_apache2.c>

        # location of the configuration file. eg: 'conf/dispatcher.any'

        DispatcherConfig conf.d/dispatcher.any

 

        # location of the dispatcher log file. eg: 'logs/dispatcher.log'

        DispatcherLog    /var/log/apache2/dispatcher.log

 

        # log level for the dispatcher log

        # 0 Errors

        # 1 Warnings

        # 2 Infos

        # 3 Debug

        DispatcherLogLevel 3

 

        # if turned to 1, the dispatcher looks like a normal module

        DispatcherNoServerHeader 0

 

        # if turned to 1, request to / are not handled by the dispatcher

        # use the mod_alias then for the correct mapping

        DispatcherDeclineRoot 0

 

        # if turned to 1, the dispatcher uses the URL already processed

        # by handlers preceeding the dispatcher (i.e. mod_rewrite)

        # instead of the original one passed to the web server.

        DispatcherUseProcessedURL 0

 

        # if turned to 1, the dispatcher does not spool an error

        # response to the client (where the status code is greater

        # or equal than 400), but passes the status code to

        # Apache, which e.g. allows an ErrorDocument directive

        # to process such a status code.

        DispatcherPassError 0

</IfModule>

 

Can anyone please help me out in resolving the issue?

 

Thanks,

-- Pawan

Failed creating formpost data

$
0
0

Dear All,

 

I am getting this error when am trying to install package. The package manager is not loading and in launch pad the error is

[ERROR] Request to http://localhost:4503/crx/packmgr/service.jsp failed, respons

e=Unauthorized

 

When I tried to execute the command,

curl -u admin:admin -F file=@publisher_package.zip -F name=publisher_pack

agename http://localhost:4503/crx/packmgr/service.jsp

 

The response is:

curl: (26) failed creating formpost data.

 

Any help would be much appreciated.

 

Regards

Embed PDFs using PDF Rewriter (page2fo.xsl)

$
0
0

I'm trying to embed an extra PDF file to the front and another PDF to the end based on the default PDF Rewriter (page2fo.xsl) that comes with CQ5 according to,

 

 

http://forums.adobe.com/thread/918206

http://cqblueprints.com/xwiki/bin/view/CQ+FAQ/How+can+I+configure+the+PDF+rewriter

http://xmlgraphics.apache.org/fop/0.95/extensions.html

 

 

I modified (added) the following lines (in red) in page2fo.xsl to include in extra external pdf docs, expecting to see the the front and the back to be embedded into the PDF output.

 

 

However, the result is as if those lines were not there. No obvious runtime error. I still see the output of page2fo.xsl without files being merged.

 

 

What am I doing wrong?

 

-----------

 

<?xml version="1.0"?>

<xsl:stylesheet version="1.0"

  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"

  xmlns:fo="http://www.w3.org/1999/XSL/Format"

  xmlns:jcr="http://www.jcp.org/jcr/1.0"

  xmlns:sling="http://sling.apache.org/jcr/sling/1.0"

  xmlns:dam="http://www.day.com/dam/1.0"

  xmlns:fox="http://xmlgraphics.apache.org/fop/extensions">

 

 

  <xsl:param name="resource"/>

 

 

  <xsl:template match="dam:thumbnails"/>

 

 

  <xsl:template match="/">

   <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"

            xmlns:fox="http://xmlgraphics.apache.org/fop/extensions">

 

    <fo:layout-master-set>

     <fo:simple-page-master master-name="page"

                  page-height="29.7cm"

                  page-width="21cm"

                  margin-top="1cm"

                  margin-bottom="2cm"

                  margin-left="2.5cm"

                  margin-right="2.5cm">

       <fo:region-body margin-top="3cm"/>

       <fo:region-before extent="3cm"/>

       <fo:region-after extent="-3.5cm"/>

     </fo:simple-page-master>

 

 

     <fo:page-sequence-master master-name="all">

       <fo:repeatable-page-master-reference master-reference="page"/>

     </fo:page-sequence-master>

    </fo:layout-master-set>

 

    <fox:external-document content-type="pdf" src="url('sling://content/dam/public/pdf/backCoverLATL.pdf')" />

 

    <fo:page-sequence master-reference="all">

 

      <fo:static-content flow-name="xsl-region-before">

 

        <fo:table  border-collapse="collapse">

          <fo:table-column column-width="50%"/>

          <fo:table-column column-width="50%"/>

          <fo:table-body >

            <fo:table-row>

              <fo:table-cell padding="2pt">

                <fo:block font-size="36pt" space-before.optimum="24pt" text-align="start"><xsl:value-of select="jcr:content/@jcr:title"/></fo:block>

              </fo:table-cell>

              <fo:table-cell padding="2pt">

                <fo:block text-align="end">

                  <fo:external-graphic src="sling://etc/designs/geometrixx/jcr:content/logo/image.jpeg"

                                       content-type="content-type:image/jpeg" width="165px" height="64px"/>

                </fo:block>

              </fo:table-cell>

            </fo:table-row>

          </fo:table-body>

        </fo:table>

      </fo:static-content>

 

      <fo:static-content flow-name="xsl-region-after">

        <fo:block text-align="center" font-size="10pt" font-family="serif" line-height="14pt">Page <fo:page-number/></fo:block>

      </fo:static-content>

 

 

      <xsl:choose>

        <xsl:when test="jcr:content">     

          <fo:flow flow-name="xsl-region-body">

            <xsl:apply-templates/>

          </fo:flow>

        </xsl:when>

        <xsl:otherwise>

          <fo:flow flow-name="xsl-region-body">

            <fo:block font-size="18pt" space-before.optimum="12pt" text-align="start"><xsl:value-of select="jcr:content/@jcr:title"/></fo:block>

          </fo:flow>

        </xsl:otherwise>

      </xsl:choose>

    </fo:page-sequence>

 

    <fox:external-document>

       <xsl:attribute name="content-type">pdf</xsl:attribute>

       <xsl:attribute name="src">url('sling://content/dam/public/pdf/backCoverLATL.pdf')</xsl:attribute>

    </fox:external-document>

 

   </fo:root>

  </xsl:template>

 

 

  <xsl:template match="jcr:content">

    <xsl:apply-templates/>

  </xsl:template>

 

 

  <xsl:template match="*[contains(@sling:resourceType,'foundation/components/par')]">

    <xsl:apply-templates/>

  </xsl:template>

 

 

  <xsl:template match="*[contains(@sling:resourceType,'foundation/components/title')]">

    <xsl:if test="@jcr:title">

      <fo:block font-size="18pt" space-before.optimum="12pt" text-align="start"><xsl:value-of select="@jcr:title"/></fo:block>

    </xsl:if>

  </xsl:template>

 

 

  <xsl:template match="*[contains(@sling:resourceType,'geometrixx/components/title')]">

    <xsl:if test="@jcr:title">

      <fo:block font-size="18pt" space-before.optimum="12pt" text-align="start"><xsl:value-of select="@jcr:title"/></fo:block>

    </xsl:if>

  </xsl:template>

 

 

  <xsl:template match="*[contains(@sling:resourceType,'foundation/components/text')]">

    <xsl:if test="@jcr:title">

      <fo:block font-size="18pt" space-before.optimum="12pt" text-align="start"><xsl:value-of select="@jcr:title"/></fo:block>

    </xsl:if>

    <fo:block font-size="12pt" space-before.optimum="12pt" text-align="start"><xsl:apply-templates select="text"/></fo:block>

  </xsl:template>

 

 

  <xsl:template match="*[contains(@sling:resourceType,'geometrixx/components/text')]">

    <xsl:if test="@jcr:title">

      <fo:block font-size="18pt" space-before.optimum="12pt" text-align="start"><xsl:value-of select="@jcr:title"/></fo:block>

    </xsl:if>

    <fo:block font-size="12pt" space-before.optimum="12pt" text-align="start"><xsl:apply-templates select="text"/></fo:block>

  </xsl:template>

 

 

  <xsl:template match="*[contains(@sling:resourceType,'foundation/components/textimage')]">

    <xsl:if test="@jcr:title">

      <fo:block font-size="18pt" space-before.optimum="12pt" text-align="start"><xsl:value-of select="@jcr:title"/></fo:block>

    </xsl:if>

    <xsl:if test="file">

      <fo:block><fo:external-graphic src="sling:/{$resource}/par/{local-name()}/file" content-width="100pt" content-height="100pt"/></fo:block>

    </xsl:if>

    <xsl:if test="@FileRef">

      <fo:block><fo:external-graphic src="sling:/{@FileRef}" content-width="100pt" content-height="100pt"/></fo:block>

    </xsl:if>

    <xsl:if test="@fileReference">

      <fo:block><fo:external-graphic src="sling:/{$resource}/par/{local-name()}.img.png" content-width="100pt" content-height="100pt"/></fo:block>

    </xsl:if>

    <fo:block font-size="12pt" space-before.optimum="12pt" text-align="start"><xsl:apply-templates select="text"/></fo:block>

  </xsl:template>

 

 

  <xsl:template match="*[contains(@sling:resourceType,'foundation/components/image')]">

    <xsl:if test="file">

      <fo:block><fo:external-graphic src="sling:/{$resource}/par/{local-name()}/file" content-width="100pt" content-height="100pt"/></fo:block>

    </xsl:if>

    <xsl:if test="@FileRef">

      <fo:block><fo:external-graphic src="sling:/{@FileRef}" content-width="100pt" content-height="100pt"/></fo:block>

    </xsl:if>

    <xsl:if test="@fileReference">

      <fo:block><fo:external-graphic src="sling:/{$resource}/par/{local-name()}.img.png" content-width="100pt" content-height="100pt"/></fo:block>

    </xsl:if>

  </xsl:template>

 

 

  <xsl:template match="*[contains(@sling:resourceType,'geometrixx/components/textimage')]">

    <xsl:if test="@jcr:title">

      <fo:block font-size="18pt" space-before.optimum="12pt" text-align="start"><xsl:value-of select="@jcr:title"/></fo:block>

    </xsl:if>

    <xsl:if test="file">

      <fo:block><fo:external-graphic src="sling:/{$resource}/par/{local-name()}/file" content-width="100pt" content-height="100pt"/></fo:block>

    </xsl:if>

    <xsl:if test="@FileRef">

      <fo:block><fo:external-graphic src="sling:/{@FileRef}" content-width="100pt" content-height="100pt"/></fo:block>

    </xsl:if>

    <xsl:if test="@fileReference">

      <fo:block><fo:external-graphic src="sling:/{$resource}/par/{local-name()}.img.png" content-width="100pt" content-height="100pt"/></fo:block>

    </xsl:if>

    <fo:block font-size="12pt" space-before.optimum="12pt" text-align="start"><xsl:apply-templates select="text"/></fo:block>

  </xsl:template>

 

 

  <xsl:template match="*[contains(@sling:resourceType,'geometrixx/components/image')]">

    <xsl:if test="file">

      <fo:block><fo:external-graphic src="sling:/{$resource}/par/{local-name()}/file" content-width="100pt" content-height="100pt"/></fo:block>

    </xsl:if>

    <xsl:if test="@FileRef">

      <fo:block><fo:external-graphic src="sling:/{@FileRef}" content-width="100pt" content-height="100pt"/></fo:block>

    </xsl:if>

    <xsl:if test="@fileReference">

      <fo:block><fo:external-graphic src="sling:/{$resource}/par/{local-name()}.img.png" content-width="100pt" content-height="100pt"/></fo:block>

    </xsl:if>

  </xsl:template>

 

 

  <xsl:template match="p">

     <xsl:apply-templates/>

    <fo:inline font-stretch="ultra-condensed">&#160;</fo:inline><fo:block/>

  </xsl:template>

 

 

  <xsl:template match="br">

    <fo:inline font-stretch="ultra-condensed">&#160;</fo:inline><fo:block/>

  </xsl:template>

 

 

  <xsl:template match="colctrl">

    <fo:table  border-collapse="collapse">

      <xsl:apply-templates select="col"/>

      <fo:table-body >

        <xsl:apply-templates select="row"/>

      </fo:table-body>

    </fo:table>

  </xsl:template>

 

 

  <xsl:template match="col">

    <fo:table-column/>

  </xsl:template>

 

 

  <xsl:template match="row">

    <fo:table-row>

      <xsl:apply-templates select="cell"/>

    </fo:table-row>

  </xsl:template>

 

 

  <xsl:template match="cell">

    <fo:table-cell padding="2pt">

      <xsl:apply-templates/>

    </fo:table-cell>

  </xsl:template>

</xsl:stylesheet>

CQ5.4/5.5 - integration with SiteMinder/external IdProvider/LDAP

$
0
0

Hi

I am looking for an approach on how to design CQ integration using SSO with below options.

 

<<This is specifically for CQ 5.4/5.5 as 5.6 provides SAML integration OOB>>

 

1. LDAP with SSO in harmony - User getting created in CRX once LDAP authenticates it. This can use OOB LDAP Module

2. Using SAML -  with external Identity Provider to authenticate user. This requires custom LoginModule.  (Integration using Open Source or  SiteMinder or

                           providers like Gigya or Cloud-based IdentityProvider)

 

Also, is it possible to use LDAP LoginModule(OOB) and Custom JAAS LoginModule on single repository.xml? Do we foresee any issues?

 

Appreciate any inputs or experience with similar implementation

Thanks!

OSGI bundle creation using third party jar files

$
0
0

Hi,

 

I have a requirement to integrate our CQ5.5 based application with a third party. As part of this, I have to use some jar files. After lot of digging, I realised that the way to use external jar files is to create an OSGI bundle wrapping these jar files.

So, I tried to do the same, but when I see the service details in system/console, I see errors. Can someone please suggest what could have gone wrong?

 

I have to use 3 jar files. So, I placed them in lib folder as shown in the screenshot below.

1.png

 

Ibuilt the bundle using .bnd file. It generated a jar file in install folder and I am able to to see its details in system/console/bundles. When I try to view details of the OSGI bundle that is installed, I see errors as follows:

2.png

Using multi-value properties in JSP components

$
0
0

I am trying to figure out if I am doing some small step wrong or if I don't have a full grasp on how some things work.

 

I am accessing a multi-value property from the JSP of my component:

 

<%@include file="/libs/foundation/global.jsp" %>

    <h2>Keys</h2>

    <div class="container_16">

        <div class="grid_8"><%

Object keysObj = properties.get("keys");

if (keysObj != null)

{

String[] keys = (String[]) keysObj;

%>

<%= keys %><%

} %></div>

</div>

 

Here is how I defined my component:

 

{

     "jcr:createdBy":"admin",

     "jcr:title":"My Listing",

     "allowedParents":["*/*parsys"],

     "componentGroup":"Listing Group",

     "sling:resourceSuperType":"foundation/components/parbase",

     "jcr:created":"Wed Aug 15 2012 20:01:15 GMT-0400",

     "jcr:primaryType":"cq:Component",

     "keys":[""]

}

 

So keys is a multi-value String object. I am supposing the value is a String[].

 

I created a dialog to set the values within the CQ page edit.

 

- myList

--- dialog [cq:Dialog]

----- items [cq:Widget]

------- items [cq:WidgetCollection]

--------- tabs1 [cq:Panel]

----------- items [cq:WidgetCollection]

------------- keys [cq:Widget]

 

The keys cq:Widget is defined as:

 

{

     "fieldLabel":"Keys to List",

     "xtype":"multifield",

     "name":"./keys",

     "jcr:primaryType":"cq:Widget",

     "fieldDescription":"List keys to display"

}

 

I placed the component into an existing geometrixx page to test. When I double-clicked on it I was able to add multiple values.

 

It is failing when I attempt to coerce the properties.get method to a String[]: String[] keys = (String[]) keysObj;

 

16.08.2012 11:58:29.444 *ERROR* [10.176.196.66 [1345132705084] GET /content/geometrixx/en/services.html HTTP/1.1] com.day.cq.wcm.core.impl.WCMDebugFilter Error during include of SlingRequestPathInfo: path='/content/geometrixx/en/services/jcr:content/par/keylist', selectorString='null', extension='html', suffix='null' org.apache.sling.api.scripting.ScriptEvaluationException: An exception occurred processing JSP page /apps/myList/components/keyList/keyList.jsp at line 14

<snip stack trace>

Caused by: java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Ljava.lang.String;

 

So all that leads to my question.

 

It looks like I am wrong on how to coerce the results of properties.get to a String[]. What is the best way to work with multi-value properties? I want to iterate through the values in the multi-value property.

 

Should I have specified the index in the method?

---- properties.get("keys[0]");

 

Thanks!

CQ login page is throwing 500 Internal Server Error on start up. Can't load http root property error

$
0
0

Hello Team,

 

When I am trying to start the CQ instance, I am seeing the following in the stderr.log

 

Setting properties from filename 'C:/CQ/CQInstall/cq-author-4502.jar'

Property '-r' set to 'author' from filename cq-quickstart-5.5.0-20120220.jar

System property 'sling.run.modes' set to 'author' by -r option

Redirecting stdout to C:\CQ\CQInstall\.\crx-quickstart\logs\stdout.log

Redirecting stderr to C:\CQ\CQInstall\.\crx-quickstart\logs\stderr.log

ResourceProvider paths=[/gui, /gui/default]

Can't load http root property: java.io.FileNotFoundException: C:\CQ\CQInstall\.\crx-quickstart\conf\sling.properties (The system cannot find the file specified)

 

MAIN process: shutdown hook

 

MAIN process: exiting

 

I am not sure where from this extra \.\ is getting added in the path.

 

Even when I see the osgi bundle in the system console,

 

http://localhost:4502/system/console/bundles


Bundle information: 122 bundles in total, 119 bundles active, 3 active fragments, 0 bundles resolved, 0 bundles installed.


On my mac machine, I have the same version and could see the total bundles as different.


bundle information 231 bundles in total, 224 bundles active, 7 active fragments, 0 bundles resolved and 0 bundles installed


When I try to access the http://localhost:4502/libs/crx/core/content/login.html

 

Internal Server Error

 

When I looked into the logs, it is giving the following error message:

 

06.02.2013 17:38:31.980 *ERROR* [0:0:0:0:0:0:0:1 [1360193734586] GET /libs/crx/core/content/login.html HTTP/1.1] org.apache.sling.servlets.resolver.internal.SlingServletResolver Original error class org.apache.sling.api.SlingException org.apache.sling.api.SlingException:

 

at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.handleJspExceptionInterna l(JspServletWrapper.java:563)

 

at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.handleJspException(JspSer vletWrapper.java:499)

at org.apache.sling.scripting.jsp.jasper.servlet.JspServletWrapper.service(JspServletWrapper .java:451)

at org.apache.sling.scripting.jsp.JspServletWrapperAdapter.service(JspServletWrapperAdapter. java:59)

Caused by: org.apache.sling.api.SlingException: Unable to setup processor: Unable to get component of class 'interface org.apache.sling.rewriter.Generator' with type 'htmlparser'.

 

at org.apache.sling.rewriter.impl.ProcessorManagerImpl.getProcessor(ProcessorManagerImpl.jav a:452)

 

at org.apache.sling.rewriter.impl.RewriterResponse.getProcessor(RewriterResponse.java:172)

at org.apache.sling.rewriter.impl.RewriterResponse.getWriter(RewriterResponse.java:110)

at org.apache.sling.scripting.core.impl.helper.OnDemandWriter.getWriter(OnDemandWriter.java: 38)

at org.apache.sling.scripting.core.impl.helper.OnDemandWriter.write(OnDemandWriter.java:61)

at java.io.PrintWriter.write(PrintWriter.java:382)

Caused by: java.io.IOException: Unable to get component of class 'interface org.apache.sling.rewriter.Generator' with type 'htmlparser'.

 

at org.apache.sling.rewriter.impl.PipelineImpl.getPipelineComponent(PipelineImpl.java:160)

 

at org.apache.sling.rewriter.impl.PipelineImpl.init(PipelineImpl.java:85)

at org.apache.sling.rewriter.impl.ProcessorManagerImpl.getProcessor(ProcessorManagerImpl.jav a:445)

... 73 more

 

Any pointers to solve the problem would be highly appreciated.

 

Best Regards,

Durga


Create a new xtype containing html5smartimage

$
0
0

Hi all

 

I'm trying to create an xtype that contains an html5smartimage element.

 

Apart from adding the html5smartimage to a Panel, is there anything else required?

 

The following is rendered to my dialog, but this doesn't contain the Crop / Resize / Map icons or the placeholder text.

image-xtype.png

When dropping images from ContentFinder to this area, I get the following error:

image-error.png

CODE

this.newPanel = new CQ.Ext.Panel({

 

    cls: "test",

 

    layout: "fit",

    border: true,

    autoHeight: true,

    items: {

        xtype: "panel",

        layout: "form",

        border: false,

        autoHeight: true,

        defaults: {

            labelWidth: 70,

            anchor: "100%"

        },

        items:[

            {

                 xtype: "panel",

                 border: false,

                 items: [{

                     height: 150,

                    title:"Image",

                    ddGroups: ["media"],

                    ddAccept: ["image/.*"],

                    border: true,

                    disableZoom: true,

                    allowUpload: false,

                    fileNameParameter:"./fileName",

                    fileReferenceParameter:"./fileReference",

                    cropParameter:"./imageCrop",

                    mapParameter:"./imageMap",

                    requestSuffix:".img.png",

                    rotateParameter:"./imageRotate",

                    name:"./file",

                    uploadUrl:"/tmp/upload/*",

                    xtype: "html5smartimage"

                 }]

            }

        ]

    }

});

CQ 5.4 Felix Console Not Accessible

$
0
0

Hi,

I am unable to access my author instance -felix console and am getting the following error while trying to access it

 

org.apache.sling.servlets.resolver.internal.SlingServletResolver Original error null

 

 

CRX has started and i can access the content repository. However, The felix consoles along with the default URL resolution are not working

 

For example, Inorder to get the login page I have to explicitly type the full url of localhost:4502/libs/cq/core/content/login.html

 

Any suggestions??

 

Thanks,

 

Ravi

XSS filtering

$
0
0

We recently had our website security tested and one of the issues was that it was vulnerable for XSS attacks. I did some reading on the web about this and came across the package XSSFilter as part of the CQ installation. Can anyone give some more information on how I should use this package?

 

Also, is standard XSS filtering not automatically applied in CQ? I read the following paragraph about it on Day's website and I find it a bit dubious:

 

"CQ applies the principle of filtering all user-supplied content upon output. Preventing XSS is given the highest priority during both development and testing."

 

If this isn't applied by default can we expect this to come out in a later release of CQ?

 

Many thanks!

On-Off time

$
0
0

Hi all,

 

Can anyone let me know which bundle is responsible for the on-off time property in a page.

When off time is set to a page , the page gets deactivated in that particular time of the day.

I want to see the query being applied to do the deactivation and the scheduler .

 

I am using cq5.6.1 .

 

Thanks in advance.

Fail to access CRX with JcrUtils.getRepository

$
0
0

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]

Viewing all 12476 articles
Browse latest View live


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