donderdag 2 juli 2009

Eclipse galileo

Just installed Eclipse Galileo the latest and gratest as I type.
with some quirks.
I need to set the proxy, by default it sets it to a native active provider, I had to change it to a manual "active provider".
Installation of subversive from polarion went fine allthough I forgot to add connectors
(available from http://community.polarion.com/projects/subversive/download/eclipse/2.0/galileo-site)
m2eclipse for maven support (http://m2eclipse.sonatype.org/update, exclude subclipse handler optional,and maven project configurators.
spring ide (http://springide.org/updatesite)

Than I run into a
Get repository folder children operation failed.
svn: OPTIONS of '/svn/restofurl': 500 Server Error (http://serverrr.itc.intranet:8083)
svn: OPTIONS request failed on '/svn/restofurl'

Error, which was solved by adding the serverrr.itc.intranet to the list of "bypass from proxy" in the proxy pane in the preferences

woensdag 4 februari 2009

mvn create artifacts

Just played around with the wicket quickstart.
all well and fun however importing it in eclipse is not making it a web project.
for eclipse ganymede, mvn eclipse:eclipse -Dwtpversion=2.0 worked almost.
It still gives an error in eclipse: Java compiler level does not match the version of the installed Java project facet. Unknown Faceted Project Problem (Java Version Mismatch) I fixed that by 1: in the compiler properties downgrading to java version 1.4, and than in projects facets setting the java version back to 5.0
et voila!

zondag 7 december 2008

mysql with launchd

Just tried to install mysql on ox leopard. Instead of the documented 'MySQL Startup Item' I've chosen to go the mac road: launchd, as I understand mac's equivalent of windows services. It's something unique to mac and apparantly very flexible, check it out.


Mysql installs fine from the pkg distribution, however it gets installed under root:wheel.
bringing the file: com.mysql.mysqld.plist in /Library/LaunchDaemons/com.mysql.mysqld.plist will make it automatically pick it up during startup, you may manually control it by sudo launchctl (un)load com.mysql.mysqld.plist.



starting mysql under the user mysql. However logging to mysql to change the password: mysqladmin -u root password 'secret' fails with the message:

error: 'Access denied for user 'root'@'localhost' (using password: NO)'


I've not been able to solve the problem, the documentation failes on this point. I could not manually start mysqld because, it was installed under root:wheel. So the only way to get it right: reinstall it, chmod -R jeroen:admin /usr/local/mysql*.
Than do the mysqladmin -u root password 'secret'. After that update the com.mysql.mysqld.plist file to jeroen/admin for group/userid.
Hopefully this works

zaterdag 22 november 2008

motor in de garage.

Ik heb een motor en die staat mooi en droog in de garage. Alleen als ik de motor eruit wil halen ben ik enorm aan sleuren en trekken. Niet heel erg handig. Vanochtend heb ik een plateau gemaakt van de aanrechtbladen die eerder vervangen zijn (niet alles meteen weggooien), en 3 kleine transport-tableautjes verkrijgbaar bij de praxis voor 10 euro per stuk. Ik was bang dat 60 cm niet genoeg zou zijn om de motor op zijn standaard te laten staan, en heb dus een plateautje wat laten uitsteken, was achteraf niet nodig. Goed om je te realiseren dat het tableau erg beweeglijk is op het moment dat je de motor erop rijdt, veranker het aan de voor- en achterkant. Als de motor er eenmaal opstaat en je versnelt zal het plateau veel sneller wegschieten dan de motor (wet van impuls denk ik). Zorg ook bij wegrijden dat het tableau aan de achterkant gezekerd is.

blazeds

Last week I tried downloading blazeds to get it to work with flex, I compiled the source and followed the documentation to build it. However as usual the adobe documentation was not up to date: Here's what I had to do on mac (ox tiger).

  • Could not load definitions from resource net/sf/antcontrib/antcontrib.properties. Solution download ant-contrib from sourceforge, and select ant-contrib from the package. Store the obtained jar in /Developer/Java/apache-ant-1.7.0/bin/lib. And do sudo ln -ns /Developer/Java/apache-ant-1.7.0/bin/ant /usr/bin/ant to make a symbolic link.

  • Permgen error. Gave export ANT_OPTS="-XX:MaxPermSize=512m", which does the trick

  • some of the files ant generates can not be removed, making ant main to fail. I had to "sudo ant main" to make it all work..

zondag 19 oktober 2008

netstat on mac

On windows I was able to find ports in use by doing netstat, on the mac (ox Tiger) I can give lsof -i TCP:8080 see here for other os variants.

vrijdag 7 maart 2008

Logging problems

Doing some unittests I could not get the logger to behave as expected. turned out that somewhere on the classpath commons-logging.properties was present.

System.out.println(this.getClass().getClassLoader().getResource("commons-logging.properties").toString());
System.out.println(this.getClass().getClassLoader().getResource("log4.jeroen").toString());
System.out.println(this.getClass().getClassLoader().getResource("log4j.properties").toString());
System.out.println(this.getClass().getClassLoader().getResource("org/apache/log4j/Logger.class").toString());
System.out.println(this.getClass().getClassLoader().getResource("org/apache/commons/logging/Log.class").toString());

Adding this file to the root of src/test/java folder fixed this problem.
contents of file is:
org.apache.commons.logging.LogFactory=org.apache.commons.logging.impl.LogFactoryImpl
org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger
I've not been able to locate this file, can be on Websphere, Spring or god knows.

The combination of commons-logging, log4j is influencing a successful display of org.hibernate.type. The priority is set to trace, for this package name, but after log4j-1.2.12 is trace and debug separated, so debug is not working. This combination of log4j and commons-logging working for me is:

jar:file:/C:/projects/apache-log4j-1.2.15/log4j-1.2.15.jar!/org/apache/log4j/Logger.class
jar:file:/C:/projects/commons-logging-1.0.2/commons-logging-api.jar!/org/apache/commons/logging/Log.class
log4j.logger.org.hibernate.type=DEBUG, A1

It's getting trickier and trickier, maybe the introduction of commons-logging was a bad idea, especially in combination with Websphere.
logging information can be forced with log4j.debug=true