Saturday, 11 December 2010

cleaning frequency of /tmp and /var/tmp

/tmp normally gets cleared after every reboot on ubuntu which is a bit quick for me. For example I sometimes want to save a screenshot and maybe quickly edit it and e-mail it, but I don't want to loose it if my system reboots for whatever reason (including forgetting that I was busy with something).
It turns out that you can set how long to keep stuff in /tmp by setting TMPTIME in /etc/default/rcS to the number of days to keep stuff (I'm going for 7days now).

Apparently you normally should put temp stuff you want to keep a bit longer in /var/tmp [1] but that does not seem to get cleared out regularly.
So I made a weekly cronjob to clean out stuff older than 60 days:/etc/cron.weekly/
find -P ${tmpdir} -type f -mtime +$days        -exec su amanica -c "notify-send 'weekly clean ${tmpdir}' 'rm {}'" \; -exec rm {} \;
find -P ${tmpdir} -type d -mtime +$days -empty -exec su amanica -c "notify-send 'weekly clean ${tmpdir}' 'rm {}'" \; -exec rm -r {} \;


Wednesday, 27 October 2010

@Entity(name != table_name !!!

Normally if you get "org.hibernate.hql.ast.QuerySyntaxException: is not mapped" then you used the table name in stead of the class name. In my case I'm ashamed to admit, 
I though setting @Entity(name is setting the table name,
where in fact it is setting the JPQL alias! 
I thought it was weird that you can set that and the @Table(name . 

@Entity(name != table_name !!!
@Entity(name != table_name !!!
@Entity(name != table_name !!!
@Entity(name != table_name !!!
@Entity(name != table_name !!!
@Entity(name != table_name !!!
@Entity(name != table_name !!!
@Entity(name != table_name !!!
@Entity(name != table_name !!!
@Entity(name != table_name !!!

Thanks Matt Raible for showing me the light:

If you specify a name value for your @Entity annotation (for example
@Entity(name="person")), this will be the alias for HQL queries. If you
don't specify this value, the name will match the short name of your class (
Person). If you want to change the table name that's generated, use the
with a "name" value.

Tuesday, 19 October 2010

IncompatibleClassChangeError: Implementing class

In my case this was caused by incompatible versions of hibernate in the classpath...

2010-10-19 12:40:32,271:ERROR   Problem encountered during View.servePage       - com.icesoft.faces.context.View
java.lang.IncompatibleClassChangeError: Implementing class
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClassCond(
        at java.lang.ClassLoader.defineClass(
        at org.apache.catalina.loader.WebappClassLoader.findClass(
        at org.apache.catalina.loader.WebappClassLoader.loadClass(

Wednesday, 13 October 2010

Overheating laptop

A couple of weeks ago I could reliably get my laptop to overheat by just running the bazaar unit tests.

By googling I found that it could help to clean out the fan,
so I opened it a bit but gave up because I didn't have time to open it up completely.

Recently it got much worse, I could not even open eclipse without having a household fan directed at my laptop.

I decided today is the day. I had to remove about 30 screws and the processing unit heat sinks to get at them little radiators. They were a bit filthy of coarse, but its all cleaned now. I had to file off 1mm of a 3mm flat screwdriver bit so that I can unscrew about 11 2mm hexagonal screws.. . One screw got lost somewhere, I hope its not stuck somewhere where it can cause problems - that must be what doctors think if they are missing something after performing surgery.

It seems much better now, the fan doesn't even come on so often any more.

Tuesday, 12 October 2010

inconsistent datatypes with JPA.. eish

I've been having some weird errors with JPA eg.
(pasted here so you can find it with google)
INFO - batching 1 statements: 1: insert into dds.DDS_EMAIL_STATUS (DOC_REGISTER_ID, EMAIL_ADDRESS_FROM,
values (1001, '', '', to_date('10/12/2010 12:41:05', 'mm/dd/yyyy
hh24:mi:ss'), NULL, to_date('10/12/2010 12:41:05', 'mm/dd/yyyy hh24:mi:ss'), 0, 'testSend',
800)  {executed in 4 msec}
INFO - executeBatch()
ERROR - 2. PreparedStatement.executeBatch() batching 2 statements:
1:  insert into dds.DDS_EMAIL_STATUS_LOG (DATE_TIME, DDS_EMAIL_STATUS_ID, MESSAGE, DDS_EMAIL_STATUS_LOG_ID) values (to_date('10/12/2010 12:41:05', 'mm/dd/yyyy hh24:mi:ss'), '', 'html body:
html body', 750)
java.sql.BatchUpdateException: ORA-00932: inconsistent datatypes: expected NUMBER got BINARY
    at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException(
    at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(
    at net.sf.log4jdbc.StatementSpy.executeBatch(
    at org.apache.commons.dbcp.DelegatingStatement.executeBatch(
    at org.apache.commons.dbcp.DelegatingStatement.executeBatch(
    at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(
    at org.hibernate.jdbc.AbstractBatcher.executeBatch(
    at org.hibernate.engine.ActionQueue.executeActions(
    at org.hibernate.engine.ActionQueue.executeActions(
    at org.hibernate.event.def.AbstractFlushingEventListener.performExecutions(
    at org.hibernate.event.def.DefaultFlushEventListener.onFlush(
    at org.hibernate.impl.SessionImpl.flush(
    at org.hibernate.ejb.AbstractEntityManagerImpl.flush(
    at org.apache.openejb.persistence.JtaEntityManager.flush(
java.sql.SQLException: incompatible data types in combination in statement [alter table DDS_EMAIL_STATUS_LOG add constraint FKB7F2A8E6BAAD6FBB foreign key (DDS_EMAIL_STATUS_ID) references DDS_EMAIL_STATUS]
 at org.hsqldb.jdbc.Util.sqlException(Unknown Source)
 at org.hsqldb.jdbc.JDBCStatement.fetchResult(Unknown Source)
 at org.hsqldb.jdbc.JDBCStatement.executeUpdate(Unknown Source)
 at net.sf.log4jdbc.StatementSpy.executeUpdate(
 at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(
 at org.apache.commons.dbcp.DelegatingStatement.executeUpdate(
 at org.hibernate.tool.hbm2ddl.SchemaExport.execute(
 at org.hibernate.tool.hbm2ddl.SchemaExport.create(
 at org.hibernate.tool.hbm2ddl.SchemaExport.execute(
 at org.hibernate.tool.hbm2ddl.SchemaExport.create(
 at org.hibernate.impl.SessionFactoryImpl.(
 at org.hibernate.cfg.Configuration.buildSessionFactory(
 at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(
 at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(
Caused by: org.hsqldb.HsqlException: incompatible data types in combination
 at org.hsqldb.error.Error.error(Unknown Source)
 at org.hsqldb.error.Error.error(Unknown Source)
 at org.hsqldb.Table.checkColumnsMatch(Unknown Source)
 at org.hsqldb.TableWorks.checkCreateForeignKey(Unknown Source)
 at org.hsqldb.TableWorks.addForeignKey(Unknown Source)
 at org.hsqldb.ParserDDL.processAlterTableAddForeignKeyConstraint(Unknown Source)
 at org.hsqldb.ParserDDL.processAlterTable(Unknown Source)
 at org.hsqldb.ParserDDL.processAlter(Unknown Source)
 at org.hsqldb.StatementSchema.getResult(Unknown Source)
 at org.hsqldb.StatementSchema.execute(Unknown Source)
 at org.hsqldb.Session.executeCompiledStatement(Unknown Source)
 at org.hsqldb.Session.executeDirectStatement(Unknown Source)
 at org.hsqldb.Session.execute(Unknown Source)
javax.persistence.PersistenceException: org.hibernate.type.SerializationException: could not deserialize
    at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(
    at org.hibernate.ejb.AbstractEntityManagerImpl.remove(
    at org.apache.openejb.persistence.JtaEntityManager.remove(
1:  update DDS_EMAIL_STATUS_LOG set DATE_TIME='10/12/2010 13:11:54.206', DDS_EMAIL_STATUS_ID='', MESSAGE='text body:
text body' where DDS_EMAIL_STATUS_LOG_ID=1 {FAILED after 0 msec}
java.sql.BatchUpdateException: data exception: string data, right truncation
 at org.hsqldb.jdbc.JDBCPreparedStatement.executeBatch(Unknown Source)
 at net.sf.log4jdbc.StatementSpy.executeBatch(
 at org.apache.commons.dbcp.DelegatingStatement.executeBatch(
 at org.apache.commons.dbcp.DelegatingStatement.executeBatch(
 at org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(
 at org.hibernate.jdbc.AbstractBatcher.executeBatch(
 at org.hibernate.engine.ActionQueue.executeActions(
 at org.hibernate.engine.ActionQueue.executeActions(
I tried different databases because it looked to me like the hsqldb is getting a bit confused with the column order. But in the end it turned out that I made a bit of a mistake:
I converted an embedded complex primary key to have a generated Id. In stead of annotating the referenced object with a @ManyToOne(optional = false)
it was still using @Column(name = "DDS_EMAIL_STATUS_ID"). After much debugging, googling and figuring out how to print the actual sql using I figured out that I neglegted to change @Column to @ManyToOne.

Why is nothing ever easy ;-P

Saturday, 2 October 2010

eclipse + tomcat + maven pain again

Banging my head against the wall again today
because my app just does not want to start up :'(
Between eclipse, tomcat and maven my classpath was messed up, getting all sorts of exceptions like NoClassDefFoundError etc.

Finally I figured out again that for each project involved you have to check "Maven Dependencies"
in the "Order and Export" tab of the Java build path settings.
Then when you tell tomcat to include these projects,
it will actually include it and its dependencies.

I'm not sure how this got lost because my app used to work. Maybe when I imported the same project in
another workspace that got reset :(

Tuesday, 7 September 2010

cannot execute binary file

I had this really weird issue on Ubuntu:
* An executable works fine on my laptop.
* Then I scp it to the server.
* On the server I get the following error messsage: "cannot execute binary file"
* So after some googling I found:
You are probably trying to run a 64-bit [executable] on a 32-bit Linux system...

Go figure. I've been so spoiled with java and python, that I forget there are still things you need to compile for the platform you want to run it on...

Monday, 23 August 2010

Archiva gives the maven site plugin an invalid site_en.xml

I got the following nasty error since friday:

$ mvn -U -e -X clean site
[DEBUG] Reading site descriptor from /home/amanica/.m2/repository/za/co/my_company/super-pom/1.0.3/super-pom-1.0.3-site_en.xml
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] SiteToolException: Error parsing site descriptor

Expected root element 'project' but found 'html' (position: START_TAG seen ... Transitional//EN" "">\r\n<html>... @8:7)
[INFO] ------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: SiteToolException: Error parsing site descriptor
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(
at org.apache.maven.DefaultMaven.doExecute(
at org.apache.maven.DefaultMaven.execute(
at org.apache.maven.cli.MavenCli.main(
at org.apache.maven.cli.compat.CompatibleMain.main(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
at org.codehaus.classworlds.Launcher.launchEnhanced(
at org.codehaus.classworlds.Launcher.launch(
at org.codehaus.classworlds.Launcher.mainWithExitCode(
at org.codehaus.classworlds.Launcher.main(
Caused by: org.apache.maven.plugin.MojoExecutionException: SiteToolException: Error parsing site descriptor
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(
... 17 more
Caused by: Error parsing site descriptor
... 21 more
Caused by: org.codehaus.plexus.util.xml.pull.XmlPullParserException: Expected root element 'project' but found 'html' (position: START_TAG seen ... Transitional//EN" "">\r\n<html>... @8:7)

It turns out that maven looks for a site_en.xml for my parent project on archiva and archiva seems to generate a return file which is actually an error message.
The maven site plugin then tries to parse it and fails horribly :(
I worked around this by just adding the following content to src/site/site_en.xml in my parent project and everything was well!

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns=""

I got really frustrated by this cryptic error message. I wanted to bash my head against the table and throw my laptop against the wall. Instead I cried out to God and not long after that I figured it out. Some would say thats just coincidence, I say: "Thank God", "Praise God" and "Why didn't I ask You sooner?".

Friday, 20 August 2010

Chromium happy again

After getting the message below on each chromium start for months, I finally googled it:

Your profile could not be opened correctly.
Some features may be unavailable.
Please check that the profile exists and you have permission to read and write its contents.

The solution for me was simple:
rm ~/.config/chromium/Default/History

I can't believe I suffered so long with a broken awesomebar which never found new history :(
Previously I assumed its something broken in chromium that would get fixed by a newer Ubuntu packages. The fix never came so I'm really happy that I finally found the solution today:
see Ariel's solution.

Monday, 28 June 2010

Apache url filtering corrupts compressed output.

While trying to set up Hudson behind apache again, I kept on getting garbage out.
After some googling I realized Hudson compress its output, therefore you can not use the normal proxy-html filter to modify urls coming from hudson:
SetOutputFilter proxy-html
Instead you can use the following:
SetOutputFilter INFLATE;proxy-html;DEFLATE
ProxyHTMLURLMap http://your_server:8080/hudson /hudson
But since hudson seems to be well behaved it even better to just not use SetOutputFilter and ProxyHTMLURLMap.

Thursday, 24 June 2010

Internet Explorer 7 with Wine

After searching a lot and trying some recipes, the following worked beautifully for me to install Internet Explorer 7 on ubuntu 10.04 (lucid)

(I changed the last step to get it to work for me, because its installed in your home dir, not in your current dir)

Download dependencies:
sudo apt-get install wine cabextract

Download and run IE4WINE:
Warning: All wine program running must be closed before install and run IE4WINE
chmod +x ./ie4wine

type ~/wineie7 (Stable Version )
type ~/wineie7https (Unstable Version with https support)

Archiva On GlassFish with Derby

I added the following to the archiva wiki, but keeping a copy here for reference and backup.
(based on

Glassfish web configuration

Deploy the war file on your Glassfish server from the admin page (http://localhost:4848).
Or copy the the war file into your <GLASSFISH_FOLDER>/domains/domain1/autodeploy/archiva.war
Glassfish file configuration
Edit the file <GLASSFISH_FOLDER>/domains/domain1/config/domain.xml to add the following tags:

Go to Ressources -> JavaMail Sessions and create a new ressource with jndi-name='mail/Session', otherwise you will get "Error creating bean with name 'mailSession'" on startup. Or add it to the config file:

<mail-resource from="" host="" jndi-name="mail/Session" object-type="user"
store-protocol="imap" store-protocol-class="com.sun.mail.imap.IMAPStore"
transport-protocol="smtp" transport-protocol-class="com.sun.mail.smtp.SMTPTransport"

Set appserver.base and appserver.home properties

Ensure that the property appserver.base is set. Archiva uses this to locate log files.

<java-config ...

JDBC resources

<jdbc-resource pool-name="archivaUsersPool" jndi-name="jdbc/users" />
<jdbc-resource pool-name="archivaPool" jndi-name="jdbc/archiva" />

Connection pool

<jdbc-connection-pool datasource-classname="org.apache.derby.jdbc.EmbeddedXADataSource" res-type="javax.sql.XADataSource" name="archivaUsersPool">
<property name="databaseName" value="/archiva/data/databases/users" />
<property name="connectionAttributes" value=";create=true" />
<jdbc-connection-pool datasource-classname="org.apache.derby.jdbc.EmbeddedXADataSource" res-type="javax.sql.XADataSource" name="archivaPool">
<property name="databaseName" value="/archiva/data/databases/arvhiva" />
<property name="connectionAttributes" value=";create=true" />

Resources ref

<server config-ref="server-config" name="server">
<resource-ref enabled="true" ref="jdbc/users"/>
<resource-ref enabled="true" ref="jdbc/archiva"/>

Now restart you Glassfish server, and open the archiva location. The last thing you have to do is create the admin user.

Thursday, 15 April 2010

dns cache

I installed dnsmasq a long time ago, but it turns out I never told my dhcp to use it.
All done now thanks to the following post:

My steps (for in case I need to do it again :) :
sudo apt-get install dnsmasq

Now edit /etc/dhcp3/dhclient.conf
and uncomment the following line:
prepend domain-name-servers;

I didn't have a /etc/dnsmasq.conf , and it does not seem to be needed because my dns caching works fine now without it; I assume its got good defaults.

To test it quickly add nameserver to the top of /etc/resolv.conf
(it normally gets overwritten by the network manager)

You will see something like
;; Query time: 38 msec
Now do it again, and you should see something like:
;; Query time: 2 msec


Wednesday, 7 April 2010

Vaadin addons and maven and eclipse.

Afters struggling for almost 3 days, I finally got some vaadin add-ons working for me.
No matter what I did, I could not get maven to compile the custom widget sets :'-(

Wanting to do it with maven I started off with the instructions at

I got error messages like:
Failed to load the widgetset: 

Building it with the eclipse plugin said:
Compiling widgetset
Updating GWT module description file...
07 Apr 2010 5:46:09 PM com.vaadin.terminal.gwt.widgetsetutils.ClassPathExplorer getAvailableWidgetSets
INFO: Widgetsets found from classpath:
com.vaadin.terminal.gwt.DefaultWidgetSet in jar:file:/stf/opt/maven/repository/com/vaadin/vaadin/6.2.6/vaadin-6.2.6.jar!/ in file:/stf/prj/My_Project/src/main/resources

Starting GWT compiler
Widgetset compilation completed

But when running the webapp, I got:
Widgetset does not contain implementation for org.vaadin.browsercookies.BrowserCookies. Check its @ClientWidget mapping, widgetsets GWT module descrioption file and re-compile your widgetset. Unrendered UIDL:

org.vaadin.browsercookies.BrowserCookies(NO CLIENT IMPLEMENTATION FOUND) id=PID7

Widgetset does not contain implementation for com.github.wolfie.meteorcursor.MeteorCursor. Check its @ClientWidget mapping, widgetsets GWT module descrioption file and re-compile your widgetset. Unrendered UIDL:

com.github.wolfie.meteorcursor.MeteorCursor(NO CLIENT IMPLEMENTATION FOUND) id=PID8 gr=75 th=10 pl=1000 di=2 im=theme://images/logo.png fr=0 disabled=false

I thought that it was building, since the addons that I wanted to use got detected.
Little did I know that it was not actually building!
Building with maven said:
[INFO] Updating widgetset
[INFO] establishing classpath list (scope = compile)
[ERROR] 07 Apr 2010 5:38:31 PM com.vaadin.terminal.gwt.widgetsetutils.ClassPathExplorer getAvailableWidgetSets
[ERROR] INFO: Widgetsets found from classpath:
[ERROR] com.github.wolfie.meteorcursor.MeteorcursorWidgetset in jar:file:/stf/opt/maven/repository/com/github/wolfie/meteorcursor/1.0.0/meteorcursor-1.0.0.jar!/
[ERROR] org.vaadin.browsercookies.widgetset.BrowserCookiesApplicationWidgetset in jar:file:/stf/opt/maven/repository/com/vaadin/sami/browsercookies/1.0.2/browsercookies-1.0.2.jar!/
[ERROR] com.vaadin.terminal.gwt.DefaultWidgetSet in jar:file:/stf/opt/maven/repository/com/vaadin/vaadin/6.2.6/vaadin-6.2.6.jar!/
[ERROR] in file:/stf/prj/My_Project/src/main/resources

The reason it was not building was because I was trying to use the stable version of the gwt-maven-plugin: 1.2
After reading this forum post again, I tried 1.3-SNAPSHOT of this plugin; and all my troubles went away.

So now I build it with maven, and it should give output like this:
[INFO] [gwt:compile {execution: default}]                                                                                                                    
[INFO] using GWT jars from project dependencies : 1.7.1
[INFO] auto discovered modules []
[INFO] establishing classpath list (scope = compile)
[INFO] establishing classpath list (scope = compile)
[INFO] establishing classpath list (scope = compile)
[INFO] establishing classpath list (scope = compile)
[INFO] establishing classpath list (scope = compile)
[INFO] establishing classpath list (scope = compile)
[INFO] Compiling module
[INFO] Scanning for additional dependencies: jar:file:/stf/opt/maven/repository/com/vaadin/vaadin/6.2.6/vaadin-6.2.6.jar!/com/vaadin/terminal/gwt/client/
[INFO] Computing all possible rebind results for 'com.vaadin.terminal.gwt.client.WidgetMap'
[INFO] Rebinding com.vaadin.terminal.gwt.client.WidgetMap
[INFO] Invoking
[INFO] Detecting Vaadin components in classpath to generate ...
[INFO] Widget set will contain implementations for following components:
[INFO] com.github.wolfie.meteorcursor.MeteorCursor
[INFO] com.vaadin.ui.AbsoluteLayout
[INFO] com.vaadin.ui.Accordion
[INFO] com.vaadin.ui.Button
[INFO] com.vaadin.ui.CheckBox
[INFO] com.vaadin.ui.ComboBox
[INFO] com.vaadin.ui.CssLayout
[INFO] com.vaadin.ui.CustomComponent
[INFO] com.vaadin.ui.CustomLayout
[INFO] com.vaadin.ui.DateField
[INFO] com.vaadin.ui.Embedded
[INFO] com.vaadin.ui.Form
[INFO] com.vaadin.ui.FormLayout
[INFO] com.vaadin.ui.GridLayout
[INFO] com.vaadin.ui.HorizontalLayout
[INFO] com.vaadin.ui.Label
[INFO] com.vaadin.ui.Link
[INFO] com.vaadin.ui.ListSelect
[INFO] com.vaadin.ui.MenuBar
[INFO] com.vaadin.ui.NativeButton
[INFO] com.vaadin.ui.NativeSelect
[INFO] com.vaadin.ui.OptionGroup
[INFO] com.vaadin.ui.OrderedLayout
[INFO] com.vaadin.ui.Panel
[INFO] com.vaadin.ui.PopupView
[INFO] com.vaadin.ui.ProgressIndicator
[INFO] com.vaadin.ui.RichTextArea
[INFO] com.vaadin.ui.Select
[INFO] com.vaadin.ui.Slider
[INFO] com.vaadin.ui.SplitPanel
[INFO] com.vaadin.ui.TabSheet
[INFO] com.vaadin.ui.Table
[INFO] com.vaadin.ui.TextField
[INFO] com.vaadin.ui.Tree
[INFO] com.vaadin.ui.TwinColSelect
[INFO] com.vaadin.ui.Upload
[INFO] com.vaadin.ui.UriFragmentUtility
[INFO] com.vaadin.ui.VerticalLayout
[INFO] com.vaadin.ui.Window
[INFO] org.vaadin.browsercookies.BrowserCookies
[INFO] Done. (2seconds)
[INFO] Compiling 1 permutations
[INFO] Permutation compile succeeded
[INFO] Linking into /stf/prj/My_Project/src/main/webapp/VAADIN/widgetsets
[INFO] Link succeeded
[INFO] Compilation succeeded -- 40.785s

To be able to serve my webapp using tomcat launched from eclipse I need to compile the GWT stuff into src/main/webapp . So unlike the instructions I mention at the top of this post, some key parts of my pom is as follows:
<!-- Compiles your custom GWT components with the GWT compiler -->
<extraJvmArgs> -Xmx512M -Xss1024k</extraJvmArgs>
<!-- Updates Vaadin 6.2 widgetset definitions based on project dependencies -->
<!-- also delete the generated vaadin web content -->

Thursday, 4 March 2010

vaadin 6.3 ant build target

The vaadin source web page still has out-dated build instructions.
I tried:
vaadin/6.3/build>$ ant package-linux                                                                                                         
Buildfile: build.xml

Target "package-linux" does not exist in the project "Vaadin".

Total time: 0 seconds

Looking at the following I realised that things have changed a bit:
$ ant -p
Buildfile: build.xml

Main targets:

build Build package required files, without packing them.
compile-widgetset Compiles the widgetset given as the first parameter
package-all Build public packages.
package-jar Create vaadin-x.y.z.jar file.
package-jar-quick Create vaadin-x.y.z.jar file quick.
test-build used for testing build.xml
test-package used for testing build.xml
Default target: package-all

So I tried the following starting building like crazy:
$ ant package-all                                                      
Buildfile: build.xml

But it got stuck on:

[echo] Checking out manual from repository
[mkdir] Created dir: /stf/prj/fs/vaadin/6.3/build/checkout

Finally I did:
$ ant package-jar

and the jar finally got built!

Total time: 10 minutes 49 seconds

Will try out package-jar-quick next...

This made me shout out complaints about ant (ask my co-workers) and fall in love with maven all over again.

Tuesday, 2 March 2010

How to make Archiva less paranoid about passwords

After just 3 login attempts a user's account is locked by Archiva, which is quite bad if a whole team and continuous integration servers uses the same account.

I think you should just add an exponentially growing timeout to when the user can log in (maybe per source ip) or at least make it configurable from the frontend. But anyways, for our internal/firewalled archiva this sort of thing is a bit of over kill.

I finally found out how to convince it to be more lenient.
Just add the following content:

to the equivalent file to your system: