Showing posts with label Adobe. Show all posts
Showing posts with label Adobe. Show all posts

Monday, 30 March 2015

Cloud Tech 101

“It went up, it went up to the cloud”
“You can’t get it down from the cloud?”

“Nobody understands the cloud, it’s a ****ing mystery.”

... says Cameron Diaz ! Well, here is something that should help !




[Update]: Here is the link to a more detailed article : http://mashable.com/2015/04/02/public-private-hybrid-cloud/?utm_cid=mash-com-Tw-main-link

Source: http://www.intel.in/content/www/in/en/cloud-computing/cloud-computing-innovation-infographic.html

Saturday, 14 December 2013

Types of Mobile Applications: Difference between Native, Hybrid and Web applications

There are many contradictory views on the various types of mobile applications that can be developed for mobile devices

Mainly most mobile applications can be-

1) Native Mobile Applications :
Completely coded using the sdk of the various platforms (like Android and iOS).
The language is used to implement both UI and functionality.
Native applications can use device functionality like camera,contacts et cetera.


2)Hybrid Mobile Applications:
Such applications use a skeleton native application and load web content in it
This web content may be static(where the served html,js,css etc are packaged with the application and reside on a users device) or dynamic (where the content is served from a server)
You can use the various HTML5 technologies and come up with an amazing user interface.
Hybrid applications can use device functionality like camera , contacts et cetera,thanks to the skeleton native application.

3)Mobile Web Application::
This is your traditional  web application loaded on a device browser (Eg : WebKit,Chrome,Firfox on Android)
This may be (or may not be) different from the application that loads in your desktop browser.
For example-m.facebook.com is the mobile web application of facebook.com
Application developers can customize their websites to load content more efficiently ,given the limited resources of a mobile device.
Mobile web applications cannot use device functionality


Check out this really cool video by Intel differentiating between how content is served in a mobile web application and in a hybrid mobile application.

Monday, 11 November 2013

Debugging application startup with plugins in Websphere Application Server

This post mainly addresses the errors observed during installing a application in Websphere Application Server . Most of the stuff I shall write about are generic to WAS 7 ,WAS 8 and WAS 8.5

1) So what happens when you install a new application through the WAS Admin console , and post successful installation it does not start ???

Observe the application startup logs in  your application server folder in profile
Eg : C:\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\server1
or C:\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\webserver1
Go through the logs and you should get idea of whats wrong.

2) If Step 1 fails , and the logs show only IBM related errors, then it might be a good idea to look for and install any applicable fixpaks. These fixpaks are cumulative so the latest should suffice

Eg: I was trying to install an application in WAS 8.5 and though the installation was successful , the applciation would not start .  The logs at C:\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\ffdc
said  :
[11/11/13 9:40:36:513 IST]     FFDC Exception:com.ibm.ws.exception.RuntimeError SourceId:com.ibm.ws.runtime.component.CompositionUnitMgrImpl ProbeId:679 Reporter:com.ibm.ws.runtime.component.CompositionUnitMgrImpl@e341fce8
com.ibm.ws.exception.RuntimeError: java.lang.RuntimeException: java.lang.ArrayIndexOutOfBoundsException
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:792)
..
..
..
Caused by: java.lang.ArrayIndexOutOfBoundsException
at org.objectweb.asm.ClassReader.readClass(Unknown Source)
at org.objectweb.asm.ClassReader.accept(Unknown Source)
at org.objectweb.asm.ClassReader.accept(Unknown Source)

Appeared to be an application issue,but after a lot of browsing realised that the fix was in one of the fixpaks
So stay on the latest fixpak if possible

Now what happens when you application has started successfully

1)Try to access your application through the application server port
Eg: http://localhost:9080/<context-root>/<web-page>

If this works well for you , that means the setup is correct
Otherwise,ensure that the URL you are accessing is correct, and simple html,jsp files etc are accessible

2) If you'r able to access your URL through the application server,but you are getting a 404 error on trying to access it through the web server ,follow the below mentioned steps :
-Make sure your http.conf has the following entries :
LoadModule was_ap22_module "C:\IBM\WebSphere\Plugins\bin\32bits\mod_was_ap22_http.dll"
WebSpherePluginConfig "C:\IBM\WebSphere\Plugins\config\webserver1\plugin-cfg.xml"

-Check your webserver logs  for errors
Eg : Ensure the follwoing text appears
[Mon Nov 11 12:57:52 2013] [notice] PLUGIN: mod_was_ap22_http: apache_log_header: WebSphere Plugins loaded.
[Mon Nov 11 12:57:52 2013] [notice] PLUGIN: mod_was_ap22_http: apache_log_header: --------------------Plugin Information-----------------------
[Mon Nov 11 12:57:52 2013] [notice] PLUGIN: mod_was_ap22_http: apache_log_header: Bld version: 8.5.0
[Mon Nov 11 12:57:52 2013] [notice] PLUGIN: mod_was_ap22_http: apache_log_header: Bld date: Apr 24 2012, 15:12:31
[Mon Nov 11 12:57:52 2013] [notice] PLUGIN: mod_was_ap22_http: apache_log_header: Webserver: IBM_HTTP_Server
[Mon Nov 11 12:57:52 2013] [notice] PLUGIN: mod_was_ap22_http: apache_log_header: --------------------------------------------------------------

My log had additional errors: 
File does not exist: C:/IBM/HTTPServer/htdocs/<application context-root>
Since plugins were configured ,this meant that the plugin-cfg.xml file was incomplete
Read on to know more ...

-plugin-cfg.xml
When any application has to be rerouted to the application server to the web server,plugins need to be generated specifically for that application . One plugin-cfg.xml file is updated(Operation "Generate plugins") and propagation involves pasting this file in the various app server,web server and dmgr locations (Operation "Propogate Plug In") . 

Sample locations :

C:\IBM\WebSphere\Plugins\config\webserver1\plugin-cfg.xml

C:\IBM\WebSphere\AppServer\profiles\Dmgr01\config\cells\CFWIN2012X64-4Cell01\nodes\CFWIN2012X64-4Node01\servers\webserver1\plugin-cfg.xml

C:\IBM\WebSphere\AppServer\profiles\AppSrv01\config\cells\CFWIN2012X64-4Cell01\nodes\CFWIN2012X64-4Node01\servers\webserver1\plugin-cfg.xml 

If any time a plugin-cfg.xml is created in the Dmgr01 file path ( as shown in sample location 2) , any changes made to the plugin-cfg.xml are not reflected to it.Hence it will always remain out of sync with the other plugin-cfg.xml files

 The trick is to make sure all the plugin-cfg.xml files are in sync,bear the same timestamp and content.just search plugin-cfg.xml files in your IBM roots,copy paste and restart web server.

This will also resolve the incomplete plugin-cfg.xml issue mentioned above


.

Monday, 1 April 2013

Increasing deployment timeout for jboss7.1.0

Sometimes EAR deployment fails as it needs more time to deply than the timeout specified in your JBOSS7.1 config files

In such cases we get errors like :


23:33:19,789 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "abc.ear" was rolled back with failure message Operation cancelled
23:33:19,795 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) JBAS015052: Did not receive a response to the deployment operation within the allowed timeout period [60 seconds]. Check the server configuration file and the server logs to find more about the status of the deployment.

Searching the standalone.xml file for timeout might not help if its a fresh install of jboss 7.1 as these values are default.
You have to explicitly set it in the standalone.xml file

Steps are as follows:

1)Stop jboss server
2)Goto jboss-as-7.1.0.Final/standalone/configuration
3)Edit standalone.xml file
4)Search for he following block of code

 <subsystem xmlns="urn:jboss:domain:deployment-scanner:1.1">
            <deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000"/>
        </subsystem>

In this case deployment timeout defaults to 60 seconds
5)Add deployment-timeout value

 <subsystem xmlns="urn:jboss:domain:deployment-scanner:1.1">
            <deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000" deployment-timeout="300"/>
        </subsystem>

Now the deployment timeout value has been set to 300 secands.You can configure it as per your need
6)Start jboss server and deploy your app.




Tuesday, 5 February 2013

ColdFusion IceBreaker #8 : ColdFusion 32 bit or 64 bit ???

So what happens when you take over an existing ColdFusion installation and want to update it ?
Or something doesn't work and you want to verify if its "supposed" to work for a particular bit version???

Its a bit typical to check whether ColdFusion was installed in its 32bit or 64 bit flavor,particularly if you were not the one who installed it

Here are a few ways to detect the current bit version of your installed ColdFusion server

1)Use your install logs

Open the install log (Adobe_ColdFusion_X_xxxxx(optional for 9)_InstallLog.log.
It will contain the following information:
-java.version :  This is the version of the Java used in the installer.Might not necessarily match your system's java version
-java.vm.name : Observe this carefully .If its a 64bit install ,this value will mention 64 Eg: Java HotSpot(TM) 64-Bit Server VM' .If its a 32 bit install there wont be any such mention Eg: Java HotSpot(TM) Server VM
Instead of "Server" it might say "Client' depending on installation,but that is irrelevant for judging whether its a 32bit or a 64 bit install
-os.arch : This explicitly states x86 for 32 bit install and x64 for 64 bit install

2)Use java -version

Goto <ColdFusion-Home>/runtimr/jre/bin
Give java.exe -version
You should be able to see java version,runtime environment and the java vm name

N.B. The Java information in Administrator->System information reflects the java that CF is using as opposedto the java that the installer used,so don't count on it

Tuesday, 25 September 2012

ColdFusion IceBreaker #7 : Unprotect your protected PDF through CF

Protecting your PDF with a password is a common everyday use case .
Using ColdFusion this can be done in a single easy step.

But sometimes we need to programmatically de-crypt/un-protect the same PDF.
There can be various ways of accomplishing this feat,but again ColdFusion makes it easy and a single step process

The trick to get to the treat ( the un-protected pdf , in this case ) is to use cfpdf tag and set your encyption to none using the "encrypt" attribute. You can do so only if you have the owner password , as technically only the document owner should have the permissions to change the security settings of a document

So assuming your PDF is called MyPdf.pdf with a owner password of "changesettings",use the below mentioned code to remove password protection from your PDF

<cfpdf action="protect" source="MyPdf.pdf" destination="MyUnsafePdf.pdf" 
password="changesettings" encrypt="none" />

Open MyUnsafePdf.pdf and you have your pdf without password protection


Wednesday, 19 September 2012

Convert your pfx keystore to jks keystore

Many times we need to convert our PKCS12 keystore/digital signature/digital id file to JKS files.

There are various many ways of doing it . Most blogs talk about how OpenSSL would help you do it and other go on about new tools.But its all within java keytool's capabilities.

Its actually as simple as what I quote below.

Goto your <JAVA_HOME>/jre/bin


keytool -importkeystore -srckeystore MyPfx.pfx -srcstoretype pkcs12 -srcstorepass mysrcpassword  -destkeystore exportfrompfx.jks -deststoretype jks -deststorepass mydestpassword


This process will create a new jks file and call it exportfrompfx.jks

All the certificates with their aliases will be exported from MyPfx.pfx to exportfrompfx.jks

Use the following command then to verify your new keystore:

keytool -list -storetype jks -keystore exportfrompfx.jks -v


To selectively add each certificate use its alias.

Get the alias using the above mentioned list command

keytool -list -storetype jks -keystore exportfrompfx.jks -v


Use keytool to import that alias into your JKS keystore

keytool -importkeystore -srckeystore MyPfx.pfx -srcstoretype pkcs12 -srcstorepass mysrcpassword -srcalias alias -destkeystore exportfrompfx.jks -deststoretype jks -deststorepass mydestpassword -destalias destalias



Thursday, 16 August 2012

ColdFusion IceBreaker #6: JBOSS 7.1 and OpenOffice on Mac OSX for ColdFusion cfdocument

In continuation of  ColdFusion IceBreaker #5: JBOSS 7.1 and OpenOffice for ColdFusion cfdocument,
this post lists the detailed steps to follow for running OpenOffice code on JBOSS 7.1 on MAC OSX.

1)Install OpenOffice and add the installation path in the ColdFusion Admin
2)Edit the module.xml located in <JBOSS_HOME>/modules/sun/jdk/main and put the following entry there:
<path name="com/sun/star/lib/loader"/>
3)Copy oosdk folder from <jboss-deployment-dir>/cfusion.ear/cfusion.war/WEB-INF/cfusion/lib/ to /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext. Though this is not recommended by MAC its the quickest way to ensure that the code runs well :P.
4)Edit standalone.conf located in <JBOSS_HOME>/bin
5)To JAVA_OPTS add the following entry:
-Djava.ext.dirs=<jboss-deployment-dir>/cfusion.ear/cfusion.war/WEB-INF/cfusion/lib/oosdk/:<java-home>/lib/ext/
Here we use /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/lib/ext if our JAVA HOME is default instead of <java-home>/lib/ext/
6)Restart jboss and you're all set 

Wednesday, 23 November 2011

ColdFusion IceBreaker #2: Configuring JBoss in OSX Lion with OpenOffice to support cfdocument



ColdFusion empowers users to deploy it as a EAR/WAR file in their existing Application Server (J2EE config) and all the CF features can be used along with the benefits offered by the Application Server.
The <cfdocument> tag in ColdFusion lets you convert your word document to PDF and powerpoint presentations to PDF/HTML format and in some of its use cases , uses OpenOffice (About OpenOffice)

If OpenOffice is installed before ColdFusion is installed on your machine then ColdFusion detects the presence of OpenOffice and adds the location of OpenOffice to ColdFusion Administrator->Server Settings->Document

However,when deployed as a EAR/WAR, and despite detecting the OpenOffice location ,the OpenOffice library jars need to be added to the server configuration files  manually before Openoffice can be used through <cfdocument>.

A quick link for the know-it-all :ColdFusion : Configuring OpenOffice for J2EE servers

Below are mentioned a few steps for installing JBOSS on Mac OSX Lion and configuring OpenOffice on it.

1)Download OpenOffice for OSX .The zip file would download to the /Downloads folder on your mounted device

2)Unzip the file using Archive Utility and install OpenOffice

3)In some cases,it is shown as a device under the mounted device.Drag and drop the OpenOffice.org app to /Applications folder.Info will say /Applications/OpenOffice.org.app.This will have the folder Contents.

4)Install JBOSS.Simply download the zip file,place it in a temporary location and unzip it
Eg: /Applications/JBOSS_MAC/jboss-6.1.0.Final/
JBOSS is now installed
This would now have the following folder structure:
copyright.txt
README.txt
LICENSE.txt
jar-versions.xml
common
client
lib
docs
server
logs
bin

5)Install ColdFusion as an EAR.Use the installer to create an ear file and expand it (java -xvf) to generate cfusion.war,META-INF and rds.war.Expand cfusion.war and rds.war.
This should now have the following folder structure:
/Applications/JBOSS_MAC/jboss-6.1.0.Final/server/default/deploy/cfusion.ear/cfusion.war/WEB-INF etc
/Applications/JBOSS_MAC/jboss-6.1.0.Final/server/default/deploy/cfusion.ear/rds.war/
/Applications/JBOSS_MAC/jboss-6.1.0.Final/server/default/deploy/cfusion.ear/META-INF/

6)Check the presence of the OpenOffice library jars in
/Applications/JBOSS_MAC/jboss-6.1.0.Final/server/default/deploy/cfusion.ear/cfusion.war/WEBINF/cfusion/lib/oosdk/
This should now have the following folder structure:
classes
lib
lib folder should contain the following jars
-juh.jar
-jurt.jar
-ridl.jar
-unoil.jar

7)Now,add these to the java paths of JBOSS as follows:

7.1) Goto /Applications/JBOSS_MAC/jboss-6.1.0.Final/bin
7.2) Edit run.conf
7.3) Add the locations to java.class.path
Eg:
JAVA_OPTS="-Xms128m -Xmx512m -XX:MaxPermSize=256m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djava.class.path=/Applications/JBOSS_MAC/jboss-6.1.0.Final/server/default/deploy/cfusion.ear/cfusion.war/WEB-INF/cfusion/lib/oosdk/classes:/Applications/JBOSS_MAC/jboss-6.1.0.Final/server/default/deploy/cfusion.ear/cfusion.war/WEB-INF/cfusion/lib/oosdk/lib:/Applications/JBOSS_MAC/jboss-6.1.0.Final/server/default/deploy/cfusion.ear/cfusion.war/WEB-INF/cfusion/lib"
7.4) Edit run.sh
7.5) Add the locations to JBOSS_CLASSPATH
Eg:
export JBOSS_CLASSPATH="$JBOSS_CLASSPATH:/Applications/JBOSS_MAC/jboss-6.1.0.Final/server/default/deploy/cfusion.ear/cfusion.war/WEB-INF/cfusion/lib/oosdk/classes:/Applications/JBOSS_MAC/jboss-6.1.0.Final/server/default/deploy/cfusion.ear/cfusion.war/WEB-INF/cfusion/lib/oosdk/lib/juh.jar:/Applications/JBOSS_MAC/jboss-6.1.0.Final/server/default/deploy/cfusion.ear/cfusion.war/WEB-INF/cfusion/lib/oosdk/lib/jurt.jar:/Applications/JBOSS_MAC/jboss-6.1.0.Final/server/default/deploy/cfusion.ear/cfusion.war/WEB-INF/cfusion/lib/oosdk/lib/ridljar:/Applications/JBOSS_MAC/jboss-6.1.0.Final/server/default/deploy/cfusion.ear/cfusion.war/WEB-INF/cfusion/lib/oosdk/lib/unoil.jar:/Applications/JBOSS_MAC/jboss-6.1.0.Final/server/default/deploy/cfusion.ear/cfusion.war/WEB-INF/cfusion/lib"

8)Use sudo ./run.sh -b 0.0.0.0 to start your server
This will enable other IPs to access your ColdFusion Application

9)Login to ColdFusion Administrator->Server Settings->Document.Check the OpenOffice installation directory.

10)Try to run a simple <cfdocument> example
<cfdocument format="pdf" srcfile="<path_to_word_doc>" filename="<path_to_destination_with_file_name>" overwrite="true">
</cfdocument>

View your pdf file.