Friday, April 3, 2015

How to create different renditions for the Image in AEM/Adobe CQ5?

How to create different renditions for the Image in AEM/Adobe CQ5?

While uploading the images to DAM,Adobe Experience Manager(AEM) will create renditions of an image that include different sizes of the same image.This can be helpful when we need to create thumbnails or smaller views of large, high-resolution images.



We can configure the DAM Update Asset workflow to create the different renditions.
  • Login to http://localhost:4502/etc/workflow/models/dam/update_asset.html
  • In the workflow model select the thumbnail creation step and edit, in the process tab of the step we can add custom rendition values.
  • Save the workflow




How to use HTML5 adaptive image in AEM/Adobe CQ5?

How to use HTML5 adaptive image in AEM/Adobe CQ5?

This post will explain how to use HTML5 adaptive image in Adobe Experience Manager(AEM)

The srcset attribute in HTML5 <img> element, allows us to specify different images for varying viewport widths and pixel densities. This allows us to load a larger image for new high resolution devices while displaying lower resolution images for others

<img src="image-src.png" srcset="image-1x.png 1x, image-2x.png 2x,image-3x.png 3x, image-4x.png 4x">

The width also can be specified to select the images.

<img src="small.jpg" srcset="medium.jpg 1000w, large.jpg 2000w" alt="Sample Image">

While uploading the images to DAM, Adobe CQ5 will create renditions of an image that include different sizes of the same image.This can be helpful when we need to create thumbnails or smaller views of large, high-resolution images.


The original or different rendition images can be used in HTML5 Adaptive image to display the images based on pixel density of the device,  browser will serve the image based on the resolution of the client.

<img src="/content/dam/Albin/Untitled.jpg/jcr:content/renditions/original" srcset="/content/dam/Albin/Untitled.jpg/jcr:content/renditions/cq5dam.thumbnail.319.319.png 1x,/content/dam/Albin/Untitled.jpg/jcr:content/renditions/original" alt="Sample Image">


Saturday, March 28, 2015

NullPointerException: currentDesign.getDoctype(currentStyle).toRequest(request) - AEM/Adobe CQ5

NullPointerException:  currentDesign.getDoctype(currentStyle).toRequest(request) - AEM/Adobe CQ5

We were getting the NullpoiterException while accessing the pages in Adobe Experience Manager(AEM)

Caused by: java.lang.NullPointerException
at org.apache.jsp.apps.sample.design.components.pages.pageShell.pageShell_jsp._jspService(pageShell_jsp.java:227)
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:502)
... 117 more

NullpointerException is thrown while getting the Doctype of the page design.

if (currentDesign != null) {
        currentDesign.getDoctype(currentStyle).toRequest(request);
    }

This issue was getting resolved after restarting the server.

After analysis the currentDesign  and currentStyle objects are not null and getDoctype method is throwing NullpoiterException.

The currentStyle  refers to the path (currentStyle.getPath())- /etc/designs/default.

By default /etc/designs/default/jcr:content path will not have cq:doctype property specified.

To resolve the issue we have added the  cq:doctype - html_5 property to /etc/designs/default/jcr:content

doctype_html5

If the property is already available then delete the same and add again.


Sunday, March 22, 2015

How to enable SSL debug tracing in Weblogic Server?

How to enable SSL debug tracing in Weblogic Server?

Add the following start up options to the start up file startWebLogic.cmd/startWebLogic.sh or startManagedWebLogic.cmd/startManagedWebLogic.sh based on which file is used to start the server to enable SSL debug tracing in Weblogic Server.

JAVA_OPTIONS="${JAVA_OPTIONS} -Dweblogic.debug.DebugSecuritySSL=true -Dweblogic.debug.DebugSSL=true -Dweblogic.StdoutDebugEnabled=true -Dweblogic.log.StdoutSeverityLevel=Debug -Dweblogic.log.LogSeverity=Debug"



Invocation of https/SSL service is not working from OSB

Invocation of https/SSL service is not working from OSB

We were trying to install the wildcard certificate to enable the communication from OSB to end system, but the following exception was displayed in the log file and also the communication to the end system is failing even though the certificate installation was successful;

<Jan 23, 2015 10:45:05 PM PST> <Notice> <Security> <localhost> <AdminServer> <[ACTIVE] ExecuteThread: '12' for queue: 'weblogic.kernel.Default (self-tuning)'> <<anonymous>> <> <bac54c313ca42523:46f5522b:14b61066510:-7ffd-000000000008b798> <1423456801909> <BEA-090898> <Ignoring the trusted CA certificate "CN=*.sample.com,O=Sample,L=Sample,ST=Sample,C=US". The loading of the trusted certificate list raised a certificate parsing exception PKIX: Unsupported OID in the AlgorithmIdentifier object: 1.2.840.113549.1.1.11.> 
After analysis, we found that JSSE flag should be enabled along with Custom Host Name Verification (weblogic.security.utils.SSLWLSWildcardHostnameVerifier) to support wildcard certificate.

ssl_config

 After enabling the JSSE flag, none of the https communication from OSB is working but https communication from BPEL is working fine even with the wildcard certificate(BPEL and OSB is running in the same server).

The following exception is thrown while invoking the https service from OSB.

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server</faultcode>
<faultstring>
BEA-380000: General runtime error: java.lang.NullPointerException
</faultstring>
<detail>
<con:fault xmlns:con="http://www.bea.com/wli/sb/context">
<con:errorCode>BEA-380000</con:errorCode>
<con:reason>
General runtime error: java.lang.NullPointerException
</con:reason>
<con:location>
<con:node>RouteToSFDC_SearchService_BS</con:node>
<con:path>request-pipeline</con:path>
</con:location>
</con:fault>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>

This is the internal OSB server issue; the cause of the issue is that the AsyncResponseHandler does not properly register JSSEFilter for JSSE SSL.
The Weblogic patch 11866509 based on the Weblogic server version (this issues is identified in Weblogic server version 10.3.4 and 10.3.5) should be installed to resolve the issue.