Saturday, June 13, 2009

Firefox displays blank Alert and ssl is disabled

I've got error "ssl_error_ssl_disabled" (Firefox cannot connect securely because the SSL protocol is disabled).

During start, there was always a blank / empty Alert box. That was probably "Could not initialize the browser's security component."

Solution: Moved cert8.db file from another profile (you can also delete it).

Friday, March 6, 2009

WindowMaker launching another instance from dockbar

For launching another instance of an application by clicking on the icon in the dock, hold down Ctrl.

I have two xterm apps in the dockbar, one for a todo-list and one for "done" (aka knowledge base):

xterm -class UXTerm -title done -u8 -g 50x40 -e vim /z/txt/txtcvs/done -c $

xterm -class UXTerm -title todo -u8 -g 50x40 -e vim -O /z/txt/txtcvs/todo -S /z/.vim/todo-macros.vim


If xterm is running, it is impossible to launch "todo" without Ctrl. Or you can run more instances of e.g. Firefox by this...

Monday, March 2, 2009

nmap script engine aborting

Nmap 4.68 from debian repository is missing required files.

Workaround: Download the tarball and copy nselib/ to /usr/share/nmap, as written here:

http://www.nabble.com/Bug-495054:-module-'comm'-not-found-td18980885.html

Wednesday, February 11, 2009

cron not running commands

crontab was not working. Silently, not running the command, not writing anything to /var/log/cron. You can check the syntax of your crontab using:

# crontab /etc/crontab "/etc/crontab":16: bad minute errors in crontab file, can't install.

The problem was in splitting command into more lines using backslash \ at the end of each line.

Simple workaround: Put it on one line.

Do not forget also that the minute column is right to the hour column.

Wednesday, January 28, 2009

jUnit / jMock: error in opening zip file

I was getting an exception using jUnit / jMock tests together with Ant:

  [junit] java.util.zip.ZipException: error in opening zip file
  [junit] at java.util.zip.ZipFile.open(Native Method)
  [junit] at java.util.zip.ZipFile.(ZipFile.java:114)
  [junit] at java.util.zip.ZipFile.(ZipFile.java:131)
  [junit] at org.apache.tools.ant.AntClassLoader.getResourceURL(AntClassLoader.java:1028)
  [junit] at org.apache.tools.ant.AntClassLoader$ResourceEnumeration.findNextResource(AntClassLoader.java:147)
  [junit] at org.apache.tools.ant.AntClassLoader$ResourceEnumeration.(AntClassLoader.java:109)
  [junit] at org.apache.tools.ant.AntClassLoader.findResources(AntClassLoader.java:975)
  [junit] at java.lang.ClassLoader.getResources(ClassLoader.java:1016)
  [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.checkForkedPath(JUnitTask.java:1126)
  [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeAsForked(JUnitTask.java:1013)
  [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.java:834)
  [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeOrQueue(JUnitTask.java:1785)
  [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.java:785)
  [junit] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
  [junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  [junit] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  [junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  [junit] at java.lang.reflect.Method.invoke(Method.java:597)
  [junit] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
  [junit] at org.apache.tools.ant.Task.perform(Task.java:348)
  [junit] at org.apache.tools.ant.Target.execute(Target.java:357)
  [junit] at org.apache.tools.ant.Target.performTasks(Target.java:385)
  [junit] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1337)
  [junit] at org.apache.tools.ant.Project.executeTarget(Project.java:1306)
  [junit] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
  [junit] at org.apache.tools.ant.Project.executeTargets(Project.java:1189)
  [junit] at org.apache.tools.ant.Main.runBuild(Main.java:758)
  [junit] at org.apache.tools.ant.Main.startAnt(Main.java:217)
  [junit] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
  [junit] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)




Solution:

Use

    <path id="classpath.run.tests"> 
        <pathelement location="." />                                                                 
    </path>


instead of

    <path id="classpath.run.tests">                                                                  
        <fileset dir=".">                                                                            
            <include name="*.class" />                                                               
        </fileset>                                                                                   
    </path>


The explanation.