Marco Walther's Weblog

Main | Next page »

20081102 Sunday November 02, 2008

Engineers without Borders - wifi4crea Project

I'm involved with the "Engineers without Borders" for allmost a year now. We are currently building an annex chapter of the San Francisco - Professional Chapter. A lot of nice, long names. What it really means is, that a group of Sun people work together to help. The rest is just organizational/logistical.

We are trying to build a wireless internet link to the CREA - Panama reseach station. They collect a lot of meteorological data which needs to go to researchers and on the other hand, an internet connection will also help in the education of villagers in more sustainable methods of agriculture.

I was there in early September for a feasibility trip. It looks like we can build an long range WiFi link to the 'more urban' :-) areas where DSL would be available.

So far, so good. But since that is a complete volunteer effort on our part, we have to raise the money we need.  We were selected to represent EWB at a globalgiving.com 2008 Project Challenge. See the little image for a link. If we can raise enough money until November 21st, there are even prices;-)

Thanks for your support.

Have fun out there;-)

-- Marco

( Nov 02 2008, 05:26:44 PM PST ) Permalink

20081010 Friday October 10, 2008

Glassfish v2 and syslogd - an Adventure

I did not post here for a long time. One of the reasons was, that I was not really able to say too much about what we were trying to build. But now "Project Kenai" has made it to the public beta. So I can say that I was working on it for the last 18 or so month;-)

We run JRuby inside Glassfish and that's why I was interested in GF again. We have all kinds of servers running and we would like to consolidate all of the log information for easier handling. Most of the native Unix daemons don't have a problem with that, they can all log their information via syslogd. Glassfish claims to be able to do that as well. But I would currently say, it's more a claim than reality in the official builds:-(

We tried to let GF log via syslogd and found very quickly two problems:

But GF is OpenSource, right? I had already looked at the code to find the reason for the 6291 bug. Could I change it so that it would do what I wanted? It turns out that it was not too hard to get a first version working;-)

It's probably not perfect and you can clearly see the steps I took but the two little patches below will:

My first tests were successful. Now we have to decide if we want to use a patched version of GF.

The two patches are against the modules appserv-core and appserv-native.

For appserv-core, I followed the normal build instructions from the wiki and used the TSJSAS91_FCS_BRANCH tag. (I did a complete build but I don't think that would be needed) I then transplanted the two interesting class files into a copy (appserv-rt.jar) of our official GF version for testing.

I did not get the appserv-native module via the normal CVS/maven checkout. But since I found the problematic file before with the Fisheye in the SVN tree, I was able to check that module out via SVN. The v3 build instructions help to find the right SVN tree, but we are still interested in v2 here;-) It's native code, so if somebody wants to try that, you will need the Sun C compilers etc.

After building and replacing the libutilforsyslog.so, everything seem to be working as expected and I can enjoy my logs via the normal syslogd setup;-) Below are both, the normal server log and the access log directed to LOG_LOCAL6:

Oct 10 21:22:58 kenaidev13 SJSAS81_server.log: [ID 702911 local6.info] [#|2008-10-10T21:22:58.934-0700|INFO| \
    sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=17;_ThreadName=httpSSLWorkerThread-8080-0;| \
    PWC1412: WebModule[] ServletContext.log():
Oct 10 21:22:58 kenaidev13 Processing HomeController#index (for 127.0.0.1 at 2008-10-10 21:22:58) [GET]
Oct 10 21:22:58 kenaidev13   Session ID: 376348f6751afdd3c1220777a0ee15ca
Oct 10 21:22:58 kenaidev13   Parameters: {"controller"=>"home", "action"=>"index"}
Oct 10 21:22:58 kenaidev13 Rendering template within layouts/kenai.com
Oct 10 21:22:58 kenaidev13 Rendering home/index
Oct 10 21:22:58 kenaidev13 Completed in 0.34706 (2 reqs/sec) | Rendering: 0.30226 (87%) | DB: 0.00000 (0%) | 200 OK [http://localhost/]
Oct 10 21:22:58 kenaidev13 |#]
Oct 10 21:22:58 kenaidev13 [9374]: [ID 702911 local6.info] "127.0.0.1" "NULL-AUTH-USER" "10/Oct/2008:21:22:58 -0800" \
    "GET / HTTP/1.0" 200 14058

If you made it all the way here, those are the two little patches:  appserv-core.patch & appserv-native.patch.  They are in no way official  or fully tested. But they show that somebody can quickly add functionality if needed;-)

Have fun & I hope I'll write more often again;-)
 -- Marco


( Oct 10 2008, 11:03:01 PM PDT ) Permalink

20071227 Thursday December 27, 2007

An Article about my Highschool/Gymnasium

OK, this article is not really new any more. It took almost a year until I came across it. But it's always interesting to see what your old school is doing. Especially when a (German) national paper is praising it very much. Here is a link to the "Die Welt" article titled "Germany's Smartest Pupils".

I checked a little more into it and I even found out that three of my former teachers are still there.

-- Marco

( Dec 27 2007, 02:43:37 PM PST ) Permalink

20071112 Monday November 12, 2007

One Laptop for You and One for a Child

Maybe you have heared about it. There is the One Laptop Per Child (OLPC) initiative out there. Now it's your chance to get one of the first models. For a limited time (today until Noveber 26.) you can pay $ 399 and get one of those nice pieces. But more importantly one additional laptop is sent to a child in need.

Two nice pieces of adverticement for this action:

G1G1


I only have to convince my family that I need another work computer;-)

