Archive for March 6th, 2006

Mar 06

Setting up Subversion

Today I will go about Setting up subversion. I am not going to install subversion since it is already installed by fedora.
The version FC 4 installs is

svn, version 1.1.4 (r13838)
compiled Apr 13 2005, 12:20:50

Copyright (C) 2000-2004 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).

The following repository access (RA) modules are available:

* ra_dav : Module for accessing a repository via WebDAV (DeltaV) protocol.
- handles ‘http’ schema
- handles ‘https’ schema
* ra_local : Module for accessing a repository on local disk.
- handles ‘file’ schema
* ra_svn : Module for accessing a repository using the svn network protocol.
- handles ‘svn’ schema

After doing yum update subversion

svn, version 1.2.3 (r15833)
compiled Aug 26 2005, 03:42:45

Copyright (C) 2000-2005 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).

The following repository access (RA) modules are available:

* ra_dav : Module for accessing a repository via WebDAV (DeltaV) protocol.
- handles ‘http’ scheme
- handles ‘https’ scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
- handles ‘svn’ scheme
* ra_local : Module for accessing a repository on local disk.
- handles ‘file’ scheme

  • Now what I have to do is set up repositories
  • Get a subversion dump from the old system.
  • Import the Subversion Dump

0
comments

Mar 06

Getting upto speed with GPG

For all of you conspiracy theorist and Security Freaks out there. This is what I found out today.
They are out to get you!!! So be prepared!!!!
One way to do so is to start using GPG which is an open source implementation of PGP which started off this craze of Security and Public Key Encription. This is what I found out on my journey.
( Read more )

0
comments

Mar 06

Setting up Squid

Be sure the set these variables in your squid.conf file in /etc/ directory
* httpd_accel_host virtual
* httpd_accel_port 80
* httpd_accel_with_proxy on
* httpd_accel_uses_host_header on

All the rest is pretty straight forward.
You will also have to configure your iptables to enable transparent proxy.

Check this Howto

0
comments

Mar 06

IpTable Setup for Routing Internet Traffic

# Set up IP FORWARDing and Masquerading
iptables –table nat –append POSTROUTING –out-interface eth1 -j MASQUERADE
iptables –append FORWARD –in-interface eth0 -j ACCEPT

echo 1 > /proc/sys/net/ipv4/ip_forward

This is not enough in FC4. You should also enable trusted and masquarade for the LAN interface in SELinux.

0
comments

Mar 06

Password Hashing

How it got me Started:

I was going through the Passwords in Mysql and saw that all the passwords for users was in some cryptic text. Initially I thought that there is a function which Encoded the password before storing and decoded the password before comparing. Turned out that I was totally wrong.
( Read more )

0
comments

Mar 06

Implementing Quartz in Spring

Today I went about trying to implement quartz in my application. With spring the integration is very simple. Spring has implemented all that is required to get quartz up a running. Setting a Quartz Job is a 3 Step process. I will go through each process.

( Read more )

0
comments

Mar 06

Drool's pretty Cool

Today I took a look at Drool. Since JBoss recently got together with Drool for their jBPM Module.

Upfront Drool looks pretty cool and I can see plenty of instances where I can use drool to sort of factor out the business logic.
One thing that comes to mind is the using drool to do tax computation since tax changes every year.
Initally I thought of having the tax module as a seperate jar which could be changed every year. But now with drool I think I will be changing drools metadat (xxxx.drl) file.
I will be posting a more detailed post with my discoveries and pains I had with drool.
Ciao.
Thomas

0
comments

Mar 06

My first Dig at JBoss

Yesterday and today I dug into JBoss and tried the tutorial which is put up at JBoss site.

I downloaded
JBoss AS 4.0.3
JBoss IDE 1.5.0.M3
And all the tutorials.

Initally I tried downloading the JBoss Plugin but that did not work with my version of Eclipse. So I decided to download the IDE provided JBoss incluse of Eclipse etc.

The bundled one worked for me.

