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

CRXDE Unable to connect to repository

$
0
0

Hello all,

 

I'm having trouble connecting CRXDE to my CQ5.5 repository with a particular server configuration.  When trying to login/connect to my server, I get the following messages popup from the CRXDE app:

 

"Error initializing workspace: No file system is defined for scheme: jcr"

 

Whe I click this away, another popup appear with:

 

"An error has occurred.  See the log file D:\users\kristian\.crxde\.metadata\.log."

 

After clicking that message away, CRXDE closes.

 

The output of the log file is:

 

 

!SESSION 2013-01-20 11:06:21.994 -----------------------------------------------

eclipse.buildId=unknown

java.version=1.7.0_07

java.vendor=Oracle Corporation

BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_AU

Command-line arguments:  -os win32 -ws win32 -arch x86_64

 

!ENTRY org.eclipse.osgi 4 0 2013-01-20 11:06:55.166

!MESSAGE Application error

!STACK 1

java.lang.reflect.InvocationTargetException

          at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:121)

          at com.day.cq.ide.CQDEApplication.start(CQDEApplication.java:62)

          at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)

          at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLau ncher.java:110)

          at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.jav a:79)

          at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)

          at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

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

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

          at java.lang.reflect.Method.invoke(Unknown Source)

          at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)

          at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)

          at org.eclipse.equinox.launcher.Main.run(Main.java:1311)

          at org.eclipse.equinox.launcher.Main.main(Main.java:1287)

Caused by: org.eclipse.core.runtime.CoreException: No file system is defined for scheme: jcr

          at org.eclipse.core.internal.filesystem.Policy.error(Policy.java:55)

          at org.eclipse.core.internal.filesystem.Policy.error(Policy.java:50)

          at org.eclipse.core.internal.filesystem.InternalFileSystemCore.getFileSystem(InternalFileSys temCore.java:65)

          at org.eclipse.core.internal.filesystem.InternalFileSystemCore.getStore(InternalFileSystemCo re.java:107)

          at org.eclipse.core.filesystem.EFS.getStore(EFS.java:350)

          at com.day.cq.ide.fs.JCRFileSystemPlugin.registerExtensions(JCRFileSystemPlugin.java:100)

          at com.day.cq.ide.init.SetupWorkspaceOperation.initWorkspace(SetupWorkspaceOperation.java:16 6)

          at com.day.cq.ide.init.SetupWorkspaceOperation.execute(SetupWorkspaceOperation.java:119)

          at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106)

          at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1800)

          at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118)

          ... 14 more

Root exception:

org.eclipse.core.runtime.CoreException: No file system is defined for scheme: jcr

          at org.eclipse.core.internal.filesystem.Policy.error(Policy.java:55)

          at org.eclipse.core.internal.filesystem.Policy.error(Policy.java:50)

          at org.eclipse.core.internal.filesystem.InternalFileSystemCore.getFileSystem(InternalFileSys temCore.java:65)

          at org.eclipse.core.internal.filesystem.InternalFileSystemCore.getStore(InternalFileSystemCo re.java:107)

          at org.eclipse.core.filesystem.EFS.getStore(EFS.java:350)

          at com.day.cq.ide.fs.JCRFileSystemPlugin.registerExtensions(JCRFileSystemPlugin.java:100)

          at com.day.cq.ide.init.SetupWorkspaceOperation.initWorkspace(SetupWorkspaceOperation.java:16 6)

          at com.day.cq.ide.init.SetupWorkspaceOperation.execute(SetupWorkspaceOperation.java:119)

          at org.eclipse.ui.actions.WorkspaceModifyOperation$1.run(WorkspaceModifyOperation.java:106)

          at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1800)

          at org.eclipse.ui.actions.WorkspaceModifyOperation.run(WorkspaceModifyOperation.java:118)

          at com.day.cq.ide.CQDEApplication.start(CQDEApplication.java:62)

          at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194)

          at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLau ncher.java:110)

          at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.jav a:79)

          at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:368)

          at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)

          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

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

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

          at java.lang.reflect.Method.invoke(Unknown Source)

          at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)

          at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)

          at org.eclipse.equinox.launcher.Main.run(Main.java:1311)

          at org.eclipse.equinox.launcher.Main.main(Main.java:1287)

 

 

The error.log on the CQ5 instance outputs the following when trying to connect:

 

20.01.2013 11:47:04.232 *WARN* [123.456.789.012 [1358642824230] GET /bin/crxde.classpath.xml HTTP/1.1] com.day.crx.ide.CRXDEServlet bundle location is not an URI: System Bundle

20.01.2013 11:47:04.235 *INFO* [123.456.789.012 [1358642824230] GET /bin/crxde.classpath.xml HTTP/1.1] org.apache.jackrabbit.core.persistence.bundle.AbstractBundlePersistenceManager cachename=crx.defaultBundleCache[ConcurrentCache@2f202573], elements=2476, usedmemorykb=8188, maxmemorykb=8192, access=5024501, miss=864065

 

 

I know my CRXDE app is functional, as it does connect to a localhost instance, and also other remote instances.  Also, I get the same results from this server running CRXDE from different conputers with different Java versions.  So I have the feeling that my server setup here may have something to do with it, and I might need to tweak some OSGI settings somewhere, but I'm not sure what...

 

I use an Apache server as a gateway to my CQ5 servers.  The Apache server takes https requests (on 443, or 80 which auto-redirects to 443) and then uses a Reverse Proxy to send the traffic to the required CQ5 server based on the host name.  So https://mycq5auth.company.com hits my Apache server on port 443, and Apache then sends the traffic to an internal (non internet facing) CQ5 author server on port 4502.  CQ5 does it's thing, sends the traffic back to Apache, which then serves it back out on 443.

 

All of this works great in the browser - the entire CQ5 instance works, including the OSGI console, CRXDE Lite etc - everything.  Only the CRXDE app seems to be having issues with this config.

 

I've had a google around for solutions, but I haven't come across too much regarding these errors.

 

Anyone have any suggestions on what I might try to resolve this?

 

 

Thanks,

K


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

Inbox Notification from Workflow

$
0
0

Hi,

I've got a problem with Inbox Notification.

I want to inform an author about all steps during the workflow process (activated, deactivated, terminated) using Inbox Notification (not e-mail!)

I found a class InboxManagerImpl (method createMessage) so I create a method in ParticipantStepChooser class:

 

void sendTheNotification(WorkflowSession session) throws IOException {

com.day.cq.wcm.notification.inbox.impl.MessageImpl message = (MessageImpl) new InboxManagerImpl().createMessage(session.getUser());

message.setReason("Workflow has been Terminated");

message.save();

}

 

but after it, on my OSGi Console in CQ5, in the section Bundles I have sth like this:

com.day.cq.wcm.notification.inbox -- Cannot be resolved
com.day.cq.wcm.notification.inbox.impl -- Cannot be resolved

 

Can someone help me?

Question: How to create an Inbox Message (in Notification Inbox) using Java code?

 

Regards

Michal

is there anyway to update the node properties using query manager ?

$
0
0

I have to update few properties of specific nodes.    I am able to get them using httpclient or sql query  .  I would like to know ,how to write back to repository with new values ?   using either JCR or query builder ?

 

Any help apperciated.

 

 

I am getting info using 1) httpclient : 

 

DefaultHttpClient httpclient = new DefaultHttpClient();

        Credentials defaultcreds = new UsernamePasswordCredentials(this.getUsername(), this.getPassword());

       httpclient.getCredentialsProvider().setCredentials(AuthScope.ANY, defaultcreds);

        String request = this.host + "/bin/querybuilder.json";

          HttpPost httppost = new HttpPost(request);

        List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(2);

        nameValuePairs.add(new BasicNameValuePair("path", path));

        nameValuePairs.add(new BasicNameValuePair("type", "cq:Page"));

   httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));

        ResponseHandler<String> responseHandler = new BasicResponseHandler();

    String responseBody = httpclient.execute(httppost, responseHandler);

 

2) using sql query

SELECT*  FROM [nt:base] AS s WHERE ISDESCENDANTNODE([/path/to/node]) AND  s.[sling:resourceType]= CAST('some/thing/' AS STRING)

Creating a blueprint out of an existing livecopy

$
0
0

Hello,

 

We have a site in CQ 5.4 using roughly the following structure.

 

-/content/site/

               -/blueprint1/home/

                                   -/page1...

                                   -/page2...

               -/livecopy1/home/

                                   -/page1...

                                   -/page2...

               -/livecopy2/home/

                                   -/page1...

                                   -/page2...

 

ETC...

 

Now we would like to create a new blueprint out of livecopy2 that will follow the same structure so...

 

          -/livecopy2-copy1/home/

                                   -/page1...

                                   -/page2...

          -/livecopy2-copy2/home/

                                   -/page1...

                                   -/page2...

 

ETC...

 

 

After some testing, I can confirm this works, but only if /livecopy2 is pristine, meaning it has no cancelled inheritance from blueprint1. If it has any properties that have been modified (which I want to carry over to it's livecopies), the Site Admin gives me a message "Could not create Live Copy: Unable to remove Live Copy markers." And I see the following in the error log:

 

 

12.03.2013 12:33:20.943 *ERROR* [127.0.0.1 [1363106000934] POST /bin/wcmcommand HTTP/1.1] com.day.cq.wcm.msm.impl.commands.CreateSiteCommand Error during Live Copy creation. com.day.cq.wcm.api.WCMException: Unable to remove Live Copy markers

          at com.day.cq.wcm.msm.impl.Utils.detachLiveCopy(Utils.java:225)

          at com.day.cq.wcm.msm.impl.LiveCopyManager.remove(LiveCopyManager.java:213)

          at com.day.cq.wcm.msm.impl.LiveRelationshipManagerImpl.endRelationship(LiveRelationshipManag erImpl.java:308)

          at com.day.cq.wcm.msm.impl.commands.LiveCommand.createCopyTarget(LiveCommand.java:99)

          at com.day.cq.wcm.msm.impl.commands.LiveCommand.createLiveCopy(LiveCommand.java:145)

          at com.day.cq.wcm.msm.impl.commands.CreateLiveCopyCommand.performCommand(CreateLiveCopyComma nd.java:83)

          at com.day.cq.wcm.core.impl.commands.WCMCommandServlet$CommandHolder.performCommand(WCMComma ndServlet.java:149)

          at com.day.cq.wcm.core.impl.commands.WCMCommandServlet.performCommand(WCMCommandServlet.java :251)

          at com.day.cq.commons.servlets.AbstractCommandServlet.doPost(AbstractCommandServlet.java:49)

          at org.apache.sling.api.servlets.SlingAllMethodsServlet.mayService(SlingAllMethodsServlet.ja va:148)

          at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.jav a:344)

          at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.jav a:375)

          at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:491)

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

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

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

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

          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.mobile.core.impl.redirect.RedirectFilter.doFilter(RedirectFilter.java:287)

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

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

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

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

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

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

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

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

          at org.apache.sling.portal.container.internal.request.PortalFilter.doFilter(PortalFilter.jav a:76)

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

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

          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.security.impl.ReferrerFilter.doFilter(ReferrerFilter.java:249)

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

          at org.apache.felix.http.proxy.ProxyServlet.service(ProxyServlet.java:60)

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

          at org.apache.sling.launchpad.base.webapp.SlingServletDelegate.service(SlingServletDelegate. java:277)

          at org.apache.sling.launchpad.webapp.SlingServlet.service(SlingServlet.java:150)

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

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

          at com.day.j2ee.servletengine.FilterChainImpl.doFilter(FilterChainImpl.java:74)

          at com.day.crx.launchpad.filters.CRXLaunchpadLicenseFilter.doFilter(CRXLaunchpadLicenseFilte r.java:96)

          at com.day.j2ee.servletengine.FilterChainImpl.doFilter(FilterChainImpl.java:72)

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

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

          at com.day.j2ee.servletengine.ServletHandlerImpl.execute(ServletHandlerImpl.java:315)

          at com.day.j2ee.servletengine.DefaultThreadPool$DequeueThread.run(DefaultThreadPool.java:134 )

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

Caused by: com.day.cq.wcm.api.WCMException: Unable to remove Live Copy markers

          at com.day.cq.wcm.msm.impl.Utils.detachLiveCopy(Utils.java:274)

          at com.day.cq.wcm.msm.impl.Utils.detachLiveCopy(Utils.java:221)

          ... 70 more

Caused by: javax.jcr.nodetype.NoSuchNodeTypeException: Mixin cq:LiveRelationship not included in node /content/site/livecopy2-copy1/home/jcr:content

          at org.apache.jackrabbit.core.RemoveMixinOperation.perform(RemoveMixinOperation.java:87)

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

          at org.apache.jackrabbit.core.ItemImpl.perform(ItemImpl.java:91)

          at org.apache.jackrabbit.core.NodeImpl.removeMixin(NodeImpl.java:912)

          at org.apache.jackrabbit.core.NodeImpl.removeMixin(NodeImpl.java:2316)

          at com.day.cq.wcm.msm.impl.Utils.detachLiveCopy(Utils.java:249)

          ... 71 more

 

 

 

 

 

This kind of makes sense, because you can't cancel a live relationship before one actually exists, but there must be some sort of workaround to allow for this type of structure. We cannot be the only ones trying to use this CMS for multiple livecopy/blueprint relationship branches that share the same root. Does anyone have any ideas?

 

Thanks.

HowTo a Custom Replication Agent

$
0
0

Hi all

we face some requirements for which we are envisaging writing a custom replication agent.

From the reqs it would be something similat to the oob "static replication agent", however our retention and auditing requirements go a bit beyond the capabilities of the oob agent (representation of what the vistor has been "seeing", zip the files, include audit infos, identities, timestamps and resources...)

Also we have some specific integration cases with cq for which we require some static, file based representation of resources to be delivered to filesystems consumed by other applications/systems.

 

