w3c blocks delivering dtd to eclipse (response code 503)

•March 13, 2010 • 1 Comment

This is so unfair! I am using eclipse with many xml and xhtml files. The Eclipse validator is very faithful and does DTD/schema checks all the time. So it happened that the w3cs servers had enough of my requests and started to deliver only a 503 response. They announced to do something like that in the following document:

http://www.w3.org/blog/systeam/2008/02/08/w3c_s_excessive_dtd_traffic

Now I started developing some application that reads mediawikis through the Java Wiki Bot Framework (https://sourceforge.net/projects/jwbf/), which is very nice … BUT! … whenever I try to get a page from a wiki, the framework wants to check the DTD. The DTD can’t be checked due to the w3c problem above. Hence, an Exception is thrown:

( jwbf-generic-mediawiki-DEVEL )
net.sourceforge.jwbf.core.actions.util.ProcessException: Server returned HTTP response code: 503 for URL: http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd

I reported a bug to jwbf (https://sourceforge.net/tracker/index.php?func=detail&aid=2969840&group_id=192186&atid=940382), but I would rather like to have my DTDs checked. If w3c can’t handle the impact of their standards, they should think again before they suggest DTD-checking.

So unfair…

Server returned HTTP response code: 503 for URL: http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd

ApacheDS 1.0.2 rpm Does Not Install Functioning Starting-Script

•April 21, 2009 • Leave a Comment

I downloaded the following rpm from Apache: apacheds1.0.2 and installed it whithout doing anything else. Everything went fine at first, but then I recognized, that the server didn’t start, though the script /etc/init.d/apacheds start finished with a success message. This problem did not show up when I used /etc/init.d/apacheds debug — I was able to reach the server, when I used this option, but who wants to debug all the time?! So, to make a long story short: I searched for a solution for a very long time and eventually found this post and it lead me to that jira entry.

With these documents I was able to solve the problem, as it was proposed in the latter one: I simply killed the option -user=$APACHEDS_USER in /etc/init.d/apacheds in the start section. Thank you, Ole Ersoy!

Suppressing Variable Substitutions and Header in Oracle SQL-Scripts

•December 4, 2008 • 1 Comment

So today I had another problem: I had an sql-script which should run on a database which changes ip-address from time to time (and does not have a domain name that would be found by any DNS). So I wanted to pass teh ip-address as a parameter, as well as the username and password. Imagine the script is called mySQLScript.sql, so it would be called from the command line as follows:

sqlplus -s /nolog @mySQLScript.sql /nolog $HOST $USER $PWD

The variables $HOST, $USER and $PWD have to be initialized before.

What I want to do with the script, is to select rows from table and then write them into a csv-file. So mySQLScript will look like the following:

CONNECT &2@&1/&3;
SELECT a, b, c, d FROM table;

To write the csv-file I want to use awk like this:

sqlplus -s /nolog @mySQLScript.sql /nolog $HOST $USER $PWD  \
	| awk '{print "\"" $1 "\",\"" $2 "\"," $3 "," $4}' \
	> csv.dat

But now I have the problem, that there is a line with the table-header in it, and one with the minuses, which seperate the heading from the data. And much worse: I have these lines which tell me that I was substituting something and say something like:

old 1: $1
new 1: myUserName

That’s not what I want. So after long searches, I found, that I can simply put these two lines in my script and everything works fine:

SET HEADING OFF;
SET VERIFY OFF;

The first is for the heading (who would have thought that 🙂 ), the second for the substitutions.

Be careful: You have to add these lines before the first verification comes up:

SET HEADING OFF;
SET VERIFY OFF;
CONNECT &2@&1/&3;
SELECT a, b, c, d FROM table;

Thanks to this post: http://www.mydatabasesupport.com/forums/oracle-server/367673-how-suppress-oracle-old-new-messages-sqlplus.html.

Using SQL*plus produces ORA-01034 and ORA-27101 errors

•December 3, 2008 • Leave a Comment

Well, great. No day without another stupid problem. This is one I am totally sure to have solved at least three times before, but never saved the solution in my memory. I was trying to use SQL*plus with my local Oracle Express Database 10.2.0.1.0 and I have another machine yet, that uses the same combination. So I knew I had to set ORACLE_HOME to the directory from which I can reach sqlplus by typing bin/sqlplus, I had to set ORACLE_SID to the standard XE and set the path to $ORACLE_HOME/bin:$PATH. What I did not remember were to things I found out by try and error, and this friendly document:

http://www.dba-oracle.com/sf_ora_27101_shared_memory_realm_does_not_exist.htm

1. ORACLE_HOME must not have a trailing slash!!!

2. ORACLE is case-sensitive, at least it was this time 😦 , so it must not be xe in my case, but has to be XE.

That was it. I hate it. Bad world, bad oracle, bad me, bad all, bad, bad, bad…

“Here Document” in Bash-Script made stupid problems

•December 2, 2008 • 4 Comments

In a bash-script I wrote I had a stupid problem with the “<<” (here document) operator. And this is only because I am too structured 🙂 I wanted to write an ftp-call inside a for-loop, something like that:

#!/bin/sh
for filename in `awk '{print $1}' /my/directory/myfilewithfilenames.dat`
do
    ftp -n <<EOFTP
        open my.ftp.host
        user myusername mypwd
        put $filename
    EOFTP
done

Do you see the problem? Well, it is simply, that the end of “here document”, the “EOFTP” must not be indented. It must look like this instead.

#!/bin/sh
for filename in `awk '{print $1}' /my/directory/myfilewithfilenames.dat`
do
    ftp -n <<EOFTP
        open my.ftp.host
        user myusername mypwd
        put $filename
EOFTP
done

This cost me half a day. And it is so ugly, insn’t it? I think I don’t like shell-scripting at all. I will return to python, or maybe perl, whereever I can. Grmpf.

initiate

•February 25, 2008 • 6 Comments

Ok, here is the first post, and it’s about like completely nothing. I promised to write about software problems and stuff, nearly 2 month ago. And what do I do? Well, actually nothing. Obviously. I’m too much into work and university, even too much to write about the things I have t do with all over the day. But maybe, maybe there will be a time in the not so far future where I will have to post here, because I will have to make an exam on EJB 3.0 and JPA 1.0. So, as nice as necessary, I will have to write too much about these topics. And if I will be f***ed up about all that, I will be forced to write it down exactly here. And. Because the if-clause is nothing else than if(true), I can assure you, this blog will be full of more or less interesting content very soon. Actually, at least more interesting than this post, I guess.