Tuesday, March 23, 2010

websvn multiviews

Still learning abc of apache webserver

Installing websvn on apache 2.2 on windows

I saw this http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg737009.html and fixed my multiviews issues with websvn

I have apache in D:\apps\apache and default folder is D:\apps\apache\htdocs
and websvn in D:\sharedapps\websvn

So i had to

1) set apache config properly

Alias /websvn "d:/sharedapps/websvn/"
(or try Alias /websvn "d:/sharedapps/websvn/wsvn.php")
Alias /templates "d:/sharedapps/websvn/templates/"

<Directory "d:/sharedapps/websvn">
  Options Indexes FollowSymLinks MultiViews ExecCGI
  AllowOverride All
  Order allow,deny
  Allow from all

2) configure websvn


$locwebsvnhttp = '';

Monday, March 15, 2010

wsadmin thin client


IBM websphere 6.1 document mentions thin WSAdmin thin client.

I had some trouble to get this thing running

This is what I did - starting from WAS installation

1) Created dir - C:\IBM\wsadmin61
2) Copy com.ibm.ws.admin.client_6.1.0.jar
3) Copy com.ibm.ws.security.crypto_6.1.0.jar
4) create properties dir and copy - soap.client.props,ssl.client.props and wsadmin.properties (sas.client.props not needed if you are using soap)
5) IBM says you have to use IBM jdk. I have Java 5 IBM JDK that came with WAS CE installation.
However I found that java.security file uses PKIX as trust manager and ssl.client.props that mentions com.ibm.ssl.trustManager=IbmX509 is not honored.
(IBM, what cool aid were you drinking when you wrote this documentation/implementation?)


Add these 2 lines


6) created scripts directory, and copied

7) went through all properties files once again, and checked for paths
in thin client, you can no longer have paths containing ${was.install.root} so beware


also notice

8) you dont have to copy key.p12 and trust.p12 but you can copy them if you want to

9) you can uncomment this if you need full trace (and dont overwrite it!)


My wsadmin.bat looks like this



set WAS_HOME=c:\ibm\wsadmin61
set JAVA_HOME=C:\Apps\IBM\Java50

@REM C_PATH is the class path. Add to it as needed.
set C_PATH=%WAS_HOME%\com.ibm.ws.admin.client_6.1.0.jar;%WAS_HOME%\com.ibm.ws.security.crypto_6.1.0.jar
set SOAPURL=-Dcom.ibm.SOAP.ConfigURL=file:%WAS_HOME%\properties\soap.client.props
set CLIENTSSL=-Dcom.ibm.SSL.ConfigURL=file:%WAS_HOME%\properties\ssl.client.props

if exist %JAVA_HOME%\bin\java.exe (
set JAVA_EXE=%JAVA_HOME%\bin\java
) else (
set JAVA_EXE=%JAVA_HOME%\jre\bin\java

%JAVA_EXE% -classpath "%C_PATH%" -Duser.install.root=%USER_INSTALL_ROOT% %CLIENTSSL% %SOAPURL% com.ibm.ws.scripting.WasxShell %*



These gave me an idea that there is something wrong with java.security file

This is guy is using it with WAS 7.0 and latest jython

Thursday, January 28, 2010

websvn compare_form url

websvn uses post by default when comparing subversion files (different versions/branches/tags)

I tried to come up with a get url so that it would still do the same

Friday, January 8, 2010

Ant goodies 1

Suppose you have a library project checked into subversion

|_ log4j-1.2.15.jar

and you wanted to copy such library jars to your target dir when you kick an ant build

here is what I created!


            <findAndCopy fromdir="${master.library.dir}" todir="${lib.dir}" filenames="${project.classpath.compile}" />

where project.classpath.compile=log4j-1.2.15.jar,junit-4.7.jar

<macrodef name="findAndCopy">

<attribute name="fromdir" />

<attribute name="todir" />

<attribute name="filenames" />


<for list="@{filenames}" param="file">


<echo>iterate == '@{file}'</echo>

<copy todir="@{todir}" flatten="true">

<fileset dir="@{fromdir}" includes="**/*.jar">

<filename name="**/@{file}" />










oh, I do use ant-contrib, that is evil!

Back to ant

In our organization they were using an age-old version control system

A new guy tried to introduce subversion maven and hudson

people like subversion and hudson

but they dont know maven2. Its black magic!

So we are going back to ANT

Thursday, December 10, 2009

perl oracle and apache http server

I need to port an old perl app to java

existing app uses apache http server, perl and oracle

On my windows xp, I had cygwin already (installed and in PATH) and had to

1) unzip oracle instant client, and set PATH to inclue it
2) install strawberry perl v5.10.1
3) install DBD::Oracle using cpan (which can give you some trouble)

4) THEN install apache http server
5) configure it for cgi
Options Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews

and use #/strawberry/perl/bin/perl in my .pl files

and I was all set!

Also I learnt that if you change PATH variable after installing apache http server, even if you restart the service, it did not take the new PATH. So after putting oracle instant client on PATH I had to reinstall apache http!

For step 3
if you are getting error like
status 512 .... DynaLoader.pm...
e.g. See

or if you see
install_driver(Oracle) failed: Can't load 'C:/strawberry/perl/site/lib/auto/DBD/Oracle/Oracle.dll' for module DBD::Oracle: load_file:The specified module could not be found at C:/strawberry/perl/lib/DynaLoader.pm line 200

most probably, your oracle client is not in PATH
I just unzipped oracle instant client and put it in PATH
and then set some env variables, and only after that invoked cpan
you can do "force install DBD::Oralce" to ignore test errors
but i was able to run most of the tests fine.

maven dependency range


Be sure to look at this one

if you are using ranges, and you need / dont need snapshot versions as dependencies, there would be some big workarounds involved

e.g. using different profiles, central vs snapshot repositories and the bug fix for above - see the patch file attached in JIRA

and see alex's comment "Due to this bug we also gave up on version ranges (and might ultimately give up on maven....although we haven't gone there yet)."