OK, a little update. I did not buy the g1g1. Instead I decided that I did not need another computer, so I donated the money for one and the Sun Foundation should match that shortly.(12/27/2007)

( Nov 12 2007, 11:22:58 AM PST ) Permalink Comments [1]

20071004 Thursday October 04, 2007

Fun on my Bicycle - Waves to Wine

Waves to Wine LogoFor the weekend I joined Team Sun and 1600 other bicycle riders for the Northern California MS150 Bike Tour "Waves to Wine". I did not know what I get into since this was my first participation in such a fund raising ride. But I must say, it was a lot of fun. I did not really train for a longer bike ride since I'm currently really swampt with work. I do my daily two times 15 miles as part of my commute but that was it.

Partial Team Sun @ StartSo I was a bit worried before the start on Saturday. But the weather was very nice and the ride was good. It was a great day to ride over the Golden Gate Bridge. The ride was smooth and I kept in my own time esitmates for the something like 77 miles. Highway One is beautyful North of San Francisco, but I guess a couple of motorists were surprised by those many bikes.


We spent the afternoon and the night in Rohnert Park. There was a nice program, a good dinner and beer and wine, but I did not drink too much after the days workout.My family joined us for the afternoon and the night in tents. So everybody had fun.

The next morning started a bit cold. But that was OK. I felt fine after the Saturday ride, so we started at 8:00.  The route went over small roads through the wine country. We did not meet too many cars and it was all around very nice.


The 75 miles went by quickly and I reached the finish line around 2:30.

Overall it was a fun weekend. And the outcome as a fund raising effort was also quite good. I was able to raise over $ 750 and Team Sun  with it's fifteen riders raised over $ 11,500. So it was a big success. The consensus from all the riders I've seen after the ride is that we will be doing that again next year.


As always, have fun out there.

Marco

( Oct 04 2007, 10:44:48 PM PDT ) Permalink

20070612 Tuesday June 12, 2007

Perl, Solaris 10/OpenSolaris and Sys::Syslog - Solved

I ventured a bit into different languages lately. Over the last couple of days, I tried to install and run the mailing list manager Sympa on OpenSolaris and the CoolStack packages.

Building the pieces were not a big problem. But the first problem I encountered, was the missing BerkeleyDB in the CoolStack packages. OK, BerkeleyDB is not hard to build and that was fixed quickly once I knew what was going on.

The next problem was, that the Sys::Syslog module apparently does not work so well in newer Solaris versions. I searched the web but I was not able to find any solution. So I looked at the code and decided that I would write a targeted Sys::Syslog for Solaris which would actually use the libc interfaces instead of trying to do everything by hand.

Here is my little modified module, I hope, maybe somebody will find this useful. It uses the same API as the original module, so it should work as a drop-in replacement with the only exception that it actually communicates with the syslogd;-)

Have fun.

-- Marco

Fri Jul 13 17:12:06 PDT 2007