Is there any documentation or implementation example on how to create a custom replication agent? basically on the line of the oob static replication agent? (unluckily i wasn't able to find any)

Or does anyone a see a different approach?

 

Many thanks for feedback and sorry for the quite "wide open" question

 

My regards to everyone

An exception occurred processing JSP page /libs/cq/core/components/login/login.jsp at line 97

$
0
0

Hi All,

 

I am new to DAY CQ development. I installed jdk1.6.0_37 in my system. I started cq 5.5 jar on port 4502. When i start cq and open localhost:4502 in browser I am getting following exception "An exception occurred processing JSP page /libs/cq/core/components/login/login.jsp at line 97". PFA for more details and help in this

 

Thankscq login exception.jpg

Can I use regular expression in JCR QueryBuilder?

$
0
0

I want to find all the pages with cq:tag which end with "/testingtag"

 

is it possible to do so using ?

 

Are there any online tutorial on JCR QueryBuilder?

 

I tried something like that but unfortunately it is not showing what I expected to see

 

fulltext=testingtag$

type=cq:tags


Connect to JCR from Java via JcrUtils without WebDAV

$
0
0

Hi,

 

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

 

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

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

 

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

 

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

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

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

 

and then this exception when trying to get the session:

 

javax.jcr.nodetype.ConstraintViolationException: Method Not Allowed

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          ... 10 more

 

 

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

 

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

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

 

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

 

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

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

The following RepositoryFactory classes were consulted:

    org.apache.jackrabbit.commons.JndiRepositoryFactory: declined

    org.apache.jackrabbit.jcr2dav.Jcr2davRepositoryFactory: declined

    org.apache.jackrabbit.jcr2spi.Jcr2spiRepositoryFactory: declined

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

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

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

          java.io.EOFException

        because of EOFException: null

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

 

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

 

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

 

Thanks for the help,

K

How to limit path field selection only to one level?

$
0
0

Hi

 

Requirement:

 

      I have a pathfield where i have set a root path

 

for eg: /content/geometrix

 

 

req1.png

author shud be able to select only among these nodes. he shud not be able to select the child nodes of each individual nodes

 

eg: he can select /content/geometrixx/English

 

req2.png

 

 

but he shud not select child page of English

 

ie : /content/geometrixx/English/Toolbar shud not be assesible to him

 

req3.png

 

 

 

Hope my requirement is clear. Is there anyway we can achieve this.. If we can limit the nodes from expanding; then it would be very useful . Is there any way we can achieve this??

 

 

Thanks

 

Veena

Not generating OSGI-INF folder

$
0
0

Hi,

 

I am new to OSGI.I have been having trouble to get OSGI-INF folder in generated jar file. I need to have folder structure like as below

 

  • META-INF
  • OSGI-INF
  • Com.mine.cq

 

  I am using Eclipse and m2e plugin. When I run my project I am getting BUILD SUCCESS. And I am getting the below folder structure in the generated jar file. Jar does not have OSGI-INF folder.

 

  • META-INF
  • Com.mine.cq

 

Here is my POM.xml

 

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0http://maven.apache.org/xsd/maven-4.0.0.xsd">

          <modelVersion>4.0.0</modelVersion>

 

 

          <groupId>com.mine.cq</groupId>

          <artifactId>mineCore</artifactId>

          <version>0.0.1-SNAPSHOT</version>

          <packaging>jar</packaging>

 

 

          <name>mineCore</name>

          <url>http://maven.apache.org</url>

 

 

          <properties>

                    <file.encoding>utf-8</file.encoding>

          </properties>

          <build>

        <defaultGoal>install</defaultGoal>

        <plugins>

            <plugin>

                <groupId>org.apache.maven.plugins</groupId>

                <artifactId>maven-enforcer-plugin</artifactId>

                <version>1.0-alpha-3</version>

                <executions>

                    <execution>

                        <id>enforce-java</id>

                        <goals>

                            <goal>enforce</goal>

                        </goals>

                        <configuration>

                            <rules>

                                <requireMavenVersion>

                                    <message>Maven 2.0.7 or higher</message>

                                    <version>2.0.7</version>

                                </requireMavenVersion>

                                <requireJavaVersion>

                                    <message>Java 5 or higher</message>

                                    <version>1.5.0</version>

                                </requireJavaVersion>

                            </rules>

                        </configuration>

                    </execution>

                </executions>

            </plugin>

            <plugin>

                <groupId>org.apache.felix</groupId>

                <artifactId>maven-bundle-plugin</artifactId>

                <version>1.4.3</version>

                <extensions>true</extensions>

                <configuration>

                    <instructions>

                        <Export-Package>

                                                                      com.mine.cq.mineCore.*

                        </Export-Package>

                        <Import-Package>

                            *;resolution:=optional,

                            javax.servlet;version=2.4,

                            javax.servlet.http;version=2.4

                        </Import-Package>

                                                            <Private-Package>

                                                            </Private-Package>

                        <Embed-Dependency>  

                        </Embed-Dependency>

                    </instructions>

                </configuration>

            </plugin>

 

 

            <plugin>

                <groupId>org.apache.felix</groupId>

                <artifactId>maven-scr-plugin</artifactId>

                <version>1.9.0</version>

                <executions>

                    <execution>

                        <id>generate-scr-scrdescriptor</id>

                        <goals>

                            <goal>scr</goal>

                        </goals>

                    </execution>

                </executions>

            </plugin>

            <plugin>

                <groupId>org.apache.maven.plugins</groupId>

                <artifactId>maven-scm-plugin</artifactId>

                <version>1.0</version>

                <configuration>

                    <goals>install</goals>

                </configuration>

            </plugin>

        </plugins>

        <extensions>

            <extension>

                <groupId>org.apache.maven.wagon</groupId>

                <artifactId>wagon-webdav</artifactId>

                <version>1.0-beta-2</version>

            </extension>

            <extension>

                <groupId>org.apache.maven.wagon</groupId>

                <artifactId>wagon-ssh</artifactId>

                <version>1.0-beta-2</version>

            </extension>

        </extensions>

    </build>

<dependencies>

                    <dependency>

                              <groupId>junit</groupId>

                              <artifactId>junit</artifactId>

                              <version>3.8.1</version>

                              <scope>test</scope>

                    </dependency>

          </dependencies>

</project>

 

 

Why OSGI-INF folder is not in the .jar file? I need to set some property information in OSGO-INF folder since I have to register my component as a OSGI service. Please guide me to get it done.

 

Thanks,

Anderson

Handling Post requests to update node content

$
0
0

Hi ,

 

  I'm pretty new to CQ5 and trying to handle HTTP post request with my component .  My directory structure is

 

/apps/training/components/page/trainingpage/trainingpage.jsp

  /apps/training/components/page/trainingpage/trainingpage.POST.jsp

 

In my trainingpage.jsp ,

 

i have following

 

<form action="<%currentNode.getPath();%>.html" method="POST" enctype="multipart/form-data">

    <inputtype="text"name="name"/><br/>

    <inputtype="text"name="address"/><br/>

   <input type="submit" id="submit" value="Submit" title="submit" /> 

</form>   

</html>

 

When ever i submit this form  , i receive status 200 message with following and the properties gets appended at the root 'content ' and not at 'content\trainingsite'

 

Status

200

Message

OK

Location/content
Parent Location/
Path

/content

Refererhttp://localhost:4502/content/Trainingsite.html
ChangeLog

<pre>modified("/content/name");<br/></pre>

 

My assumtion is that the action url to my custom jsp is not being resolved and the default post servelt might be getting called which is updating the properties at the root content in the repository . I have even tried this case with updating my custom jsp file name from trainingpage.POST.jsp to POST.jsp but it's still the same .

 

The node path and resource path are returning as expected                             Node path :          /content/Trainingsite/jcr:content                    

                                                                                                                                   Resource path :     /content/Trainingsite/jcr:content

 

Any pointers for any missing links ? Thanks for your help .

 

cheers


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,

Problems with cURL: 500 internal error

$
0
0

Hi all

 

As there is no chance of getting daycare support  to take this request seriously I have taken to the forums; here is my issue I dont expect a resolution but would love if you could point out areas that are involved in this process or easy mistakes to make, here goes:

 

What i am trying to achieve:

to setup a script that will build and package and download it to the local server from the local server

 

server details:

aws ec2 instance

red hat os

plenty of system resource

CQ5.4

 

I have created an empty package with the filters: /content/mobile

 

This is the command I am running:

curl -u admin:pass -X POST http://servername:4502/crx/packmgr/service/.json/etc/packages/backup-test.zip?cmd=build

 

servernames I have tried (I would prefer to use localhost):

localhost

server author url (this utilises rewrites and may be problematic)

127.0.0.1

server ip

 

This is the output of the command:

<html><head><title>

500

 

Internal Server Error

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

Internal Server Error

</h1>

</body></html>

 

This is also logged in /CQ5UATStorageBlock/adobe/cq/author/crx-quickstart/logs/crx/error.log:

29.05.2013 13:24:22 *WARN * CRXSessionCache: Unable to retrieve session: javax.jcr.LoginException (CRXSessionCache.java, line 98)

 

However, when running these from an external source i.e my laptop:

curl -u admin:pass -X POST http://server ip:4502/crx/packmgr/service/.json/etc/packages/my_packages/backup-test.zip?cmd=build

curl -u admin:pass -X POST http://serverurl:4502/crx/packmgr/service/.json/etc/packages/my_packages/backup-test.zip?cmd=build

curl -u admin:pass -X POST http://serverurl/crx/packmgr/service/.json/etc/packages/my_packages/backup-test.zip?cmd=build

 

The response is:

{“success”:true,”msg”:”Package built”}

 

Please let me know your ideas I hope this is enough details to get the ball rolling.

look forward to hearing from you

Sam.

CQ Version / Release

$
0
0

How do I tell what CQ version / release level a given instance is running?


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.

Adding item to custom multifield

$
0
0

I've created a custom multifield (by registering a new xtype in the clientlibs folder) and everything appears great when I first open the edit dialog. However, when I click the 'Add Item +' link, the new set of fields appears correctly, BUT the container is getting set to fill the entire width of the dialog. As a result, the up/down ordering buttons get pushed out of view. The first item's width is fine, but each subsequent item that's added ignores the width and fills the entire dialog.

 

Has anyone come across a similar issue? How else can I control the width of the custom multifield? I know creating custom multifields can get tricky, but I've kept it relatively simple (a textfield, radio, and richtext). I'm sure more information is need, if so, I'll be more than happy to provide.

 

Any help is greatly appreciated. Thanks!

How to interact with external database in CQ5

$
0
0

Hi,

I need to interact with external database like SQL or Oracle to store some/fetch some data in CQ5. Can someone pls provide some help regarding the same. I guess I need to do it through JDBC. Please guide me step by step how to do this.

 

Thanks

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>

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.

Viewing all 12476 articles
Browse latest View live


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