Friday, January 23, 2009

Dreamweaver CS3 on Crossover Linux Pro 7.1.0 [NOT WORKING]

Install your licensed Dreamweaver CS3 into a Windows XP host (you can use a virtualized machine for this) and run it at least once (to correctly register the product and verify the serial code), then prepare to move some files and registry keys from your Windows XP installation to your Linux box:
  • C:\Program Files\Adobe must go into ~/.cxoffice/your-bottle/drive_c/Program Files/
  • C:\Program Files\Common Files\Adobe must go into ~/.cxoffice/your-bottle/drive_c/Program Files/Common Files/
  • C:\Windows\Macromed must go into ~/.cxoffice/your-bottle/drive_c/Windows/
  • C:\Windows\WinSxs must go into ~/.cxoffice/your-bottle/drive_c/Windows/
Now you have to export your entire HKEY_LOCAL_MACHINE/Software/Macromedia/ registry key to a file and copy it into your Linux box. Now you have to run recode ucs-2..ascii exported.reg and import the recoded registry file into your-bottle registry.

You should now be able to run your Dreamweaver CS3 issuing the following command on the command line:
/opt/cxoffice/bin/wine --bottle your-bottle ~/.cxoffice/your-bottle/drive_c/Program Files/Adobe/Adobe Dreamweaver CS3/Dreamweaver.exe

Thursday, January 22, 2009

Dual boot: AUTOCHK program not found

Today I faced a strange behavior while booting in my Windows Vista partition having a black screen showing the message "AUTOCHK program not found" followed by a BSOD and a quick reboot.

The problem was not resolved by a common bootrec /fixmbr command issued on the Vista Recovery Console and I could not solve it using grub too (btw, my system is in dual boot with Ubuntu Intrepid Ibex).

After googling a little bit I've found some instructions suggesting to unhide the Vista partition, but suddenly I discovered my Vista partition was not hidden, instead it's partition type was unknow!!!

The output of sudo fdisk -l infact was reporting a type unknow for my /dev/sda2 (my Vista partition), consequently I opened up the Gnome Partition Editor, selected my Vista Partition and changed the partition flags adding the hidden flag, suddenly the fdisk output changed reporting an Hidden HPFS/NTFS partition. Reopening the Gnome Partition Editor and removing the hidden flag restored my partition type to 7 HPFS/NTFS.

For sake of completness my partition and mbr mangling was due to my attempt to configure my Dell XPS M1330 power on buttons as this notebook has two of them: one to boot into the system and a second one to boot into Windows Media Direct. My attempt was to use the normal power up button to boot into Ubuntu and the second one to boot into Vista. More on the topic will follow if I'll resolve the boot problems ;)

Thursday, January 15, 2009

GNU/Linux and FAT32

I've found an interesting post about FAT32 filesystem handling under Ubuntu GNU/Linux...

Monday, August 18, 2008

JBoss AOP Made Easy (Included Eclipse WTP)

First of all the documentation is correct, but it's hard to find out the correct steps to follow, so I'll give here a few quick steps valid in case of JBoss 4.x and Java 5 or Java 6.

  • delete server/default/deploy/jboss-aop-jdk50.deployer and replace it with jboss-40-install/jboss-aop-jdk50.deployer
  • move into the new folder and delete common-softvaluehashmap.jar
    (already available) and move javassist.jar to ../../lib/javassist.jar (to replace the jboss providen library)
  • edit server/default/deploy/jboss-aop-jdk50.deployer/META-INF/jboss-service.xml and set the EnableLoadtimeWeaving parameter to true
  • edit the run.bat or run.sh script and add the java option -javaagent:$JBOSS_HOME/bin/pluggable-instrumentor.jar
Now you can start JBoss from command line, but not from Eclipse as it still misses some parameters: just open the Servers view, double click on your JBoss server and in the editor window click on the Open launch configuration link now you have select the Arguments tab and to append the -javaagent:pluggable-instrumentor.jar directive on the list.

Monday, August 11, 2008

Eclipse Plugins

