Archive

Archive for December, 2009

How-To Fix Flash Incapability of Recognizing Mouse Clicks

December 12, 2009 3 comments


Upon upgrading to Ubuntu 9.10 Karmic Koala, some including me noticed that any Flash-containing website like YouTube.com then you can’t click on that Flash object. In other words, Flash is not recognizing mouse clicks.

It appeared that this was a bug that was reported here.

A workaround for such a bug has been put in place. So here are the workarounds as the official bug tracker suggested:

  1. WORKAROUND 1: Disable compiz
  2. WORKAROUND 2: Remove flashplugin-nonfree / flashplugin-installer and install from adobe
  3. WORKAROUND 3, and this is the one worked with me:
    • Open a terminal, or you can press Alt + F2, and type
    • gksudo gedit /usr/lib/nspluginwrapper/i386/linux/npviewer
    • Then add “export GDK_NATIVE_WINDOWS=1” before the last line of text.
    • Save.
    • Restart your FireFox, or any application uses Flash.

So, This is it as far as I know!

Categories: Linux/Unix, Open-Source Tags: , ,

How-To Deploy Roller 4 on GlassFish V3

December 10, 2009 7 comments

I’ve just started blogging seriously. Many free blogging tool providers are available. Widely known are the WordPress and Blogger. For some reasons, I decided to use WordPress as my main blogging tool.

I’ve given some thoughts to start developing a Web-based Blogging Tool just to have some hands-on experience on the Web Development and Design process. Besides, as I advocate the Open Source Community I would like to make a humble contribution to this great community.

I was wondering which platform on which I should rely to start developing this project. From my notice, most web applications nowadays are developed in PHP. PHP has been used very widely by the public. Well, PHP is a very cool scripting language and I’ve always looked forward to learning it. But, as it is a top priority to my career path is to have a solid development background using Java/J2EE technology, I’ve decided to start a project for developing a Java Web-based Blogging Application. Fortunately, somebody already started developing such a project long time ago, since 2002. This application is sponsored by Apache Software Foundation and is called Roller Weblogger.

So, trying to make Roller up and running, we need to download a Java Web Server to be the deploying environment for Roller. You can download Tomcat and use it as a Web Server to deploy Roller. Refer to this Installation Guide to deploy Roller on Tomcat.

In my case, I decided to use GlassfishV3 due to the features and frameworks bundled with. Here, I’ll explain step by step how to install GlassfishV3, deploy Roller on it, and avoid a possible problem that might hinder the deployment process!

So, let’s start!

STEP 1: GlassfishV3

STEP 1.1: Download GlassfishV3

Download GlassFishV3 Prelude or Preview. Compare between them here.

Refer to Comment#:1

STEP 1.2: Install/Configure GlassfishV3

Install GlassfishV3 by simply running the script. It is not a big deal just follow the instructions!

STEP 1.3: Start GlassfishV3

Go to where Glassfish binary files are:

cd $GF_HOME/glassfish/bin
  • To start the domain:
    ./asadmin start-domain
  • To stop the domain:
    ./asadmin stop-domain

Or alternatively, I prefer to start/stop the server by running these: “log will be output to the screen, so you can monitor it

  • To start the server:
    ./startserv
  • To stop server:
    ./stopserv

Now, you can reach the Admin Console at:

For further details, have a look at the GlassfishV3 Quick Start Guide!

STEP 2: MySQL JDBC Connection

STEP 2.1: Download Connector/J

You will need to download the MySQL JDBC Connector to allow Roller interact with the MySQL Database Server. Here, I used the MySQL Connector/J 5.1.10.

Place the Connector/J in:

cp mysql-connector-java-5.1.10-bin.jar $GF_HOME/glassfish/lib/

STEP 2.2: Provide JNDI

In GlassfishV3:

  • Create JDBC Connection Pool: (Admin GUI -> Application Server -> Resources -> JDBC -> Connection Pools)

  • Create JDBC Resources (Admin GUI -> Application Server -> Resources -> JDBC -> JDBC Resources)

Restart Glassfish and Ping the JDBC Connection!

STEP 3: Roller 4

STEP 3.1: Download Roller

Download Roller from here.
For more detailed information about installation refer to the Roller Installation Guide!

STEP 3.2: Create Database
mysql -u root -p

