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

CRXDE and CQ5.2 connection problems

$
0
0

Hi all, I'm sure this is a pathetically easy question but I'm a noob and struggling getting started. The company I am working with has CQ5.2 which (apparently) does not CRXDE Lite available for development. I am on a Mac (OSX Mountain Lion). I thought CRXDE would be the answer but I have fallen at the first hurdle. I have the URL of the development instance of the site but CRXDE will not connect and generates the error: "Error initializing workspace: Error during IDE initialization".

 

The reason I'm asking the question is that I don't know if this is a mismatch between CRX version and CRXDE, a Mac issue, or is it that CQ5.2 is out of date etc?

 

For brevity, my set-up is as follows:

CRX 1.4.2

CQ5.2

OSX Mountain Lion (10.8.2)

CRXDE 1.0.1

 

Where am I going wrong? Any help will be massively appreciated.


request.getParameter() not working correctly for Check Boxes!

$
0
0

Hi,

I am writing my own custom form action in cq5.4 and I need to access the fields of my form. I have a checkbox component on my form named 'cbox' and now I want to access it.

 

So this is the code I'm writing in the JSP

String name = request.getParameter("cbox");

 

But when I fill up the data on the form and submit it.. I only get the first element of the checkbox which I had selected. So suppose if the checkbox was having some options..

a

b

c

d

and if I selected b and d then I only get 'b'.

 

Actually the type of the name variable must be String Array. But when I do..

String[] name = request.getParameter("cbox");

//it gives me compilation error saying cannot convert from String to String[]

 

I cannot understand whats happening here. Can someone help me? How do I find out that which options has the user checked?

 

Thanks!

Where is Content Explorer in CQ 5.5?

$
0
0

Hello,

 

I have tried to use Content Explorer with CQ 5.5. Going to the url, <host>:<port>/crx/, no longer shows the CRX console. What is the new URL for the Content Explorer and the Content Loader?

 

Xavi

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!

column wise fields in dialog

$
0
0

Hi,

Can we arrange textfields, checkbox and other field types in multiple colum wise instead of showing it in row wise in a dialog widget?

 

Can we use xtype: grid for adding textfields/checkboxed in row colum wise?

 

Thanks

/libs/cq 404 error

$
0
0

I am getting a 404 for my pages when trying to download the userinfo.json and dict.en.json from /libs/cq folder.  What causes those two files to be included?

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 cancel inheritance by default for particular components in live copy which is created based o

$
0
0

how to cancel inheritance by default for particular components in live copy which is created based on a blueprint


How to create a package programmatically?

$
0
0

Can anyone suggest me how I can create a package of selected paths programmatically?

How to move assets in different directory using java service

$
0
0

Hi,

 

We are working on a requiment in CQ5 DAM where we need to move assets into different directories using java program (java content APIs) based on some triggering condition (i.e creation of assets/modification of assets).

 

Please help me getting the code to move assets.

 

Thanks,
Sachin Srivastava

How to order Standard HTTP Filter as OSGI components

$
0
0

I have an issue where I would like to order 2 standard filters deployed as OSGI components on Adobe CQ5.5 - Apache Felix console - so that filter A should run first and filter B should run second in the sequence. Do you know if there is any OSGI or SCR property which can order 2 filters in sequence so that one should run after another?

 

For example:

 

Filter A

 

@Component

@Service @org.apache.felix.scr.annotations.Properties({

         @Property(name = "pattern", value = "/.*"),

        @Property(name = Constants.SERVICE_RANKING, intValue = 99999, propertyPrivate = false)

})

public class FilterA implements implements javax.servlet.Filter  { }

 

FilterB

 

@Component

@Service @org.apache.felix.scr.annotations.Properties({

        @Property(name = "pattern", value = "/.*"),

        @Property(name = Constants.SERVICE_RANKING, intValue = 100000, propertyPrivate = false)

})

public class FilterB implements implements javax.servlet.Filter  { }

 

I would like to run FilterA first and then FilterB. If I deploy the above filters as OSGI bundle on CQ5.5 then I only see FilterB is registered on the HTTP White board console. I do not see FilterA being even registered on Http White board or being invoked in request flow. Thanks.

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

CQ5.5 and ldap integration/synchronization

$
0
0

Hi,

 

I have been trying to integrate ldap with CQ5.5 on Win7 machine. Following are the steps I have taken:

 

1. Installed cq-service-pack-5.5.2.20121012.zip

 

2. Installed cq-update-pkg-5.5.10.zip

 

