Thursday, February 18, 2010

InstallAnywhere 2010

Flexera software formally know as Acresso software the owners or popular InstallShield and InstallAnywhere brands have come up with the much awaited release of InstallAnywhere 2010. The developers of the InstallAnywhere lobby always wanted the rich features of windows installer (repair and rollback) along with the existing multiplatform features.

I recall the days when I use to call then Acresso/Macrovision support for implementing a workaround for achieving rollback in our multiplatform installers. Since I was a migrated user from InstallShield 5.5 multiplatform, I was used to the rollback feature and suddenly when we migrated our projects to InstallAnywhere 8 it proved to be a fatel decision as many features in InstallShield multiplatform were discontinued.

It is quite important for a installer developer to have control over the installation as the boundary conditions can become devastating in nature if the software being updated is time critical in nature, the associated downtime of a server responsible for computing million $$ worth of money is beyond imagination.

The mere email from Flexera about the launch of InstallAnywhere 2010 with the bold foot steps in the world of rollback and feature level repairs made me excited, I am looking forward for more feature rich release with lots of support towards virtualization in their coming release.

I am yet to evaluate the new version with tall claims, I will come up with an article very soon that will have the entire compilation results of InstallAnywhere 2010.

If you are also interested in reading about the new supported features and resolved bug list in InstallAnywhere 2010 please go through these links

Features in new release of InstallAnywhere 2010

Free trial of InstallAnywhere 2010

Webinar on March 3rd on Whats new in IA 2010

Monday, June 29, 2009

Adding external jar to your CustomCodeAction

[Question]

In GUI mode, the installer launches and installs, and after the installation executes a PostInstall Action which runs a Script/Batch file. In this Script file we call another Java class which is interactive. (means it gets input and outputs messages on the same window or a separate window). The dependencies are added in the batch/script file using export Library Path

Now I want to emulate this in Console Mode. I want to call this class from Console Mode Custom Code execution action so that the input and output are done on the Console mode Installer. The class which is called in turn depends on a lot of 3rd party jars. As soon as I add dependencies for the 3rd party signed jars it always gives exception "no manifest section for signature file entry" .
Since the jars are 3rd party, I can't go back and modify the jar contents. Is there anyway to overcome this problem ?

[ANSWER]

If you are calling your java class from a script/batch file add the dependency of your 3rd party jar files in the script itself instead of adding dependency in the IA project. Since the java class file is called from a script which spawns a different process and into a new shell the dependencies added to the main project does not get resolved while loading the class file into the JRE when spawned through script/batch.
InstallAnywhere's feature of adding files into class path or adding dependencies only works correctly in case of custom code action.

To load the 3rd party jars when using with shell use the following java arguments in the shell script to execute it.

java -cp abc.jar;xerces.jar;ant.jar com.yourcompany.packagename.ClassName

Here -cp added to the Java command tells the JRE to load abc.jar, xerces.jar and ant.jar to be added in the class path for executing the com.yourcompany.packagename.ClassName class file.

Installing JBoss server and application using IA

[Question]

How can I modify the port number in JBoss server using InstallAnywhere. I install JBoss-3.2.7.zip with IA, I get a user input for the Port Number and I know that the port number has to be set in the file server.xml inside the JBoss-3.2.7.zip. Should I use the action 'Modify Text File in Archive' action to replace the port? I can use the variable  $PORT_NUMBER$ to replace the existing port number. But don't know how to use it in the action to search for the line
 
Connector port="8080" address="${jboss.bind.address}

[ANSWER]

If you are installing JBoss using InstallAnywhere  add action in your project modify files in Archive. In your case its a bundled archive so select installed archive then click configure, 
In the configure frame update  search for  "${jboss.bind.address}" and fill the replace with "<your desired port number>"

Once this activity is done add the extract archive action to actually install your JBoss server zip.

An alternative approach to this problem would be to deflate the archive and then add an action to modify ASCII file with the above data.
       If you want to deploy your application using InstallAynwhere go to the Organization -> Hosts tab of Advanced designer click on add host. Choose application server from the choice (there will be two hosts listed over there DataBase Host and Application Server host)
Once Application server host is added to the project in Host section, fill up the necessary details like in your case choose JBoss 4.0.5 or newer and then select "Server Path".
Once done go to the Install Section of the Advanced designer and add an Action to deploy war file.

Monday, April 27, 2009

HTML Display in InstallAnywhere swing Panel.

As a Install Anywhere user you might have been asked to display HTML files in IA Swing panels quite a lot of time, as a installer developer its quite tedious for the engineer to code and format html files.
Recently I had a change to do the same thing here I followed a trick, created a nice word document with all the formatting (text, paragraph and alignment) then saved the file in filtered html format. The result was a nice looking html page with all the formatting present when viewed in IE.
 
Without worrying any thing I added the file into HTML display panel and few of the surprises came in front of me
 
1. The preview panel button showed my HTML document inside the SWING but all the formatting was lost.
2. When the project was build the HTML display panel showed the HTML inside the frame with lots of white spaces, although the formatting was there but some of the special characters were visible in it.
 