OK, today I checked and there is actually a newer version of Sys::Syslog which works just fine on Solaris 10/OpenSolaris. I compiled it and replaced the version in the CoolStack Perl.  Now I'm happy with that;-) That's what you get when you blindly use source packages of some software:-(

( Jun 12 2007, 10:06:14 AM PDT ) Permalink Comments [2]

20070507 Monday May 07, 2007

Eco Live 2007

I know, I should have spend my Saturday preparing for JavaONE and NetBeans Day. But instead I went to the Eco Live 2007 and listened to Dave Douglas and Robert F. Kennedy, Jr. . Let's say I thought I knew quite a bit about what's going on, but Robert F. Kennedy, Jr.'s presentation was a real eye opener. I hope I can get a hold of that presentation, and then everybody around me will be forced to watch it;-) I did not know really know how much damage was done to the democracy and to the environmental protection laws during the last six years:-( I had seen some of it, but I did not even hear about half of it.



At least I got his book. So that will skip right to the top of the stack as soon as I have a little time to read on the train again. So, please my good American friends 'Get informed'. And I mean more than just your Fox News. The world is larger than your nightly speeder, Anna Nicole Smith or neighborhood shooting. I don't want to say that that information isn't important as well, but there is more out there, try to find it. The internet is your friend, use it.

I'm very proud that Sun did actually sponsor this event. One step in the right direction. Thank you.

The next step is Java ONE. which starts officially on Tuesday but with a lot of activity already on Monday. Take Public Transit or bike to the conference! Sun has again partnered with the San Francisco Bike Coalition to offer a free "Bike Valet" services. The "Bike Valet" service will be available Monday through Thursday from 8:00 am - 7:00 pm and Friday from 8:00 am - 1:00 pm in front of the Moscone Center South Hall. Please consider making use of this offer.

I won't take my bike, I tried to find a way last year, but I'll use BART to get to the Moscone Center. I hope I'll see you there.

( May 07 2007, 12:04:27 AM PDT ) Permalink Comments [1]

20070215 Thursday February 15, 2007

The First JavaOne Flyer - Online Only

JavaOne FlyerUsually I try to stay out of the big announcements. But an email today caught my eye. You know, all those high-gloss flyers you get for diverse expos and conferences are using a lot of resources. Sun decided to to the first round for this years JavaOne online-only. If you have read some postings here, you will know that I really like that idea.

Here are the estimated resource savings:

"By producing this piece virtually, the Eco group has calculated the savings Sun has made:
Savings from not sending DM1 this year
-Assuming (based on last year) DM1 is equivalent to 2.5 pages of 0% recycled copy paper
-Total paper saved = 4.63 tons
-Greenhouse Gases reduced (CO2 equivalents) = 13  tons (26,297 lbs)
-Reduction in wood use = 13 tons
-# of trees saved (assuming 1 tree makes 16.67 reams of copy paper or 8,333.3 sheets) = 111
-Reduction in wastewater (and associated water pollution) = 78,616 gallons *(equivalent to 838K cans of soda)*
-Reduction in solid waste (stuff sent to landfills)  = 5.1 tons"

I think that's a good start. So please head on over to the JavaOne web site to read more about  the upcoming conference.

 

( Feb 15 2007, 03:34:38 PM PST ) Permalink

20061211 Monday December 11, 2006

VWP @NetBeans 5.5 and project update

We finally released the Visual Web Pack for NetBeans 5.5;-) So I might actually write a couple of more entries here again.

Some people see problems when they try to take a project from the VWP TP and open/build it with the final version of VWP. Something like:

I installed the new version of VWP but when I want to use my
previous project it shows below error:

C:\TP_Project\nbproject\build-impl.xml:419: Warning: Could not find file C:\TP_Project\${libs.woodstock-components.classpath.libfile.6} to copy.
BUILD FAILED (total time: 1 second)

The problem is that the libraries for the components have changed. Normally that should be handled automatically on project open when the project properties are synchronized with the values from the IDE. But when there are no other changes, to the IDE, the regeneration of the nbproject/build-impl.xml might not happen.

So when you see this problem while building/deploying a TP project, do the following:

The reopen will regenerate the nbproject/build-impl.xml with the right information.

I hope this is helpfull;-)

Thanks,

-- Marco

( Dec 11 2006, 02:41:56 PM PST ) Permalink

20061031 Tuesday October 31, 2006

A little update on our PV system

It has already been a year since we generate a lot of our electricity on our roof. Starting in October 2005 we got our new meter. So this years October bill was the time when PG&E did the true-up over the year.

We did not have to pay for any used electricity;-) We only payed for the fixed connection costs (basically that PG&E runs a wire to your house and that they provide the meter) something like six dollars per month.

Our PV system produced around 5080 kWh over the last year, that's more than the estimated 3700 kWh;-) Our household used an additional 1040 kWh from PG&E over the year. I know, other houses use that in a month;-)

Overall I think we saved something like 720 dollars on electricity costs and we avoided around 10,000 pounds of CO2 from coal firing power plants.
( Oct 31 2006, 11:29:51 AM PST ) Permalink

20061025 Wednesday October 25, 2006

NB 6 - trunk, Java SE 6 and KDE

Long time nothing on this blog. Sorry about that. But here I come again;-)

I started playing with NB 6 on top of the Java SE 6 RC builds. And as always I'm not using the default configuration. So I ran into an interesting problem. The NB IDE was not able to open an external browser on my Kubuntu 6.06 system:-(

That worked fine with all the NB 5.5 builds I played with, but as it turns out, NB 6 makes use of the new java.awk.Desktop classes when it's running on a newer JDK. But that class only throws IOExceptions when it isn't able to handle the browse() action.

So strace is your friend, and a few minutes later, I had:
[pid 15878] execve("/export/home/marcow/bin/gnome-www-browser", ["gnome-www-browser", "http://www.sun.com"], [/* 46 vars */]) = -1 ENOENT (No such file or directory)
[pid 15878] execve("/usr/local/sbin/gnome-www-browser", ["gnome-www-browser", "http://www.sun.com"], [/* 46 vars */]) = -1 ENOENT (No such file or directory)
[pid 15878] execve("/usr/local/bin/gnome-www-browser", ["gnome-www-browser", "http://www.sun.com"], [/* 46 vars */]) = -1 ENOENT (No such file or directory)
[pid 15878] execve("/usr/sbin/gnome-www-browser", ["gnome-www-browser", "http://www.sun.com"], [/* 46 vars */]) = -1 ENOENT (No such file or directory)
[pid 15878] execve("/usr/bin/gnome-www-browser", ["gnome-www-browser", "http://www.sun.com"], [/* 46 vars */]) = -1 ENOENT (No such file or directory)
[pid 15878] execve("/sbin/gnome-www-browser", ["gnome-www-browser", "http://www.sun.com"], [/* 46 vars */]) = -1 ENOENT (No such file or directory)
[pid 15878] execve("/bin/gnome-www-browser", ["gnome-www-browser", "http://www.sun.com"], [/* 46 vars */]) = -1 ENOENT (No such file or directory)
[pid 15878] execve("/usr/bin/X11/gnome-www-browser", ["gnome-www-browser", "http://www.sun.com"], [/* 46 vars */]) = -1 ENOENT (No such file or directory)
[pid 15878] execve("/usr/games/gnome-www-browser", ["gnome-www-browser", "http://www.sun.com"], [/* 46 vars */]) = -1 ENOENT (No such file or directory)
[pid 15878] execve("/export/home/marcow/usr/vspms/bin/linux/gnome-www-browser", ["gnome-www-browser", "http://www.sun.com"], [/* 46 vars */]) = -1 ENOENT (No such file or directory)
[pid 15878] execve("/export/home/marcow/usr/vspms/bin/gnome-www-browser", ["gnome-www-browser", "http://www.sun.com"], [/* 46 vars */]) = -1 ENOENT (No such file or directory)
[pid 15878] execve("/opt/Forte/teamware/bin/gnome-www-browser", ["gnome-www-browser", "http://www.sun.com"], [/* 46 vars */]) = -1 ENOENT (No such file or directory)
[pid 15878] execve("/export/home/marcow/usr/vspms/bin/linux/gnome-www-browser", ["gnome-www-browser", "http://www.sun.com"], [/* 46 vars */]) = -1 ENOENT (No such file or directory)
[pid 15878] execve("/export/home/marcow/usr/vspms/bin/gnome-www-browser", ["gnome-www-browser", "http://www.sun.com"], [/* 46 vars */]) = -1 ENOENT (No such file or directory)
[pid 15878] execve("/opt/Forte/teamware/bin/gnome-www-browser", ["gnome-www-browser", "http://www.sun.com"], [/* 46 vars */]) = -1 ENOENT (No such file or directory)

OK, once you know what the system is looking for, it's easy to fix;-) If your path does not contain a gnome-www-browser, create one via a simple symlink.

Maybe this helps some people.

Have fun,
-- Marco

( Oct 25 2006, 02:35:11 PM PDT ) Permalink

20060815 Tuesday August 15, 2006

It's the LinuxWorld Time Again and Other Related Events
So I'll visit the expo floor tomorrow and see what's new and interesting;-) I don't know why Sun decided not to participate in the expo. I didn't even see OpenOffice in the exhibitor list, I hope they are somewhere.

I'm playing with [K]Ubuntu lately. So another event which might be interesting is the Ubucon Conference right after the LWE (18. &19.) at Google in Mountain View.

And to give the Linux week a good end. There is the anual Linux Picnic at the Baylands Park in Sunnyvale on Saturday.
Picn*x XV - The Linux 15th Anniversary Picnic!

So have fun and get out there;-)
-- Marco

( Aug 15 2006, 08:44:19 PM PDT ) Permalink

20060616 Friday June 16, 2006

Application Server and Proxy Authentication

The problem came up at least twice so far on our Java Studio Creator Forum. How can the application server use a proxy to connect to remote webservices etc when the proxy setup requires user authentication?

It looks like the normal Java SE 5 JDK does not provide any system properties alongside http.proxyHost and friends. At least I could not find any reference in the official documentation.

I think I found a way;-) But - I can not test it!! I don't have a proxy setup which requires authentication. I did some tests with normal web site authentication and those seemed to work as expected;-)

This will only work with Java SE 5 or newer! In that version java.net.Authenticator changed a bit so that I can distinguish between authentication requests from normal servers and from proxies.

The Authenticator is not hard to write, I wrote one which takes additional system properties, http.proxyUserName, http.proxyPassword and the https.* versions. You can also write one which will find that information in a file or from LDAP if you like. In a development environment you could even bring up a dialog;-) But that will not work for headless systems;-)

The trick is, you have to get a default Authenticator registered with the jvm which runs the application server. That turned out to be a bit harder. I did not find any hook where I could execute some code in the global server at startup (or at least before the first connection attempt to the proxy). You can't add it to normal applications, the SecurityManager will not let you do that:-(

My solution to the problem was a little jar file in the boot classpath;-) I took the java.net.Authenticator source from the JDK src.zip and added a little static bit to it;-) Something like

   
    static {
        ProxyAuthenticator.registerProxyAuthenticator();
    }

That will make sure, my Authenticator will be the default one;-) If something later overwrites it, that's ok I guess.

So when a proxy server (or a web server) asks for authentication, my code will be invoked and I can do whatever I need to get the username and password;-)

To use this approach, add the following into the domain.xml in your application server.

<jvm-options>-Xbootclasspath/p:<path_to>Proxy1.jar</jvm-options>
<jvm-options>-Dhttp.proxyHost=<host></jvm-options>
...
<jvm-options>-Dhttp.proxyUserName=<user></jvm-options>
<jvm-options>-Dhttp.proxyPassword=<password></jvm-options>
...

Here is my little NetBeans 5.0 project and a pre-built jar file. I hope this helps some people. Please let me know if it works;-)

Have fun
-- Marco
( Jun 16 2006, 04:49:46 PM PDT ) Permalink

20060607 Wednesday June 07, 2006

Java Studio Creator Training in SF Bay Area - Soon in June

Maybe somebody is interested in a real instructor lead hands on training;-)

Check out the official Creator Training page;-)

I've seen Gail & Paul Anderson at the J1 labs and I was surprised on how much they could pack into an one hour lab session. Now think three days, that will be a lot of fun;-)

Have fun.
-- Marco ( Jun 07 2006, 01:21:23 PM PDT ) Permalink

20060531 Wednesday May 31, 2006

An Inconvenient Truth

If you have read a couple of my posts here, you might have realized that I'm not only interested in Java Studio Creator. Sometimes I also look out of my window;-)

So I was thinking if I should add a link to a film, which I find very important. So far I staid out of big product announcements etc. But in the end, I believe that's an important enough issue to bring it up here.

So if you want to watch a film, which might shock you quite a bit, try to find a theater which shows "An Inconvenient Truth". Here are some trailers




I tried to get this into our local Cinemax theater but the guy told me, that's a decision of the distributers. I don't know if that's true or not:-( So I'll probably have to find another theater which shows the film:-(

Have a good day;-)
-- Marco

Tags:
( May 31 2006, 11:10:25 AM PDT ) Permalink Comments [4]