1. Created F:/installed/cq5/author/crx-quickstart/conf/ldap_login.conf file with following content:

 

com.day.crx {   com.day.crx.core.CRXLoginModule optional   tokenExpiration="1800000";   com.day.crx.security.ldap.LDAPLoginModule required              principal_provider.class="com.day.crx.security.ldap.principals.LDAPPrincipalProvider"              tokenExpiration="1800000"              host="xx.xx.xx.xx"              port="636"              secure="true"              authDn="adt\\taduser"              authPw="xxxxxx"              userRoot="OU=publish,OU=people,DC=adt,DC=com"              userIdAttribute="userPrincipalName"              autocreate="create"              autocreate.path="none"              autocreate.user.firstName="rep:firstName"              autocreate.user.mail="profile/email"              autocreate.user.sn="profile/familyName"              autocreate.user.cn="rep:fullname"              groupRoot="OU=publish,OU=group,DC=adt,DC=com"              groupNameAttribute="CN"              autocreate.group.description="description"              autocreate.group.cn="rep:groupName"              groupMembershipAttribute="member"              userFilter="(objectClass=person)"              groupFilter="(objectClass=group)"              cache.expiration="1"              cache.maxsize="1";
};

 

2. Updated F:\installed\cq5\author\crx-quickstart\repository\repository.xml with:

 

<?xml version="1.0" encoding="ISO-8859-1"?><!-- ======================================================================= --><!-- $Id: repository-template.xml 78567 2011-06-16 04:27:03Z tripod $ --><!-- ======================================================================= --><!-- Copyright (c) 1997-2008 Day Management AG                               --><!-- Barfuesserplatz 6, 4001 Basel, Switzerland                              --><!-- All Rights Reserved.                                                    --><!--                                                                         --><!-- This software is the confidential and proprietary information of        --><!-- Day Management AG, ("Confidential Information"). You shall not          --><!-- disclose such Confidential Information and shall use it only in         --><!-- accordance with the terms of the license agreement you entered into     --><!-- with Day.                                                               --><!-- ======================================================================= --><!DOCTYPE Repository PUBLIC "-//Day Management AG//DTD CRX 2.4//EN"                            "http://www.day.com/dtd/repository-2.4.dtd"><Repository>    <!--    virtual file system where the repository stores global state    (e.g. registered namespaces, custom node types, etc.)    -->    <!--    <FileSystem class="com.day.jackrabbit.fs.cq.CQFileSystem">        <param name="path" value="${rep.home}/repStore.dat"/>        <param name="autoRepair" value="false"/>    </FileSystem>    -->    <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">        <param name="path" value="${rep.home}/repository"/>    </FileSystem>    <!--    large binary objects are stored in the data store.    -->    <DataStore class="com.day.crx.core.data.ClusterDataStore"/>    <!--    security configuration    -->    <Security appName="com.day.crx">        <!--            security manager:            class: FQN of class implementing the JackrabbitSecurityManager interface        -->        <!--SecurityManager class="com.day.crx.core.CRXSecurityManager" workspaceName="" -->        <SecurityManager class="com.day.crx.core.CRXSecurityManager">        <!-- LDAP related configuration -->                        <WorkspaceAccessManager class="org.apache.jackrabbit.core.security.simple.SimpleWorkspaceAccessManager"/>                        <UserManager class="com.day.crx.core.CRXUserManagerImpl">                        <param name="usersPath" value="/home/users"/>                        <param name="groupsPath" value="/home/groups"/>                        <param name="defaultDepth" value="1"/>                        </UserManager>            <!--            optional user manager configuration            <UserManager class="org.apache.jackrabbit.core.security.user.UserPerWorkspaceUserManager">                <param name="usersPath" value="/home/users"/>                <param name="groupsPath" value="/home/groups"/>                <param name="defaultDepth" value="1"/>                <param name="autoExpandTree" value="true"/>                <AuthorizableAction class="org.apache.jackrabbit.core.security.user.action.AccessControlAction">                  <param name="groupPrivilegeNames" value="jcr:read"/>                  <param name="userPrivilegeNames" value="jcr:all"/>                </AuthorizableAction>                AuthorizableAction class="com.day.crx.core.ntlm.NTLMAuthorizableAction"/>            </UserManager> -->            <!--            optional workspace access manager configuration           -->        </SecurityManager>                    <!--        access manager:        class: FQN of class implementing the AccessManager interface        -->        <AccessManager class="org.apache.jackrabbit.core.security.DefaultAccessManager"></AccessManager>        <!--        Use LoginModule authenticating against repository itself
-->        <LoginModule class="com.day.crx.core.CRXLoginModule">            <param name="anonymousId" value="anonymous"/>            <param name="adminId" value="admin"/>            <param name="disableNTLMAuth" value="true"/>            <param name="tokenExpiration" value="43200000"/>            <!-- param name="trust_credentials_attribute" value="d5b9167e95dad6e7d3b5d6fa8df48af8"/ -->        </LoginModule>    </Security>    <!--    location of workspaces root directory and name of default workspace    -->    <Workspaces rootPath="${rep.home}/workspaces" defaultWorkspace="crx.default" maxIdleTime="5"/>    <!--    workspace configuration template:    used to create the initial workspace if there's no workspace yet    -->    <Workspace name="${wsp.name}" simpleLocking="true">        <!--        virtual file system of the workspace:        class: FQN of class implementing FileSystem interface        -->        <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">            <param name="path" value="${wsp.home}"/>        </FileSystem>        <!--        persistence manager of the workspace:        class: FQN of class implementing PersistenceManager interface        -->        <PersistenceManager class="com.day.crx.persistence.tar.TarPersistenceManager"/>        <!--        Search index and the file system it uses.        -->        <SearchIndex class="com.day.crx.query.lucene.LuceneHandler">            <param name="path" value="${wsp.home}/index"/>            <param name="resultFetchSize" value="50"/>        </SearchIndex>        <!--        Workspace security configuration        -->        <WorkspaceSecurity>            <AccessControlProvider class="org.apache.jackrabbit.core.security.authorization.acl.ACLProvider">                <param name="omit-default-permission" value="true"/>            </AccessControlProvider>        </WorkspaceSecurity>        <!--        XML Import configuration of the workspace        -->        <Import>            <ProtectedItemImporter class="org.apache.jackrabbit.core.xml.AccessControlImporter"/>            <ProtectedItemImporter class="org.apache.jackrabbit.core.security.user.UserImporter">                <param name="importBehavior" value="besteffort"/>            </ProtectedItemImporter>        </Import>    </Workspace>    <!--        Configures the versioning    -->    <Versioning rootPath="${rep.home}/version">        <!--            Configures the filesystem to use for versioning of the respective            persistence manager        -->        <FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">            <param name="path" value="${rep.home}/version"/>        </FileSystem>        <!--            Configures the persistence manager to use for the versioning.            Please note, that the current versioning implementation is based on            a 'normal' persistence manager, but this could change in future            implementations.        -->        <PersistenceManager class="com.day.crx.persistence.tar.TarPersistenceManager"/>    </Versioning>    <!--        Enable searching the /jcr:system subtree    -->    <SearchIndex class="com.day.crx.query.lucene.LuceneHandler">        <param name="path" value="${rep.home}/repository/index"/>    </SearchIndex>    <!--        Cluster configuration.    -->    <Cluster>        <Journal class="com.day.crx.persistence.tar.TarJournal"/>    </Cluster>    <!--        Configures extension modules    -->    <Modules>        <!--           Sample configuration of an EventLoggerModule requiring configuration           <Module class="com.day.crx.eventlogger.EventLoggerModule">               <param name="workspaces" value="crx.default"/>               <param name="logWorkspace" value="crx.logger"/>               <param name="logPath" value="/logger"/>           </Module>        -->    </Modules></Repository>

 

3. Updated F:\installed\cq5\author\crx-quickstart\bin\quickstart.bat with:

 

@echo off
:: This script configures the start information for this server.
::
:: The following variables may be used to override the defaults.
:: For one-time overrides the variable can be set as part of the command-line; e.g.,
::
::     SET CQ_PORT=1234 & ./start.bat
::
setlocal


::* TCP port used for stop and status scripts
set CQ_PORT=4502


::* http host name
:: set CQ_HOST=


::* interface that this server should listen to
:: set CQ_INTERFACE=eth0


::* show gui
set CQ_GUI=true


::* do not show browser on startup
set CQ_NOBROWSER=true


::* do not redirect stdout/stderr (logs to console)
set CQ_VERBOSE=true


::* do not fork the JVM
:: set CQ_NOFORK=true


::* force forking the VM using recommended default memory settings
:: set CQ_FORK=true


::* additional arguments for the forked JVM
:: set CQ_FORKARGS=


::* runmode(s)
set CQ_RUNMODE=author,dev


::* defines the path under which the quickstart work folder is located
:: set CQ_BASEFOLDER=


::* low memory action
:: set CQ_LOWMEMACTION=


