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

AuthenticationSupport service missing after building index.

$
0
0

I got an error on browser console after starting the CQ Author instance saying that "Service Unavailable AuthenticationSupport service missing. Cannot authenticate request. "

 

I just started all the bundles and also rebuit the index but still am getting the same error message.

 

When i logged in to system/console(OSGI Console) One thing i just noticed Authenticator tab is missing.

 

Help out to solve this issue

 

Thanks in Advance...

 

Mahesh


Stack trace when using translation workflow in CQ5.5

$
0
0

Hi!

 

When we use the translation workflow in 5.5 we get an ugly stack trace in the log (even though everything seems to work fine). We also tried a clean installation with only Geometrixx site and got the same problem. Does anybody have a solution for this? We have installed CQ5.5 and the following packages:

  • cq-5.5-security-update-npr-1951.zip
  • cq-update-pkg-5.5-1-load5.zip
  • crx-hotfixpack-2.2.0.70-2.3.24.zip
  • crx-hotfixpack-2.2.0.71-2.3.24.zip

 

Here is the stack trace:

 

19.10.2012 10:00:44.510 *WARN* [127.0.0.1 [1350633642682] POST /libs/wcm/msm/content/commands/translate HTTP/1.1] com.adobe.granite.i18n.impl.PreferencesLocaleResolverService Error occur resolving locale. javax.jcr.RepositoryException: This session has been closed. See the chained exception for a trace of where the session was closed.

          at org.apache.jackrabbit.core.session.SessionState.checkAlive(SessionState.java:150)

          at org.apache.jackrabbit.core.SessionImpl.sanityCheck(SessionImpl.java:372)

          at org.apache.jackrabbit.core.SessionImpl.getNodeById(SessionImpl.java:533)

          at org.apache.jackrabbit.core.security.user.UserManagerImpl.internalGetAuthorizable(UserMana gerImpl.java:832)

          at org.apache.jackrabbit.core.security.user.UserManagerImpl.getAuthorizable(UserManagerImpl. java:415)

          at com.adobe.granite.i18n.impl.PreferencesLocaleResolverService.resolveLocale(PreferencesLoc aleResolverService.java:93)

          at org.apache.sling.i18n.impl.I18NFilter$I18NHttpServletRequest.getLocaleList(I18NFilter.jav a:202)

          at org.apache.sling.i18n.impl.I18NFilter$I18NHttpServletRequest.getLocale(I18NFilter.java:17 8)

          at javax.servlet.ServletRequestWrapper.getLocale(ServletRequestWrapper.java:318)

          at javax.servlet.ServletRequestWrapper.getLocale(ServletRequestWrapper.java:318)

          at javax.servlet.ServletRequestWrapper.getLocale(ServletRequestWrapper.java:318)

          at org.apache.sling.i18n.impl.I18NFilter$BaseI18NSlingHttpServletRequest.getResourceBundle(I 18NFilter.java:233)

          at org.apache.sling.i18n.impl.I18NFilter$BaseI18NSlingHttpServletRequest.getResourceBundle(I 18NFilter.java:226)

          at com.day.cq.i18n.I18n.getResourceBundle(I18n.java:89)

          at com.day.cq.i18n.I18n.getResourceBundle(I18n.java:79)

          at com.day.cq.i18n.I18n.getVar(I18n.java:182)

          at com.day.cq.wcm.core.impl.LinkCheckerSettingsProviderImpl$RewriteConfigs.localize(LinkChec kerSettingsProviderImpl.java:209)

          at com.day.cq.wcm.core.impl.LinkCheckerSettingsProviderImpl$RewriteConfigs.createSettings(Li nkCheckerSettingsProviderImpl.java:214)

          at com.day.cq.wcm.core.impl.LinkCheckerSettingsProviderImpl.createSettings(LinkCheckerSettin gsProviderImpl.java:89)

          at com.day.cq.rewriter.linkchecker.impl.LinkCheckerImpl.createSettings(LinkCheckerImpl.java: 366)

          at com.day.cq.rewriter.linkchecker.impl.LinkCheckerTransformer.init(LinkCheckerTransformer.j ava:155)

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

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

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

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

          at org.apache.sling.api.servlets.HtmlResponse.send(HtmlResponse.java:464)

          at org.apache.jsp.libs.wcm.msm.components.commands.translate.POST_jsp._jspService(POST_jsp.j ava:205)

          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)

          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 org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:500)

          at org.apache.sling.engine.impl.filter.SlingComponentFilterChain.render(SlingComponentFilter Chain.java:45)

          at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:64)

          at com.day.cq.wcm.core.impl.WCMDebugFilter.doFilter(WCMDebugFilter.java:147)

          at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:60)

          at com.day.cq.wcm.core.impl.WCMComponentFilter.filterRootInclude(WCMComponentFilter.java:308 )

          at com.day.cq.wcm.core.impl.WCMComponentFilter.doFilter(WCMComponentFilter.java:141)

          at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:60)

          at org.apache.sling.engine.impl.SlingRequestProcessorImpl.processComponent(SlingRequestProce ssorImpl.java:257)

          at org.apache.sling.engine.impl.filter.RequestSlingFilterChain.render(RequestSlingFilterChai n.java:49)

          at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:64)

          at com.day.cq.wcm.core.impl.warp.TimeWarpFilter.doFilter(TimeWarpFilter.java:106)

          at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:60)

          at com.day.cq.wcm.mobile.core.impl.redirect.RedirectFilter.doFilter(RedirectFilter.java:305)

          at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:60)

          at org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter.doFilter(RequestProgre ssTrackerLogFilter.java:59)

          at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:60)

          at com.day.cq.wcm.foundation.forms.impl.FormsHandlingServlet.doFilter(FormsHandlingServlet.j ava:220)

          at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:60)

          at com.day.cq.theme.impl.ThemeResolverFilter.doFilter(ThemeResolverFilter.java:76)

          at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:60)

          at com.day.cq.wcm.core.impl.WCMRequestFilter.doFilter(WCMRequestFilter.java:89)

          at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:60)

          at org.apache.sling.rewriter.impl.RewriterFilter.doFilter(RewriterFilter.java:83)

          at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:60)

          at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:117)

          at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:60)

          at org.apache.sling.bgservlets.impl.BackgroundServletStarterFilter.doFilter(BackgroundServle tStarterFilter.java:135)

          at org.apache.sling.engine.impl.filter.AbstractSlingFilterChain.doFilter(AbstractSlingFilter Chain.java:60)

          at org.apache.sling.engine.impl.SlingRequestProcessorImpl.processRequest(SlingRequestProcess orImpl.java:153)

          at org.apache.sling.engine.impl.SlingMainServlet.service(SlingMainServlet.java:206)

          at org.apache.felix.http.base.internal.handler.ServletHandler.doHandle(ServletHandler.java:9 6)

          at org.apache.felix.http.base.internal.handler.ServletHandler.handle(ServletHandler.java:79)

          at org.apache.felix.http.base.internal.dispatch.ServletPipeline.handle(ServletPipeline.java: 42)

          at org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFil terChain.java:49)

          at org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.jav a:33)

          at org.apache.sling.i18n.impl.I18NFilter.doFilter(I18NFilter.java:117)

          at org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:88)

          at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:76)

          at org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFil terChain.java:47)

          at org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.jav a:33)

          at com.adobe.granite.license.impl.LicenseCheckFilter.doFilter(LicenseCheckFilter.java:179)

          at org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:88)

          at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:76)

          at org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFil terChain.java:47)

          at org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.jav a:33)

          at org.apache.sling.security.impl.ReferrerFilter.doFilter(ReferrerFilter.java:238)

          at org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:88)

          at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:76)

          at org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFil terChain.java:47)

          at org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.jav a:33)

          at org.apache.sling.engine.impl.log.RequestLoggerFilter.doFilter(RequestLoggerFilter.java:75 )

          at org.apache.felix.http.base.internal.handler.FilterHandler.doHandle(FilterHandler.java:88)

          at org.apache.felix.http.base.internal.handler.FilterHandler.handle(FilterHandler.java:76)

          at org.apache.felix.http.base.internal.dispatch.InvocationFilterChain.doFilter(InvocationFil terChain.java:47)

          at org.apache.felix.http.base.internal.dispatch.HttpFilterChain.doFilter(HttpFilterChain.jav a:33)

          at org.apache.felix.http.base.internal.dispatch.FilterPipeline.dispatch(FilterPipeline.java: 48)

          at org.apache.felix.http.base.internal.dispatch.Dispatcher.dispatch(Dispatcher.java:39)

          at org.apache.felix.http.base.internal.DispatcherServlet.service(DispatcherServlet.java:67)

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

          at com.day.j2ee.servletengine.ServletRuntimeEnvironment.service(ServletRuntimeEnvironment.ja va:250)

          at com.day.j2ee.servletengine.RequestDispatcherImpl.doFilter(RequestDispatcherImpl.java:315)

          at com.day.j2ee.servletengine.RequestDispatcherImpl.service(RequestDispatcherImpl.java:334)

          at com.day.j2ee.servletengine.RequestDispatcherImpl.service(RequestDispatcherImpl.java:377)

          at com.day.j2ee.servletengine.ServletHandlerImpl.process(ServletHandlerImpl.java:351)

          at com.day.j2ee.servletengine.HttpListener$Worker.run(HttpListener.java:625)

          at java.lang.Thread.run(Thread.java:662)