Following the tutorial was a breeze. However when I deployed the application the first page came out fine. When I tried to run the servlet it threw a Servlet Exception. Dug in a found that the Servlet Exception was being caused by a ClassCastException at
home = (FiboHome) PortableRemoteObject.narrow(ref, FiboHome.class);

Since I am new to JNDI I started poking around with the
Object ref = context.lookup(“java:/comp/env/ejb/Fibo”);
and the deployement discriptors.
Trying all permutations and combinations of one or the other. Then I got back to searching the net. I also lurked in IRC channels to get some hints. Thats when I hit the site.

http://www.jboss.org/?module=bb&op=viewtopic&t=59192

which lead me to sites

http://www.jbossgroup.com/index.html?module=bb&op=viewtopic&p=3887843

http://jira.jboss.com/jira/browse/JBAS-1775

http://wiki.jboss.org/wiki/Wiki.jsp?page=ClassLoadingConfiguration

http://jira.jboss.com/jira/browse/JBAS-1691

Finally like I mentioned in the forum

This is basically a classloading problem.
The new JBoss does not have a flat classloader like the old JBoss. So if you load a class in your EJB and you load a class in your servlet even though the bytecode is the same they are treated as diffrent classes.

So for the tutorial to work you should remove the FiboEJB-client.jar from your FiboWEB.war file. Your servlet will reference the class FiboHome from the FiboEJB.jar file.

Hopefully the maintainers will fill in this part in the tutorial.
Till the next blog……

0
comments

Mar 06

Drupal Attachment Module Configuration Problems

Yesterday I had a terrible time with Drupal. It all started with some consern regarding overwriting files with the Drupal Upload Module later I found out that the upload renames the files even if we upload files with the same name. However they Have to be in diffrent pages.

Sombody on the Channel told me to try the Attachment module. Reading the docuementation it looked pretty straight forward. Install the fileManager Module. Install the Attachment Module and you are ready to go.

However it was not that easy. When I Installed the Attachment Module a UI to attach files did not appear in the pages. Only digging in deep into the documenation did I find that not only do you have to enable the module in access control but you will have to enable it in
Administrator – content – content types – xxx – configure and enable it to get it working.
That was not the end of my worries. When I attached my files the link that pointed to the files were all in a mess. I used to get a url http://mysite.com?p=http://mysite.com/files/active/0/xxx.yyy
Where it was supposed to be only

http://mysite.com/files/active/0/xxx.yyy

Looking deep into the forum I found that it was a bug and there was a patch written for it.
The problem has been discussed at Drupal Attachment Moduel URL problem

— attachment.module 2005-07-15 11:20:29.000000000 +0200
+++ attachment.module.new 2005-07-15 11:30:07.000000000 +0200
@@ -336,7 +336,7 @@

$attrib = empty($attachment['description']) ? array() : array(‘title’ => $attachment['description']);
- $row[0]['data'] = l($text, module_invoke(‘filemanager’, ‘url’, $attachment['fid']), $attrib);
+ $row[0]['data'] = module_invoke(‘filemanager’, ‘l’, $text, $attachment['fid'], TRUE, $attrib, TRUE);
$row[0]['class'] = ‘filename’;

0
comments

Mar 06

How to use a dag repository

This post will help you to add other repositories to the current repositories when you try to install applications using yum.


First you import the keys for the RPM Keys. This can be done by the following command:
rpm –import http://dag.wieers.com/packages/RPM-GPG-KEY.dag.txt
alternatively you could also download the key to your local directory and execute the following command
rpm –import RPM-GPG-KEY.dag.txt

To get yum working you will have to tell yum where to look for the files. This can be done by adding the following section to /etc/yum.conf or, when available /etc/yum.repos.d/dag.repo

[dag]
name=Dag RPM Repository for Fedora Core
baseurl=http://apt.sw.be/fedora/$releasever/en/$basearch/dag
gpgcheck=1
enabled=1

Then all you need to do is give the yum command like
yum install xxx
yum update xxx

yum will look up dag.wieers.com repoistory too for the package
ciao.

0
comments