Ruben Laguna's blog

Apr 25, 2007 - 2 minute read - eclipse java jdbc jmeter

Compiling and building JMeter with Eclipse 3.2.x

The developer notes on how to compile and debug Jmeter with Eclipse 1 and 2 are very difficult to follow and outdated. If you are interested in modifying Jmeter using Eclipse 3.2 Callisto you can follow the following procedure:

  1. Install Subclipse Callisto release (update site: http://subclipse.tigris.org/update_1.2.x)
  2. Download optional libraries. Although they’re optional is better if you download them.
    1. mail.jar
    2. activation.jar
    3. beanshell
    4. bsf
    5. jexl
  3. Use SVN Repository Exploring and add the following repository http://svn.apache.org/repos/asf/jakarta/jmeter SVN Repository Exploring
  4. Navigate to tags/v2_2. Right-click on it and select Checkout. Use then New Project Wizard.
  5. Rename the the eclipse.classpath to .classpath. Delete the eclipse generated .classpath first.
  6. Change the Build Classpath. Select the project in the Package Explorer. Right-click it and select Properties~~Java Build Path~~> Source. Then uncheck Allow output folders for source folders and set the Default output folder to the <Project name>/lib/ext.
  7. Remove the exclusion patterns for images/*, etc. in the Build Path->Source
  8. Look with the Navigator (not the Package Explorer) in the lib/ext folder and see if eclipse is compiling ok. If not check the Problems view to see if the project was not built since its build path is incomplete. Probably your are missing some library. Commons-logging has to be change from commons-logging-1.1 to commons-logging. If it complains about javax.mail.MessagingException then you have to add mail.jar to the build path

At startup JMeter search for classes deriving from JMeterGUIComponent or TestBean. Now the context menus are populated with items.

Apr 23, 2007 - 1 minute read - eclipse java problems rcp setSaveAndRestore troubleshoot view workspace.xml

New views don't show up when using Eclipse RCP setSaveAndRestore

If you add a new view to an Eclipse RCP and when launch it the new view is not there you probably hit the problem described in this CT Arrington’s Weblog post.

The IWorkbenchConfigurer.setSaveAndRestore(true) called from your WorkbenchAdvisor can be the source of the problem. The Eclipse RCP platform is trying to restore the perspective from the serialized version stored on disk so it fails to load you new changes. You have several solutions [from the CT Arrington’s Weblog post].

Apr 20, 2007 - 1 minute read - firefox path unc windows

Firefox and file:// Windows UNC paths

The correct way to write a link to a Windows UNC path in HTML is to use this syntax: file://///servername/share/file.txt. But if you try this using Firefox you will quickly find that this type of link only works when using a local html file. If you put the html file in a web server an click on the link there, firefox will silently refuse to load the link. If you open the JavaScript Console (Tools->Error Console) you will find an entry like Security Error: Content at http://... may not load or link to file://...

Apr 20, 2007 - 1 minute read - back firefox forward history linux mouse scroll scrolling wheel windows

Scrolling fast with the mousewheel triggers history back and forth

Get Firefox

I’m observing an strange firefox behavior when I scroll the page using the mouse wheel. It goes back and forth through search history. So I googled a little bit and found that the KVM switch that I’m using it’s producing bogus key press event that firefox misinterprets. If you are running Linux the solution is simple as you can modify the X server configuration to ignore those events. But I cannot find a suitable solution for Windows.

Apr 13, 2007 - 1 minute read - classloader devloader eclipse HttpSessionListener java loader NoClassDefFoundError ServletContextListener sysdeo tomcat

(Tomcat 5.5.x) java.lang.NoClassDefFoundError: javax/servlet/http/HttpSessionListener

Or java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener for that matter. NoClassDefFoundError on HttpSessionListener , ServletListener , ServletContextListener, etc. can be caused by a custom classloader like Sysdeo DevLoader (I use it with Eclipse) in you Context definition in the Tomcat’s server.xml file.

<Loader classname="org.apache.catalina.loader.DevLoader"
        reloadable="true" debug="1" />

the solution: add

useSystemClassLoaderAsParent="false"

to the Loader

<Loader classname="org.apache.catalina.loader.DevLoader" 
        reloadable="true"
        debug="1" useSystemClassLoaderAsParent="false"/>

This should do the trick. More information here and here

Mar 29, 2007 - 2 minute read - broken cvs error linux loginfo pipe troubleshoot viewvc

cvs [xxxxx]: received broken pipe signal

Today I received this error message when issuing a cvs import to the cvs repository

cvs [import failed]: received broken pipe signal

after googling a little bit I found this mail thread that led me to the following entry in the cvs manual about loginfo:

Note that the filter program must read all of the log information or CVS may fail with a broken pipe signal.

so I took a look to the CVSROOT/loginfo and the line there was

Mar 19, 2007 - 1 minute read - flush netbeans puts ruby stdout

Netbeans 6.0 Ruby output not working properly ($stdout is not flushed on program termination)

After struggling with Netbeans 6.0 Ruby a little bit I finally found why my puts statement are not working properly. It’s due to the following reported bug.(Vote for this bug!!) Also noted in the RubyTodo page from Netbeans wiki.

This problem appears when using native ruby with netbeans instead of jruby.

My workaround is using log4r instead for print statements.

UPDATE: It has been fixed in the latest version of the ruby module. I had to download the prebuilt ruby cluster from http://deadlock.nbextras.org/hudson/job/ruby/ and install it using the following instructions because the ruby module version found in the update center was not fresh enough but today I checked again and version 0.39 is available from the Update Center as well.

Mar 19, 2007 - 1 minute read - plugin redirect wordpress

Useful WordPress plugin - Redirector

Very useful WordPress plugin to redirect with a “301 moved permanently” from one of your post to any url. I created a Wordpress page out of a post and I wanted to redirect everybody from the post to the the page. My first solution was to include a link to the page in the post but doing an automatic redirect is better as it allows to move the google pagerank from the post’s URL to the page URL