Caused by: java.lang.Exception: Stack trace of  where session-admin-465820 was originally closed

          at org.apache.jackrabbit.core.session.SessionState.close(SessionState.java:275)

          at org.apache.jackrabbit.core.SessionImpl.logout(SessionImpl.java:943)

          at org.apache.jackrabbit.core.XASessionImpl.logout(XASessionImpl.java:392)

          at com.day.crx.core.CRXSessionImpl.logout(CRXSessionImpl.java:116)

          at sun.reflect.GeneratedMethodAccessor55.invoke(Unknown Source)

          at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

          at java.lang.reflect.Method.invoke(Method.java:597)

          at org.apache.sling.jcr.base.SessionProxyHandler$SessionProxyInvocationHandler.invoke(Sessio nProxyHandler.java:109)

          at $Proxy9.logout(Unknown Source)

          at com.day.cq.workflow.impl.CQWorkflowSession.logout(CQWorkflowSession.java:615)

          at org.apache.jsp.libs.wcm.msm.components.commands.translate.POST_jsp._jspService(POST_jsp.j ava:201)

          ... 77 more

CQ5.5 Certification 9A0-327:

$
0
0

I have worked in Fatwire technology. I am totaly new to cq.

My company is asking me to take CQ5.5 Certification in two months.

How hard the exam is?

Can somebody suggest some good materials or questions.

Apache Tika PDF Parser not working in CQ 5.6

$
0
0

Hi all,

 

I was using following code to extract text from PDF in a CQ package.

ContentHandler handler = new BodyContentHandler();

Parser parser = new PDFParser();

parser.parse(a.getOriginal().getStream(), handler, new Metadata(),

new ParseContext());

String text = handler.toString();

 

This works perfectly in CQ 5.5 but in CQ 5.6 I get following exception:

Caused by: java.lang.ClassNotFoundException: org.apache.pfbox.io.RandomAccess not found by org.apache.tika.parsers [58]

          at org.apache.felix.framework.BundleWiringImpl.findClassOrResourceByDelegation(BundleWiringI mpl.java:1499)

          at org.apache.felix.framework.BundleWiringImpl.access$400(BundleWiringImpl.java:75)

          at org.apache.felix.framework.BundleWiringImpl$BundleClassLoader.loadClass(BundleWiringImpl. java:1882)

          at java.lang.ClassLoader.loadClass(Unknown Source)

 

Any ideas on why this class is not being found ?

 

Thanks!

Set xtype Checkbox Values

$
0
0

Hello,

 

I want to add a checkbox to a component's dialog box but would like the true/false event to store different values, e.g., "yes/no", "0/1" or "fred/tom" instead of "true/false".

 