The above experience left me scratching my head as what might have gone wrong, if I am opening the same .htm in IE or other browser things look quite good then why do I see weired results in case of Installer panel???
 
After close inspection and ofcource some hit and tries answered me,  and here's what I found
 
1. If your html document uses tags like col span, table to format the content and wrap it after say 55 characters from left
2. If you use <p> paragraph in your html file to format the look and feel of your html document
3. If you use xhtml where a schema is present to validate the DOM elements in your html
 
You might get experience the same kind of UI issue, to resolve the issue use all the tags for do not intend to use col span, table, paragraph that restrict the rendering of html file from left to right.
 
The root course
 
Install Anywhere uses text wrap to format the rend erring of html in its swing panel, so when a pre formatted document is encountered by IA it tries to reformat it thereby resulting into lot of white space and sometimes a left to right scroll bar also appears thereby taking away the nice look of your html and also poses difficulty to the user to read the mesage.
 
Use the above mentioned ways to get rid of cosmetic but yet irritating bugs like this...

Some more InDepth to segmentation fault on UNICES..

 
A segmentation fault occurs when a program attempts to access a memory location that it is not allowed to access, or attempts to access a memory location in a way that is not allowed (for example, attempting to write to a read-only location, or to overwrite part of the operating system).
 
Usually signal #11 (SIGSEGV) set, which is defined in the header file signal.h file. The default action for a program upon receiving SIGSEGV is abnormal termination. This action will end the process, but may generate a core file (also known as core dump) to aid debugging, or perform some other platform-dependent action. A core dump is the recorded state of the working memory of a computer program at a specific time, generally when the program has terminated abnormally.
 
Segmentation fault can also occur under following circumstances:
 
a) A buggy program / command, which can be only fixed by applying patch.
 
b) It can also appear when you try to access an array beyond the end of an array under C programming.
 
c) Inside a chrooted jail this can occur when critical shared libs, config file or /dev/ entry missing.
 
d) Sometime hardware or faulty memory or driver can also create problem.
 
e) Maintain suggested environment for all computer equipment (overheating can also generate this problem).
 
Suggestions to debug Segmentation Fault errors
 
To debug this kind of error try one or all of the following techniques :
 
  • Use gdb to track exact source of problem.
  • Make sure correct hardware installed and configured.
  • Always apply all patches and use updated system.
  • Make sure all dependencies installed inside jail.
  • Turn on core dumping for supported services such as Apache.
  • Use strace which is a useful diagnostic, instructional, and debugging tool.
  • Google and find out if there is a solution to problem.
  • Fix your C program for logical errors such as pointer, null pointer, arrays and so on.
  • Analyze core dump file generated by your system using gdb

 

Re: Segmentation Fault

Segmentation fault on a UNIX machine occurs when there are paging or swap violation. Installers some times use OS services which try to buffer quite a lot of things sometimes thereby causing a buffer overflow resulting into the segmentation fault. This issue can reproduced when handling a lot of date parallel over the machine having limited amount of resources.
 
Segmentation fault is something more related to OS and can be analyzed with the help of core dumps generated.
 
Relating the issue with the installer, the issue can only be debugged with the help core dumps which would probably answer questions like which Op Code tried to violate the OS boundaries and create race conditions.

On Fri, Apr 24, 2009 at 7:45 PM, tony prabhu <ruban142003@yahoo.com> wrote:
Hi,
 
Generally why does segmentation fault appears in Linux machine when an installer with a huge payload is run. But this does not happen while running a simple project in the same machine with all the java compatibility. I believe this fault will appear when the rules of the Linux machine are violated for exampe: trying to access a resource in the machine which is not available. So, does the large installer tries the scenario like what i have mentioned above? Please explain to me.
 
Thanks for your time.
Tony




--
FreshersDirect Team
http://www.freshersdirect.com

Saturday, April 18, 2009

Re: InstallAnywhere details

You are absolutely correct, Execute Script returns the exit code for the action not of the underlying batch/script file. My experience with says that IA execute script does not work correctly in case of DOS batch files.
The reason being, execute run script uses Java Process.getRuntime.exec() thread to run the batch or command passed. Here Process.waitfor() method is used, if the underlying script uses @echo ON inside the script the behavior is very abrupt. Only the first script's 1 to 6th or 7th steps are run after that the script keeps on waiting thereby making the installation hang.

I would suggest to use your own plugin for executing command or batch specifically when the command or script calls another shell to execute the sequence of steps.

In the plugin spawn a thead and dont wait for the thread to complete. here the disadvantage is you will not get the complete the stderr, stdout till the theread completes but its a nice tradeoff done where you want to set gurentee for the underlying command to complete sucessfully.

I have developed a plugin which you can use if you want.




On Thu, Apr 16, 2009 at 6:46 PM, tony prabhu <ruban142003@yahoo.com> wrote:
Hi,
 
I am a beginner with IA and I want to know about the Execute Script/Batch action and how it works. I believe the exit code in this action is only for the action and not for the script or the commands it executes. So, how can i get an exit code for the executed script? Please explain to me in a detailed manner.
 
Thanks
Tony