::* name of the jarfile
:: set CQ_JARFILE=


::* use jaas.config
:: set CQ_USE_JAAS=true


::* config for jaas
set CQ_JAAS_CONFIG=F:/installed/cq5/author/crx-quickstart/conf/ldap_login.conf


::* default JVM options
set CQ_JVM_OPTS=-Djava.security.auth.login.config=F:/installed/cq5/author/crx-quickstart/conf/ldap_login.conf -Xms1024m -Xmx1024m  -XX:PermSize=256M -XX:MaxPermSize=256M -XX:+UseConcMarkSweepGC -XX:NewRatio=1 -XX:CMSInitiatingOccupancyFraction=85 -XX:ParallelGCThreads=4 -XX:GCTimeRatio=3 -XX:+UseParNewGC -XX:-UseGCOverheadLimit -XX:SurvivorRatio=6 -Xloggc:F:/installed/cq5/author/crx-quickstart/gc.log -verbose:gc -XX:+PrintGCTimeStamps  -XX:+HeapDumpOnOutOfMemoryError -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9998 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.awt.headless=true


::* ------------------------------------------------------------------------------
::* do not configure below this point
::* ------------------------------------------------------------------------------


chdir /D %~dp0
cd ..\..
set START_OPTS=-use-control-port
if defined CQ_PORT            set START_OPTS=%START_OPTS% -p %CQ_PORT%
if defined CQ_INTERFACE       set START_OPTS=%START_OPTS% -a %CQ_INTERFACE%
if defined CQ_GUI             set START_OPTS=%START_OPTS% -gui
if defined CQ_NOBROWSER       set START_OPTS=%START_OPTS% -nobrowser
if defined CQ_VERBOSE         set START_OPTS=%START_OPTS% -verbose
if defined CQ_NOFORK          set START_OPTS=%START_OPTS% -nofork
if defined CQ_FORK            set START_OPTS=%START_OPTS% -fork
if defined CQ_FORKARGS        set START_OPTS=%START_OPTS% -forkargs %CQ_FORKARGS%
if defined CQ_RUNMODE         set START_OPTS=%START_OPTS% -r %CQ_RUNMODE%
if defined CQ_BASEFOLDER      set START_OPTS=%START_OPTS% -b %CQ_BASEFOLDER%
if defined CQ_LOWMEMACTION    set START_OPTS=%START_OPTS% -low-mem-action %CQ_LOWMEMACTION%
if defined CQ_HOST            set START_OPTS=%START_OPTS% -Dorg.apache.felix.http.host=%CQ_HOST%
if defined CQ_USE_JAAS        set START_OPTS=%START_OPTS% -Djava.security.auth.login.config=%CQ_JAAS_CONFIG%
if not defined CQ_JARFILE     for %%X in (*.jar) do set CQ_JARFILE=%%X


tasklist > oldTaskList.txt
start "CQ" cmd.exe /K java %CQ_JVM_OPTS% -jar %CQ_JARFILE% %START_OPTS%
tasklist > newTaskList.txt
java -cp %~dp0 GetProcessID oldTaskList.txt newTaskList.txt java.exe > crx-quickstart\conf\cq.pid
del newTaskList.txt
del oldTaskList.txt

 

 

4. Started CQ5 by double-clicking F:\installed\cq5\author\crx-quickstart\bin\quickstart.bat

 

Issue: I am not able to see the domain "com.adobe.granite.ldap" in http://localhost:4502/system/console/jmx

 

I am not sure what have I done wrong. Please let me know how can I synchronize all the users from LDAP into CRX.

 

Thanks in advance,

Anurag

SQL2 | How to add condition on multi-value field?

$
0
0

Hello,

 

I am trying to perform a JCR query using SQL2 in CQ5.6. For one of the conditions, I wish to compare a multi-value field (E.g. cq:tags).

 

How would that be possible? Currenlt, I only managed to compare my query item's cq:tags to a single value (e.g. WHERE page.[cq:tags]='mynspace:mytag').

 

Also, is there a syntax reference for SQL2 queries? Currently I have only managed to find something tanglible here : http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-spi-commons/src/test/resources/or g/apache/jackrabbit/spi/commons/query/sql2/test.sql2.txt?view=markup

 

Best regards, thanks in advance,

K.

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


How to trigger an email when workflow instance fails??

$
0
0

Hello,

 

We have a requirement where in a mail should be triggered to the system administrator in case a workflow instance fails.

 

I tried setting up a launcher (to trigger a Test Workflow that sends mail) with following configuration but it doesn't get triggered.

 