How do I do this?

xssAPI encodeForHTMLAttr what's the alternative?

$
0
0

Hi,

 

Reading the xssAPI doc, on the method of encodeForHTMLAttr(), it says: 'DO NOT USE FOR ACTIONABLE ATTRIBUTES (href, src, event handlers); YOU MUST USE A VALIDATOR FOR THOSE!'

 

Just wondering what to use to validate?  is getValidHref() the right one to use?

 

Thanks!

AEM 5.6 - Sling Osgi Config Issue

$
0
0

Hi,

I have created config node with type of sling:osgiConfig inside my application and was able to fetch the values successfully based on the run mode. But the problem is if update the values for any properties thro felix console then the sling:osgiConfig node becomes nt:file under /apps/<myapp>/config/<myconfig>. If i open the file it just a property file with key/value pair.

 

I am facing this problem with AEM 5.6 only but in 5.4 and 5.5 i dont have any issues

 

 

-Sudharsan S

Set a dynamic default property when a page is created?

$
0
0

Is there a way to set a default property that is dynamic for a page when it is created? For example, i want to capture a user id from our system and store it in an "author" property when the page is first created. This value can be changed to a different user by the author but in case they don't set it i want to have it default on page creation.

 

I guess a better question would be, is there somewhere i can put code so that it will be executed when a page is created?

 

I considered writing a custom widget and putting this in page properties, but that won't actually run unless page properties has been opened.

 

Thanks


can I set sidekick's Allowed Components for a parsys at the Template level?

$
0
0

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?

 

[1] http://wem.help.adobe.com/enterprise/en_US/10-0/wem/wcm/default_components.html#Paragraph System (parsys)

Change the URL path for CQ?

$
0
0

How do you change the base URL so that /content/geometrixx/en does not show up in the URL?  If www.geometrixx.com was the URL how do you make it so that /conent/geometrixx/en does not show up in the URL for the homepage?

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 5.5 - xtype html5fileupload

$
0
0

Hi,

 

I am using the xtype 'html5fileupload' to show a browse dialog (I am using it inside a js file). I am facing the following issues with that.

 

1. the file name is not displayed in the browse(text) field  after  selecting the file.

 

2. neither the file name nor any data is submitted to the form

 

following are the config options I have used

 

"items": {

                            "jcr:primaryType": "cq:Panel",

                            "items": {

                                     "name": "xmlFile",

                                     "xtype": "html5fileuploadfield",

                                     "buttonText":"Select File",

                                     "allowBlank":false,

                                     "submitValue":true,

                                     "fieldDescription": CQ.I18n.getMessage("Please select the translated xml file."),

                            }

}

 

Could any one help with some clue on how to fix it? thanks in advance.

 

regards,

Vanidha.    

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]

How to add a document to the JCR Repository via Java API

$
0
0

I'm trying to get started with the JCR 2.0 " Content Repository Java Technology API Specification" It's really a great document but I miss a minimum of examples to visualize how it is all fits together.

For a start I want to add a pdf-document to my local CRX repository. Form the book I see, that I must add a Node and add the Properties.

 

File file = new File("/mypath/mydocument.pdf");
FileInputStream is = new FileInputStream(file);
ValueFactory valueFactory = session.getValueFactory();
Binary myBinary = valFact.createBinary(is);
Value valueFactory =valFact.createValue(myBinary);
Node nodeCarl=content.addNode("Carl", "nt:file");
Property pCarl=nodeCarl.setProperty("jcr:data", myBinary);

The program fails with:

javax.jcr.nodetype.ConstraintViolationException: no matching property definition found for {http://www.jcp.org/jcr/1.0}data in the lastt cited line.

I don't know, why this comes up with ..jcr/1.0; The Classpath consists of JCR-2.0.jar and jackrabbit-standalone-2.2.13.jar.

 

Any hint to get this stored is appreciated.

Ulrich

Using cURL to alter properties in a node

$
0
0

I'm wondering if anyone has figured out how to leverage cURL to change properties in existing nodes.

 

I have figured out how to upload, install and replicate packages, but we have a config node holding server addresses and other tidbits that need to be updated.

 

I'm hoping someone can give me an example of how to change a property to a node existing at say /apps/myApp/config/configuration with the property being server1URL.

 

Any help would be appreciated.


disabling a multifield based on selection

$
0
0

Hi  rush_pawan,


I have three tabs dynamically created with the help of ur your suggestion given above. It works fine.

 

I have another requirement. If i select one tab amongt the three, there is a drop down list with values and a multifield(textbox). If select a particular value in drop down list the multifield should be diasbled.

 

It works well for a dialog of xtype dialog.

 

function(box,value){var ans = box.findParentByType("dialog").form.findField("anstext"); disableAnsText(ans,value);}

function disableAnsText(ans,value)

{

   if(value == "date") {

                    alert("anstype value - "+value);

              ans.setDisabled(true);

    }

 

}

 

Now i have 3 tabs in a dialog of xtype tabpanel. How can i achieve the same with the tabpanel.

 

Thanks. It would be of great help  if i get an answer for this.

Nothing shows in sidekick inspite of the design selection

$
0
0

Additional update-  If the same page, I view it in preview and revert back to authoring mode, sidekick gets populated. So preview does the trick of sidekick population but not on all the templates. For few, the sidekick stays empty all times but parsys has the component list from design.

 

Hello,

 

     I have a template which has usual header/footer/leftnav embedded in it. In the body of the template there are two components. First is embedded global headline component and next is a parsys component. I go in design and identify the components that will be part of parsys and save it. There are two things happening here.

 

1. No matter what I do, sidekick doesnot populate at all and is always empty.

 

2. If I directly go to the parsys and righclick on new, another popup comes that lists all the selected component identified in the design. So I can create the content directly from parsys but not from sidekick.

 

Why is sidekick empty? How can that be fixed? I have attached the code.

 

<%@ include file="/apps/homesite/components/global.jsp" %>

  <cq:includeClientLib categories="820subNav"/>

<section id="content" class="container_12 clearfix">

          <aside id="leftSubNav" class="twoCol">

                      <cq:include path="leftnav" resourceType="homesite/components/leftnav"/>

          </aside>

          <div id="content-wrapper" class="tenCol">

        <div id="subIndustry" class="mainPadding">

          <cq:include path="globalheadline" resourceType="/apps/homesite/components/globalheadline"/>

          <cq:include path="subindustries" resourceType="/apps/homesite/components/parsys"/>

          <%--For this section of content created in parsys, sidekick will have video and multiple lists with no links --%>

        </div>

          </div>

</section>

<cq:include path="collateralcarousal" resourceType="/apps/homesite/components/insights/collateralcarousel"/>

 

 

Thanks

Manually Clean Dispatcher Cache

$
0
0

We have a requirement that we update some details of a page from a feed after certain interval of time and then we need to clean the dispatcher cache.

 

We have done few sling mapping also

e.g.

for page  /content/mysite/page1.html we have defined a sling mapping and whenever a request comes for http://domainname/mysite/page1.html it serves /content/mysite/page1.html

 

Cache generated : /mysite/page1.html in docroot folder

 

Once the page data is updated by the feed, we need to clean the cache.

 

I am trying to manually clean the cache by making following  POST request at http://domainname/dispatcher/invalidate.cache with parameters

CQ-Action: Activate
CQ-Handle:
/mysite

Content-Length: 0


It returns 201 with following but the cache is not deleted.  Am I doing something wrong ?

 

 

Any help will be much appreciated.

 

Regards,

-Yogesh

I'm getting a 403 forbidden error message on publish instance

$
0
0

I am using Adobe CQ 5.5 and I have some components using clientlibs folder (css + js).

 

On the author instance everything seems to work just fine.

 

The problem is when i go to the publish instance ... I get 403 forbidden errors when it tried to reach the js and css URLs.

 

Any ideas why?

 

Thanks!

Horacio.-

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

Viewing all 12476 articles
Browse latest View live




Latest Images