Eclipse is my preferred IDE and here follows a list of plugins I commonly use:
  • Resource Bundle Editor (http://sourceforge.net/projects/eclipse-rbe/)
  • Log4E (http://log4e.jayefem.de/)
  • Maven Integration (http://m2eclipse.codehaus.org/)
  • Subclipse (http://subclipse.tigris.org/)
  • Wicked Shell (http://www.wickedshell.net/)
  • QuickREx (http://www.bastian-bergerhoff.com/eclipse/features)
  • FindBugs (http://findbugs.cs.umd.edu/eclipse)

Saturday, August 9, 2008

PostgreSQL on Windows Vista

Today I experienced a strange behavior of that strange operating system called Windows Vista Premium Edition: I wasn't able to correctly install PostgreSQL 8.2 nor 8.3

At a first look the installation process was ending correctly but whenever I try to start the service or the stand alone server nothing happens. When I tried to start the server from the command line I got something was missing from the installation folder... the entire data subfolder was missing!

After trying without success many installation options I tried to digg into the problem and what I've found is very strange: I don't have the permissions to create that folder!

The strange thing is I had the permission to create the parent installation folder, all the sibling folders containing binaries, extensions and clients... but not the data folder!

I got the short way: I created the data folder, added myself as a user having all rights on the folder then I runned bin\initdb.exe -D data et voilà... the database is ready and working.

Monday, March 31, 2008

Test e profiling di applicazioni web

Testare e profilare applicazioni web è una attività davvero semplice, infatti sono disponibili molti strumenti, alcuni dei quali anche open source, per svolgere questo compito.

La procedura da seguire varia in funzione del tipo di attività che si vuole eseguire e che individuamo in quattro tipologie:
  1. test funzionali, utili per verificare che l'applicazione risponda ai requisiti
  2. test di non regressione, utili per evitare di introdurre errori durante la manutenzione evolutiva
  3. test di performance, o stress test, per individuare i limiti imposti dall'accoppiata hardware e software
  4. profilatura per l'individuazione di colli di bottiglia e di punti di memory leak
In tutti i casi il tool che suggerisco di utilizzare è Jakarta JMeter, un tool open source realizzato in Java, e quindi utilizzabile su qualunque piattaforma, dotato di comoda interfaccia utente grafica per la realizzazione, manipolazione e verifica dei test.

Se l'applicazione che vogliamo sottoporre a test esiste già o ha una interfaccia utente già definita mediante un prototipo statico, l'attività di creazione del test è davvero banale:
  1. si lancia JMeter e si crea nel Workbench un elemento di tipo HTTP Proxy Server che utilizzeremo per registrare le attività che svolgeremo all'interno del nostro browser
  2. si lancia il browser preferito e si passa alla configurazione dei parametri di rete per fare in modo che utilizzi JMeter (127.0.0.1:8080) come se si trattasse di un server proxy
  3. si attiva, non necessariamente sulla macchina locale, l'applicazione web che vogliamo sottoporre al test
  4. utilizziamo il nostro web browser per navigare all'interno dell'applicazione avendo cura di eseguire tutte le attività che vogliamo sottoporre al test
Alla fine di questi passaggi JMeter avrà registrato tutte le operazione che avremo effettuato e sarà in grado di replicarle tutte le volte che vogliamo.

Se il nostro obiettivo è quello di creare una suite di test funzionali o di non regressione possiamo istruire JMeter per utilizzare una certa serie di parametri oppure di verificare mediante regular expression che l'output restituito contenga una determinata stringa.

Se il nostro obiettivo è quello di effettuare un test prestazionale o una profilatura allora dovremo chiedere a JMeter di eseguire il test in multiutenza ovvero come se si molti computer si connettessero contemporaneamente all'applicazione oltre che di raccogliere le informazioni statistiche di cui abbiamo bisogno.

Gli accorgimenti che suggerisco di seguire sono i seguenti:
  • raccogliere sempre in un unico punto i parametri relativi al server che si va a testare, così da non dover modificare tutta la suite di test nel caso si dovesse ripetere il test sulla stessa applicazione deployata su un altra macchina
  • attivare la gestione della sessione attraverso cookies o attraverso url rewriting
  • definire sempre un listener per verificare le attività svolte dal tool
  • inserire un eventuale processo di autenticazione (login) in un controller che lo esegua solo la prima volta
  • definire eventuali liste di parametri comuni a più richieste all'interno dell'apposito elemento di configurazione