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
i.e.
use
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

http://jira.codehaus.org/browse/MNG-3092

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)."

:)

Wednesday, December 9, 2009

maven dependency range

if you read about maven enforecer plugin documentation

you will come across


and

http://docs.codehaus.org/display/MAVEN/Dependency+Mediation+and+Conflict+Resolution

I somehow found out that, to allow for snapshots you can also specify [1.0.0-!,2.0.0)

notice the use of exclamation mark!

Thursday, December 3, 2009

building apache tuscany 2.0

If you are building apache tuscany from source and you get errors about a bunch of jars and plugins missing in the maven repository you are pointing to, point your repository to http://repository.apache.org/content/repositories/central

Note that the browser would redirect it to https but you can use http so that maven does not crib about certificates

EDIT: well apache changed their behavior to 302 my requests from http to https


be sure to import the certificate before you want to see javax.net.ssl.SSLHandshakeException