password: *****
create database rollerdb;

grant all on rollerdb.* to scott@'%' identified by 'tiger';

grant all on rollerdb.* to scott@localhost identified by 'tiger';

quit
STEP 3.3: Create roller-custom.properties

To connect to the MySQL database you should create the roller-custom.properties file in either 2 ways “as far as I noticed“:

  • Roller will interact with database Directly:
    installation.type=auto
    database.configurationType=jdbc
    database.jdbc.driverClass=com.mysql.jdbc.Driver
    database.jdbc.connectionURL=jdbc:mysql://localhost:3306/rollerdb
    database.jdbc.username=scott
    database.jdbc.password=tiger
    
    mail.configurationType=properties
    mail.hostName=smtp-server.example.com
    mail.username=scott
    mail.password=tiger

    Place it in:

    mv roller-custom.properties $ROLLER_DIR/WEB-INF/classes/
  • Roller will interact with database through the JNDI:
    installation.type=auto
    database.configurationType=jndi
    database.jndi.name=jdbc/rollerdb
    
    mail.configurationType=jndi
    mail.jndi.name=mail/Session
    mail.configurationType=properties
    mail.hostName=smtp-server.example.com
    mail.username=scott
    mail.password=tiger

    Place it in:

    mv roller-custom.properties $ROLLER_DIR/WEB-INF/classes/

    Make sure that the following Descriptor is placed in this directory:

    ls $ROLLER_DIR/WEB-INF/sun-web.xml
STEP 3.4: Deploy Roller

Deployment must be easy and straightforward too from the Admin GUI, or You can place the $ROLLER_DIR in the autodeploy directory if you want just to try it out.

STEP 4: A Problem To Be Avoid

I only got Roller and GlassFishV3 working together by disabling the following JPA configuration and setting its flag to false and then adding it to “roller-custom.properties“:
openjpa.QueryCompilationCache=false

Enjoy blogging 😉

How-To Fix libstdc++5 Dependency Problem in Ubuntu 9.10

December 1, 2009 68 comments

Upon upgrading to Ubuntu 9.10 I noticed that some applications won’t run any more and the problem was apparently related to the dependency library libstdc++5. This library was deprecated and libstdc++6 was used instead. It appeared that the removal of this library wasn’t wise, and it was reported as a bug which can be found here. You might see an Error Message like this when try to run an application depends on the missing library:

Error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory

To me, the packages that were affected are:

  • Thunderbird (downloaded from Mozilla website)
  • GWT (Google Web Toolkit) in the Hosted Browser mode

A workaround of this bug has been put in place. Mine is almost similar:
Since libstdc++5 was discontinued in Ubuntu 9.10 (Karmic Koala) then we need to download the Ubuntu 9.04 (Jaunty Jackalope) package.

Note: You will need the i386 package if you use Ubunut_i386, and you will need both i386 & amd64 packages if you use the Ubuntu_amd64 as there are i386 applications run under the amd64 architecture!

For Ubuntu 9.10 i386

Download the i386 Jaunty libstdc++5 package.
and simply install it by double click on it, or through the command line you can run this:

sudo dpkg -i libstdc++5_3.3.6-17ubuntu1_i386.deb

For Ubuntu 9.10 amd64

As I said before we need to download both the i386 & amd64 packages:

The amd64 package:

as simple as we did for Ubuntu_i386.
Download the amd64 Jaunty libstdc++5 package.
and simply install it by double click on it, or through the command line you can run this:

sudo dpkg -i libstdc++5_3.3.6-17ubuntu1_amd64.deb

The i386 package:

Download the i386 Jaunty libstdc++5 package.
Here, we need to extract the libstdc++5 library ourself as this deb package is an i386 one. So, if you try to double click on it or install from the command line it will give you an error message “Wrong architecture ‘i386′”
The way to solve this is to extract the libraries yourself and place them in the correct directory. Starting from the director where the package has been downloaded to, run the following:

sudo dpkg-deb -x libstdc++5_3.3.6-17ubuntu1_i386.deb ./tmp
sudo cp ./tmp/usr/lib/* /usr/lib32/

Up to here, this must solve your problem with the libstdc++5. Stick with it till Ubuntu community find a solution for this bug.
Good luck!

Categories: Linux/Unix, Open-Source Tags: