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

SCR Reference

$
0
0

Hi,

   I would like to know how can i make my class object as reference?

   For ex:

    /** @scr.reference */

    private SlingRepository slingRepository;

   

   In the java i have to get slingRepository through reference only. So i want to make my customized class objects accessible through reference only. Provide pointers if u know, Thanks for helping.

 

 

Regards,

Shashi


403 forbidden and 404 not found on dispatcher

$
0
0

Hi people,

 

As I'm viewing pages on my dispatcher server I get 403/404 on some resources:

 

Failed to load resource: the server responded with a status of 404 (Not Found)

http://our.dispatcher.server/libs/cq/i18n/dict.en.json

 

Failed to load resource: the server responded with a status of 404 (Not Found)

http://our.dispatcher.server/libs/cq/security/userinfo.json?cq_ck=1373462597320

 

Failed to load resource: the server responded with a status of 403 (Forbidden)

http://our.dispatcher.server/libs/cq/ui/rte.js

 

Although I understand the 404s (I can let them pass in the .any file), I was wondering why would I need those on the dispatcher server?

 

As for the 403s, same remark: why do I need rte (rich text editor?) on the publish/dispatcher site? 

 

Thanks for any help.

 

JS.

how to determine Dispatcher is working with CQ5 Publish instance.?

$
0
0

Hi all create author and publish instance for CQ5 site, when author modify any content over the site these are replicated on publish instance successfully, now i want to use dispatcher so for this i have configured that with publish instance in IIS as described in the article  CQ Dispatcher IIS Set Up - CQ Tutorials. now i want to check Dispatcher is working or not for publish instance. and what it is doing for CQ5 publish instance

How to create pagination in CQ5

$
0
0

Hello,

 

Sub- Component for CQ5 pagination

 

I have a static webpage and having static pagination and I want to create pagination in CQ5.

Ex. page having 5-5 product on each page and each product is authorable by author and same component I want to develop in CQ5.

Please let me know is there any component available in CQ5 or how we can do this in CQ5

 

pag.JPG

 

 

Regards,

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

How to get SlingScriptHelper in servlet?

$
0
0

I need to get a SlingScriptHelper instance from within my servlet. Either a ComponentContext or BundleContext will do as well, as my only goal is to get sling services using it.

 

  • Using SCR @Reference injection is not a solution for me, because I will determine at runtime what service class I need to get.
  • I've seen posts online that use an activate() method to get ComponentContext, and also decompiled some class that do it, but don't know how to cause sling to call this method and set my ComponentContext
  • I've tried pulling it from the Request scope as an attribute, but sling apparently only puts it there for scripts, not servlets.
  • I've tried injecting all of these objects themselves - none can be injected.

 

Any help? I'm hoping there's some static factory I can just hit and get one of these objects so that I can get services...

Regd:org.apache.sling.api.scripting.ScriptEvaluationException: javax.servlet.ServletException

$
0
0

Hi ,

 

I'm getting the below exception while accessing the pages. It was working fine earlier..

 

Any help on this please....???

 

Caused by: org.apache.sling.api.SlingException: javax.servlet.ServletException: javax.servlet.jsp.JspException: Error while executing script /libs/wcm/core/components/init/init.jsp

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:443)

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

at org.apache.sling.scripting.jsp.JspScriptEngineFactory.callJsp(JspScriptEngineFactory.java :233)

at org.apache.sling.scripting.jsp.JspScriptEngineFactory.access$100(JspScriptEngineFactory.j ava:85)

at org.apache.sling.scripting.jsp.JspScriptEngineFactory$JspScriptEngine.eval(JspScriptEngin eFactory.java:453)

at org.apache.sling.scripting.core.impl.DefaultSlingScript.call(DefaultSlingScript.java:358)

... 93 more

Caused by: org.apache.sling.api.SlingException: javax.servlet.ServletException: java.lang.NoClassDefFoundError: com/day/cq/wcm/api/WCMMode

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:443)

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

at org.apache.sling.scripting.jsp.JspScriptEngineFactory.callJsp(JspScriptEngineFactory.java :233)

at org.apache.sling.scripting.jsp.JspScriptEngineFactory.access$100(JspScriptEngineFactory.j ava:85)

