Thursday, October 28, 2010

Setting WebSphere JVM Heap size without the web console

It seems that when you update the JVM Heap size settings for WebSphere through the web console via:

Servers > Application Servers > WebSphere_Portal > Server Infrastructure > Java and Process Management > Process Definition > Java Virtual Machine > Maximum/Minimum Heap Size

There is no warning at all about setting the minimum value and NOT setting the maximum value.  The maximum value by default is 256mb, so if by any chance you set the minimum to 512mb and you go get  a coffee while restarting the server, you will get the following error message in the native_stderr.log file:

“Could not create the Java virtual machine.
JVMJ9GC019E -Xms too large for -xmx “

The message is quite clear, but it doesn’t say where to change this setting and by now you will notice that your server won’t start and you have no access to the web console in order to change the settings.

So how to solve this? find the server.xml config file, that could be located in path similar to this one:

“C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\config\cells\mycomputernameNode01Cell\nodes\mycomputernameNode01\servers\server1″

Please make a BACKUP before proceeding.

Then look for the “jvmEntries” xml element that could look like this:

initialHeapSize=”512″ runHProf=”false” debugMode=”false” debugArgs=”-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=7777″ disableJIT=”false”>

Now you can either:
  • Remove the “initialHeapSize” attribute
  • Modify the value to something equal or below 256mb (the default)
  • Add the “maximumHeapSize” and set it to equal or more than the initial, in this case 512mb
Save the file and your server should be ready to go.

Wednesday, October 13, 2010

Take screenshots with your Android

Do you need to take screenshots with your HTC, Motorola or whatever Android mobile phone you have? Well there are a couple of applications in the market that will allow you to do this but they are only available for rooted devices, for example Shoot Me.

But in case you are a developer and you have DDMS installed in your Eclipse, then all you have to do is plug in your device and click on the screenshot button as seen below:

Friday, September 24, 2010

Subversion problem with case insensitive filesystems

If you are using SVN with Linux/Mac and Windows XP you may run into this problem sooner or later. The cause of the problem is the case-sensitive characteristic of Linux/Mac systems not getting along with the insensitive Windows XP, which results in an error message like this:

 svn: In directory '.'  
 svn: Can't open file '.svn\tmp\text-base\qt_temp.N19845.svn-base': The system ca  
 nnot find the file specified.  

Fortunately the solution is quite simple, first access the working copy through Linux/Mac and remove from the repository the file that is causing the problem with the following command:
     svn delete --keep-local the_file  

    Then commit your changes:

     svn ci  

    Now go to your Windows XP system and everything should be working.

    Monday, September 13, 2010

    Joomla Basics: How to customize the style of a module

    So you need to customize the look of a Joomla module? This is quite simple, just follow these steps:

    1) Go to the backend -> Extensions -> Module Manager -> Find your module and set the name of the custom css that you will add

    2) Refresh the page and check the source code. You will find the element using the new class name as shown below

    3) Modify the css file and include the specific propreties you want for this module and use the name set previously

    That's it, now you can make your modules look the way you want!

    Saturday, September 11, 2010

    Removing MySQL from the Linux boot sequence

    Do you want to speed up your boot time? maybe you are a software developer that doesn't require MySQL server to be up and running eveytime you turn on your laptop, and if you are running Kubuntu Lucid Lynx (10.4) like me, you probably already noticed that configuring the startup scripts via sysvrc conf doesn't work anymore.

    You can read more about the change in this link, but the important thing right now is how to stop MySQL from loading next time you boot the computer:

    • cd /etc/init directory
    • sudo editor mysql.conf
    • At the beginning of the file add a comment to the "start on" line (actually two lines)
    In the same folder you will find other services that may be stop in a similar way.

    Monday, August 9, 2010

    Good deed of the day: can I replace my broken power adapter with a used one?

    Most of you may be using a laptop to read this, and if you do you may already ran into the annoying issue of a broken power adapter. You don’t have to be an IT person to know that this is a critical part of your computer, but what many people out there don’t know is that you don’t have to get a brand new charger when this happens.

    This post is aimed to all those people wondering “can I use a different brand or model charger to replace mine?” the answer is: yes, you can and you should!

    Why you should? Well it is very common to hear from people that they want to help and do something good for the world but they either don’t have the time or the energy to join an NGO or a project that works in the area, but it is in our everyday decisions where we make the biggest impact on the world and reusing and old adapter instead of buying a new one is a perfect example of how you can contribute to having a better and more sustainable society.

    Now just keep in mind the following rules before doing your good deed of the day:

    • -Check the adapter jack and make sure that they are almost the same diameter and length to make sure that there is a good connection.
    • -Check the label on your adapter and find the voltage and amperage.
      • -The voltage can’t be too different from the original one, e.g. I just replaced a 19.5V adapter with a 19V one without any problems.
      • -The amperage has to be the same or higher than the original one, e.g. replacing a 3.34A for a 4.70A won’t hurt.

    Drawbacks of this? Some adapters won’t recharge your battery if they are not from the same brand and model as the original one, but it is very likely that by the time your adapter breaks your laptop has been already been used for a couple of years and the battery is useless anyway.

    Just for the records, I replaced a Dell Inspiron 1501 adapter with an Acer adapter (model AP12AD02) and it works perfectly.

    Thursday, July 29, 2010

    Spanish version of Facebook got hacked

    Did Facebook all of the sudden got very impolite? mmmm nope, it seems that the Spanish version of the social network giant was hacked and (at least for some profiles) now instead of wishing you happy birthday it says... well check the image below

    Well another day, another hacked site...