Launcher_WF.jpg

The same launcher on cq:workflow node modification under /etc/workflow/instances/....... triggers my Test workflow if I change the Launcher Glob Path to /etc/workflow(/.*)

 

So, I have a couple of questions:

  • Is this feature is available out of the box in CQ 5.6?
  • If not, then how should this requirement be implemented?

 

Thanks!!

Annotation in custom components

$
0
0

How can i enable annotation for my custom built components ?

Calculation of jcr:score in CQ5

$
0
0

Hi,

 

We are running a JCR SQL2 query to perform search over the content within pages. We have come across a clause "order by jcr:score" which I assume will be ordering the search results but I am not sure what is the ordering criteria. When i looked through the JCR specification at http://www.day.com/specs/jcr/1.0/6.6.5.3_jcr_score_function.html it suggests that "how this value is calculated is left up to the implementation" . I am not sure what implementation is referred to here - is it referring to Jackrabbit implementation?

 

Has anyone used jcr:score in their applications and could help shed some light on what it means and how does the ordering work in case of a searches on cq:pagecontent nodes.

 

Thank you for your time.

 

Thanks and Regards,

Anoop Kumar

Dispatcher Flush Agent on Publisher not invalidating cache

$
0
0

Hi all,

 

We're having an issue with invalidating that cache apon activation/replication of content, but only from the Publish flush agent.  I've copied the default flush agent on the Publish instance, updated the URI to point to my dispatcher, and enabled the agent.  Clicking Test Connection shows a successful connection to the dispatcher.  Also, I can see that the .stat file has been created at the web root on the dispatcher (I'm not specifying a specific statsfile or a statsfile level in the dispatcher.any).  When I change a setting in the publisher flush agent and save it, or stop and start it, the .stat file is updated.  So I know the Publisher is able to correctly reach the dispatcher and pass along the invalidate message to update the .stat file.

 

When I replicate a node from Author the Publisher, I see the following in the Publisher error.log:

 

22.05.2013 04:23:23.241 *INFO* [ObservationManager] com.day.cq.wcm.core.impl.components.ComponentCacheImpl Detecting component change. invalidating cache.

22.05.2013 04:23:23.245 *INFO* [10.20.30.40 [1369196603165] POST /bin/receive HTTP/1.1] com.day.cq.replication.impl.content.durbo.DurboImporter imported content in 79ms for durbo request on path: /apps/my-project/components/page/base/footer.jsp

22.05.2013 04:23:23.245 *INFO* [10.20.30.40 [1369196603165] POST /bin/receive HTTP/1.1] com.day.cq.replication.impl.servlets.ReplicationServlet Processed replication action in 79ms: ACTIVATE of /apps/my-project/components/page/base/footer.jsp

 

However when I check the dispatcher, I see that the .stat file has not had its timestamp updated.  I've also noticed that when I change the node and replicate it, the 'Detecting component change. invalidating cache.' log line above does not always appear in the log file - it appears only sometimes with the other 2 long lines.  This part seems random.

 

In my testing, I've also created a Dispatcher Flush agent on the Author instance (after disabling the one on the Publish instance), and 100% of the time when I replicate the /apps/my-project/components/page/base/footer.jsp to the Publisher, the Author flush agent correctly updates the .stat file timestamp.  So I'm 100% confident that the file I'm editing is able to be cached, and that changing and replicating it does update the .stat file.

 

Just never from the Publish flush agent!

 

I've tried all combinations of trigger settings on the Publish agent to no avail.  I've also inspected the properties of the agent in CRXDE Lite, and I can't see anything that the Author agent has and the publish agent is missing!

 

I've also tried creating the Publish agent by copying the default one from the tools console and updating the URI, creating a Publish agent on the Author and replicating it to the Publisher, and also creating it directly on the Publisher via curl calls - all of these methods seem to create a valid dispatcher flush agent on the Publisher that successfully connects to the dispatcher (confirmed by a successful 'Test Connection' click after creating), but none of them ever update the .stat file on the dispatcher after content replication.

 

Any thoughts here on where else to look would be greatly appreciated!!

 

Cheers,

K

Parse json data from inputstream using org.apache.sling.commons.json library

$
0
0

I had two options to receive the input stream data either xml or json. I decided to go to the json route.

 

I am getting complex input data from an API in the json format. Can someone tell me how do I parse this data using the sling API org.apache.sling.commons.json? A sample java code will be great. I tried the GSON but because my data is complex it is not helping me. Any help will be great.

Viewing all 12476 articles
Browse latest View live


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