at org.apache.sling.scripting.jsp.JspScriptEngineFactory$JspScriptEngine.eval(JspScriptEngin eFactory.java:453)

at org.apache.sling.scripting.core.impl.DefaultSlingScript.call(DefaultSlingScript.java:358)

at org.apache.sling.scripting.core.impl.DefaultSlingScript.eval(DefaultSlingScript.java:170)

at org.apache.sling.scripting.core.impl.DefaultSlingScript.service(DefaultSlingScript.java:4 56)

at com.day.cq.wcm.tags.IncludeTag.includeScript(IncludeTag.java:167)

at com.day.cq.wcm.tags.IncludeTag.doEndTag(IncludeTag.java:87)

at org.apache.jsp.apps.bt_com.components.wrapperpage.wrapperpage_jsp._jspx_meth_cq_005finclu de_005f0(wrapperpage_jsp.java:430)

at org.apache.jsp.apps.bt_com.components.wrapperpage.wrapperpage_jsp._jspService(wrapperpage _jsp.java:238)

at org.apache.sling.scripting.jsp.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)

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

... 98 more

Caused by: java.lang.NoClassDefFoundError: com/day/cq/wcm/api/WCMMode

at org.apache.jsp.libs.wcm.core.components.init.init_jsp._jspService(init_jsp.java:152)

at org.apache.sling.scripting.jsp.jasper.runtime.HttpJspBase.service(HttpJs

 

Thanks,

 

Shankar .A

Unable to change the default login page

$
0
0

I would to change the default login page (to /content/ethz_ch/Login)

 

I configured tha page by "Day CQ Login Selector Authentication Handler":

 

Screen Shot 2012-09-05 at 13.47.35 .PNG

In ./launchpad/config/com/day/cq/auth/impl/LoginSelectorHandler.config I see

 

auth.loginselector.defaultloginpage="/content/ethz_ch/Login"

 

as expected.

 

I then configured a page (/content/ethz_ch/de/auth_test.html) with a closed user group and left the login page field blank.

 

Instead on the newly defined login page I am redirected to

 

https://..../system/sling/cqform/defaultlogin.html?resource=%2Fcontent%2Fethz_ch%2Fde%2Fauth_test.html&$$login$$=%24%24login%24%24

 

Any idea on what I am doing wrong?


Author running slow. Failed to retrieve state of intermediary node error

$
0
0

Hi there,

 

I am having a problem with the Author running very slow to the point of unusable.

The setup is 1 Author server, 1 Publish server, and 1 Web/Dispatcher.

After checking in the log, I found following error repeated throughout the log, while there is not such problem in the Publish (in the log, and access speed).

In each of this error is preceeded by Reverse Replication message.

 

15.05.2013 07:30:21.033 *INFO* [Reverse Replication Processor] com.day.cq.replication.impl.content.durbo.DurboImporter imported content in 251722ms for durbo request on path: /home/groups/mediacorp/website-users

15.05.2013 07:30:21.033 *INFO* [Reverse Replication Processor] com.day.cq.replication.Agent.publish_reverse Successfully imported content at /home/groups/mediacorp/website-users

15.05.2013 07:30:21.048 *ERROR* [ObservationManager] com.day.cq.contentsync.impl.ContentSyncManagerImpl Error while trying to find content sync config path: {} javax.jcr.RepositoryException: failed to retrieve state of intermediary node

          at org.apache.jackrabbit.core.CachingHierarchyManager.resolvePath(CachingHierarchyManager.ja va:156)

          at org.apache.jackrabbit.core.HierarchyManagerImpl.resolvePath(HierarchyManagerImpl.java:365 )

          at org.apache.jackrabbit.core.ItemManager.getItem(ItemManager.java:550)

          at org.apache.jackrabbit.core.session.SessionItemOperation$4.perform(SessionItemOperation.ja va:97)

          at org.apache.jackrabbit.core.session.SessionItemOperation$4.perform(SessionItemOperation.ja va:93)

          at org.apache.jackrabbit.core.session.SessionItemOperation.perform(SessionItemOperation.java :187)

          at org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:216)

          at org.apache.jackrabbit.core.SessionImpl.perform(SessionImpl.java:361)

          at org.apache.jackrabbit.core.SessionImpl.getItem(SessionImpl.java:786)

          at com.day.cq.contentsync.impl.ContentSyncManagerImpl.findConfigPath(ContentSyncManagerImpl. java:232)

          at com.day.cq.contentsync.impl.ContentSyncManagerImpl.onEvent(ContentSyncManagerImpl.java:18 9)

          at org.apache.jackrabbit.core.observation.EventConsumer.consumeEvents(EventConsumer.java:248 )

          at org.apache.jackrabbit.core.observation.ObservationDispatcher.run(ObservationDispatcher.ja va:161)

          at java.lang.Thread.run(Unknown Source)

 

Is there any idea what's causing the problem? Any help would be appreciated.

 

Thanks,
Kent

CQ5.4, about compiled jsp files

$
0
0

Hi guys,

 

I have problems with caching and compiled versions, this is because of installing a package on a publish server with an older version of the same web app. This is CQ5.4, so I read you shouldn't delete the class files on the var directory.

 

What options do we have in this situation to delete compiled classes/force compilation?

 

Many thanks in advance.

Alejandro.

Dispatcher serving, but not caching, CQ5 pages

$
0
0

Just restored a backup of a CQ5.5 staging server to a new Amazon EC2 instance in order to allow some people outside of the company shared access to what we are working on.  CQ5 appears to be running correctly for the author and publish instances; I can see our site.

 

But the dispatcher in Apache is having trouble caching files, it seems.  Apache can serve the URLs requested of it, but it fails to cache any of them, so that every requested is actually being serviced by the publish instance through the dispatcher.  This is the dispatcher log showing the problem:

 

[Thu Oct 11 17:58:58 2012] [D] [820(139934505617152)] Found farm pmlpublic for ec2-174-129-90-184.compute-1.amazonaws.com

[Thu Oct 11 17:58:58 2012] [D] [820(139934505617152)] checking [/content/public/individuals-families/financial-life/planning-strategies.html]

[Thu Oct 11 17:58:58 2012] [D] [820(139934505617152)] no cache due to authorization header.

[Thu Oct 11 17:58:58 2012] [D] [820(139934505617152)] cache-action for [/content/public/individuals-families/financial-life/planning-strategies.html]: NONE

[Thu Oct 11 17:58:58 2012] [D] [820(139934505617152)] connected to render rend01 (localhost:4503)

[Thu Oct 11 17:58:58 2012] [D] [820(139934505617152)] Spooling header: Host

[Thu Oct 11 17:58:58 2012] [D] [820(139934505617152)] Spooling header: Cache-Control

[Thu Oct 11 17:58:58 2012] [D] [820(139934505617152)] Spooling header: User-Agent

[Thu Oct 11 17:58:58 2012] [D] [820(139934505617152)] Spooling header: Accept

[Thu Oct 11 17:58:58 2012] [D] [820(139934505617152)] Spooling header: Referer

[Thu Oct 11 17:58:58 2012] [D] [820(139934505617152)] Spooling header: Accept-Encoding

[Thu Oct 11 17:58:58 2012] [D] [820(139934505617152)] Spooling header: Accept-Language

[Thu Oct 11 17:58:58 2012] [D] [820(139934505617152)] Spooling header: Accept-Charset

[Thu Oct 11 17:58:58 2012] [D] [820(139934505617152)] Spooling header: Cookie

[Thu Oct 11 17:58:58 2012] [D] [820(139934505617152)] Spooling header: Via

[Thu Oct 11 17:58:59 2012] [D] [820(139934505617152)] Detected: chunked transfer encoding

[Thu Oct 11 17:58:59 2012] [D] [820(139934505617152)] response.status = 200

[Thu Oct 11 17:58:59 2012] [D] [820(139934505617152)] response.headers[Server] = "Day-Servlet-Engine/4.1.24 "

[Thu Oct 11 17:58:59 2012] [D] [820(139934505617152)] response.headers[Content-Type] = "text/html;charset=UTF-8"

[Thu Oct 11 17:58:59 2012] [D] [820(139934505617152)] response.headers[Date] = "Thu, 11 Oct 2012 17:58:59 GMT"

[Thu Oct 11 17:58:59 2012] [D] [820(139934505617152)] response.headers[Set-Cookie] = "JSESSIONID=e4bb6232-7726-4258-a724-f111ccf0eed9; Path=/; HttpOnly"

[Thu Oct 11 17:58:59 2012] [D] [820(139934505617152)] send http headers

[Thu Oct 11 17:58:59 2012] [D] [820(139934505617152)] Content length: -1, written: 54000

[Thu Oct 11 17:58:59 2012] [I] [820(139934505617152)] "GET /content/public/individuals-families/financial-life/planning-strategies.html" 200 53979 330ms


That "cache-action: NONE" is the issue.

 

I've checked permissions in the cache directory, and they match those of our staging servers - best I can tell.  But nothing ever gets written to disk for caching.

 

I'm guessing that I am missing something obvious, and my gut tells me I've dealth with this before, but I just can't get it going.  Any ideas?

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.

How does the parsys component inject styles into the design css file?

$
0
0

In Adobe AEM ( formerly CQ5 ) the foundation component parsys' design_dialog allows the user to set the "Cell Padding". Whatever value is entered into the text field will show up in the design css.

 

For example:

 

Given that the current page is using /etc/designs/my-design the page output will include reference to the /etc/designs/my-design.css stylesheet virtual path.

 

If the user configured the parsys cell padding to be 30px then the my-design.css file will include the following:

 

.page_full .par div.section {

  padding: 30px;

}

 

The string "30px" is stored in the jcr:content/page/par/section attribute called div.padding, however, I can't figure out how the parsys.jsp injects it into the my-design.css.

 

The padding gets added dynamically based on the user input. I want to do a similar thing with my component, but I don't know how to write the setting into the main design.css file.

Apache Sling JCR Resource Resolver doesn't work for the anchor tags which is been rendered through j

$
0
0

Certainly I realized that Apache Sling JCR Resource Resolver doesn't work for the anchor tags which is been rendered through jquery or javascript.

 

e.g.

 

In Felix Console , in Apache Sling JCR Resource Resolver configuration I have added following mapping.

 

/content/myproject/-/

 

So If any anchor tag is there like <a href="/content/myproject/en.html"> click me </a> then it will be mapped to "/en.html" automatically.

 

But the problem is there in following scenario.

 

I have an anchor tag as follows.

 

<a href="#" id="test"> click here </a>

 

And I am assigning the href to anchor through JQUERY.

 

<script>

$("#test").attr("href","/content/myproject/en.html");

</script>

 

Ideally this should have been mapped to "/en.html".

 

But it is not mapping to "/en.html". It still shows "/content/myproject/en.html".

 

How to resolve this.

 

Thanks,

Sai

How to Publish Design Dialog content ?

$
0
0

Hi,

 

Senario:                    Whenever we update or enter content in design dialog , it won't get publish while activating the page.

Understanding:          Becaue design dialog content get stored under /etc/design/myapp/ with particular templates, So while activating the page this content won't publish.

 

Now Question is :      How to Publish Design Dialog content ?(Apart from activation tree because it has own limitations, like you can't activate single page or node using

                                   activation tree)

 

 

Regards

Brijesh Yadav


ADOBE AEM-Ford -http://hostname:9692/content/geometrixx/en/company.html

$
0
0

Hi,

 

I am from Ford.We are using ADOBE AEM.

 

Have installed the adobe aem and changed the  jar as  cq5-author-p9692.jar.

 

This is in the Linux environment.

 

Started the adobe aem using the quickstart.sh and it started.

I am able to access the below url

 

http://hostname:9692/system/console/vmstat?

 

But the below url is not accessible .Should any configuration change be made for this

 

http://hostname:9692/content/geometrixx/en/company.html

 

 

========================================================================================== =====

in the error.log :

 

03.07.2013 04:22:57.430 *ERROR* [19.237.168.106 [1372839777429] GET /favicon.ico HTTP/1.1] org.apache.sling.engine.impl.SlingHttpContext handleSecurity: AuthenticationSupport service missing. Cannot authenticate request.

03.07.2013 04:22:57.431 *ERROR* [19.237.168.106 [1372839777429] GET /favicon.ico HTTP/1.1] org.apache.sling.engine.impl.SlingHttpContext handleSecurity: Possible reason is missing Repository service. Check AuthenticationSupport dependencies.

========================================================================================== ======

 

Please let me know where I hane made the mistake  or modifications required in the any of the configurations file.

 

Regards,

Sakthi

Configuring Anonymous access for Sling Servlet

$
0
0

Hello Team,


My use case scenario is Apache webserver directs all the requests to the Sling servlet and Sling servlet would forward the calls to CQ or our internal webapp depending upon the url. I need the anonymous access for accessing my Sling Servlet.

 

When I call my Sling Servlet from the Apache webserver, it is redirected to libs/cq/core/content/login.html. When I hit in the CQ server direcly for that servlet thats not redirecting to the login page and directly the servlet is served. Only when apache webserver dispatches the request, its being redirected to /libs/cq/core/content/login.html.

 

[rid#18017320/initial] (4) RewriteCond: input='/mcdonalds' pattern='^/(.*)$' => matched

[rid#18017320/initial] (2) rewrite '/mcdonalds' -> '/apps/myvanity/forwardvanity?category=mcdonalds'

[rid#18017320/initial] (3) split uri=/apps/myvanity/forwardvanity?category=mcdonalds -> uri=/apps/myvanity/forwardvanity, args=category=mcdonalds

[rid#18017320/initial] (2) local path result: /apps/myvanity/forwardvanity

[rid#18017320/initial] (2) prefixed with document_root to /u/apache/htdocs/apps/myvanity/forwardvanity

[rid#18017320/initial] (1) go-ahead with /u/apache/htdocs/apps/myvanity/forwardvanity [OK]

[rid#180092b0/initial] (2) init rewrite engine with requested uri /libs/cq/core/content/login.html

 

When I look into the configuration in the Apache Sling Authentication Service, I could see the AllowAnonymouAccess option is being checked. Also I tried to configure the AuthenticationRequirements property to

-/apps/myvanity/forwardvanity to allow this url anonymous access explicitly. After the configuration I could even see that my entry got added in the Authenticator tab.

 

Authentication Requirement Configuration
PathAuthentication RequiredDefining Service (Description or ID)
/system/sling/logoutNoApache Sling Request Authenticator
/system/sling/loginNoApache Sling Request Authenticator
/system/sling/cqform/defaultloginNoDefault Login Form for CQ Login Selector Authentication Handler
/loginNoDay Communique LoginServlet
/libs/cq/core/content/loginNoDay CQ Login Selector Authentication Handler
/bin/loginNoDay Communique LoginServlet
/apps/myvanity/forwardvanityNoApache Sling Request Authenticator
/apps/myvanity/forwardvanityNoApache Sling Request Authenticator
/NoApache Sling Request Authenticator

 

Could some one please suggest how to allow the anonymous access for that servlet such that my apache webserver would not redirect to login page. Any suggestions/pointers would be appreciated.

 

Best Regards,

Durga

How can I create a design dialog for a component that is site wide and not bound to a templates?

$
0
0

How would I use design dialogs on a componet to create a global setting and not a setting that is bound per template?  I want to save a property for a component globably and not have 5 different references if I have 5 templates.  How can I create a component that has a global configurable setting?

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.

i18n value in sling include

$
0
0

I am unable to get I18n value in sling include content in 404.jsp/default.jsp.

 

Basically I am including a 404 page ( based on some template ) into sling/servlet/errorhandler/default.jsp like

<sling:include path="/content/mysite/en/errorpage" />

 

I am able to see the included error page in case of 404. But the i18n value that are used in errorpage is not applied, instead i am getting the sling:key as the value itself.

The standalone page (if i directly open the page instead of going thru 404 error ) shows correct i18n value

I am using i18n as:

 

ResourceBundle i18n = slingRequest.getResourceBundle(locale);

or

I18n i18n1= new I18n(slingRequest);

 

Please suggest if i m doing something wrong.

Viewing all 12476 articles
Browse latest View live


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