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

woensdag 5 maart 2008

firefox, hetnet, netmail en delete

Op het werk (en thuis ook, eigenlijk alleen mac os x) kan ik alleen firefox gebruiken omdat alle opties op IE ongedaan zijn gemaakt. Nu heeft de firefox variant van netmail geen multiple select om items weg te mikken, wat het voor netmail van hetnet allemaal wat tijdrovend en rsi gevoelig maakt.
Een korte zoektocht op internet leverde echter de volgende url op
Helaas nog niet helemaal geschikt om op hetnet te gebruiken maar wel bijna: Ten eerste sleep de button die daar staat naar de bookmark balk van firefox, of klik gewoon nieuw bookmark aan onder bookmarks.
zet nu in de url van deze bookmark (te bereiken via "properties")

javascript:(function(){ function toggle(box){ temp=box.onchange; box.onchange=null; box.checked=!box.checked; box.onchange=temp; } var x,k,f,j; elements=window.frames["viewer"].document.forms; for (k=0; k<elements.length; ++k) { f=elements[k]; for (j=0;j<f.length;++j) if (f[j].type.toLowerCase() == "checkbox") toggle(f[j]); } })();

Als je nu deze bookmark kiest worden alle checkboxes getoggled, de bookmark kan ook in de bookmarkbar worden geplaatst, en is dan meteen te gebruiken.
Ik vermoed dat het ook voor Safari werkt maar daar heb ik net te weinig ervaring mee, mijn eerste poging faalde, helaas.

zondag 2 maart 2008

emacs trailing slash

is op windows default / wat natuurlijk vervelend is:
(add-hook 'shell-mode-hook

'(lambda () (setq comint-completion-addsuffix '("\\" . "")))

t)
zet m naar backslash.

windows processing message

sinds een tijd krijg ik een foutboodschap bij het aanmelden bij windows.
Windows - Geen schijf
exception Processing Message c00000a3 Parameters 75b6bf9c 75b6bf9c 75b6bf9c.
Weet niet waarom die boodschap er nu plotseling is, maar in mijn geval blijkt het te maken te hebben met de card readers die in mijn pc zitten.
Ik heb ze uitgezet met configuratie scherm -> systeem -> hardware -> apparaat beheer -> Medion Flash XL (CF USB, MS USB en SM USB)
Nu krijg ik de boodschap niet meer.

maandag 31 december 2007

Websphere Security

Currently I'm trying to port an application from WAS5.1 to WAS6.1. IBM's reputation of problem free migration and well supported and ducumented migration plans once again proves to be below the imaginary. The problem I run into lately was security: I ported over the settings for the ldap server. However that did not work out well, I even managed to cut of the branch I was sitting: I could not start the server anymore, and there for I could not modify the settings I just applied. The server quit with:

[31-12-07 12:06:23:222 CET] 0000000a ServiceLogger I com.ibm.ws.ffdc.IncidentStreamImpl resetIncidentStream FFDC0010I: FFDC closed incident stream file c:\Program Files\IBM\WebSphere\AppServer\profiles\profile1\logs\ffdc\server1_0000000a_07.12.31_12.06.23_6.txt
[31-12-07 12:06:23:191 CET] 0000000a ContextManage E SECJ0270E: Failed to get actual credentials. The exception is javax.naming.NameNotFoundException: [LDAP: error code 32 - No Such Object]; remaining name ''
at com.sun.jndi.ldap.LdapCtx.mapErrorCode(LdapCtx.java:3025)
at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2946)
at com.sun.jndi.ldap.LdapCtx.processReturnCode(LdapCtx.java:2752)
at com.sun.jndi.ldap.LdapCtx.searchAux(LdapCtx.java:1823)
at com.sun.jndi.ldap.LdapCtx.c_search(LdapCtx.java:1746)
at com.sun.jndi.toolkit.ctx.ComponentDirContext.p_search(ComponentDirContext.java:383)
at com.sun.jndi.toolkit.ctx.PartialCompositeDirContext.search(PartialCompositeDirContext.java:353)

Turned out that the copy paste action of the groupMemberId (advanced properties under ldap settings) from nsRole:nsRole to groupOfUniqueNames:uniqueMember was one bridge to far.

donderdag 27 december 2007

websphere act as part of local os.

Currently fighting with WAS 6.1, security. The manual (http://publib.boulder.ibm.com/infocenter/wasinfo/v6r1/index.jsp?topic=/com.ibm.websphere.nd.doc/info/ae/ae/tsec_localos.html) states: Act as part of the operating system.
Which is quite easy according to MS: Computer Configuration\Windows Settings\Security Settings\Local Policies\User Rights Assignment\.
Unfortunately this option is disabled under my account @ work. However secpol.msc does get me there.
To stop mcafee do: net stop mcshield