Marco Walther's Weblog

All | Creator | Environment | General | Java
« Previous page | Main | Next page »

20060210 Friday February 10, 2006

Today was JBoss day

                                     
        I played with Creator 2 applications on JBoss. So far I was partially successful. See the JBoss wiki for more information.

The good news is that it seems to work just fine as long as you don't have any other applications which want to use the bundled MyFaces libraries;-)


The not so good news is that the JBoss Portal seems to be an application which uses MyFaces. That means I don't currently know how to make that coexist with Creator applications:-(

Have fun,
-- Marco

( Feb 10 2006, 04:37:43 PM PST ) Permalink

20060209 Thursday February 09, 2006

Creator 2 Applications and Glassfish;-)

It simply works. I like that;-)

In Creator export your application as a *.war file for a J2EE 1.4 compliant container.

Download Glassfish (I used build 9.0-b32f) and get it up and running. Bring up the admin console and deploy your war file as every other war file. Point your browser at the URL and enjoy;-)

If you need some help to configure the resources for your application, there will be a tutorial (for Application Server 8.1 - but the steps are the same) on the Creator site soon. That's the beauty of blogs. I can quickly post something here, but the tutorials have to go through a lengthly review and publishing process.

Have fun,
-- Marco

( Feb 09 2006, 04:49:09 PM PST ) Permalink

Creator 2 @ Gentoo Linux ;-)

First the standard disclaimer:  That's not officially supported but it's just Java, right;-)

This came up on our Creator Forum. People tried to install Creator 2 on Gentoo Linux and that did not work so well.

I'm using  Linux since somewhen  in 1993 /1994. I used to copy stacks of floppies for the installations. So I thought, one more Linux distribution can't be too hard to install and get working. But I have to say, Gentoo is not exactly what I would recomment for starters:-( It takes a long time to configure and rebuild the world before you can do something useful, especially when you try to do that experiment on a scrap box (P3 500MHz/512MB). I think once you have your setup and you know your way around, it's probably not much harder (or better) than any other Linux distrubution out there. But getting to that point takes time.

My final system was a basic Gentoo system with KDE installed. It says:

marco@gentoo-mw ~ $ uname -a
Linux gentoo-mw 2.6.15-gentoo-r1 #2 PREEMPT Thu Feb 2 08:59:21 PST 2006 i686 Pentium III (Katmai) GenuineIntel GNU/Linux
marco@gentoo-mw ~ $ cat /etc/*release
Gentoo Base System version 1.6.13
Now I needed some extra preparations for the installation of Creator.  One thing, the installer of the bundled application server needs a specific libstdc++ to run. So I found the sys-libs/libstdc++-v3 package which should help with that. So I installed it (the symbolic link was to make sure, the installer would find the name it expected):

gentoo-mw ~ # emerge sys-libs/libstdc++-v3
gentoo-mw ~ # cd /usr/lib/libstdc++-v3/
gentoo-mw libstdc++-v3 # ln -s libstdc++.so.5 libstdc++-libc6.2-2.so.3

But that did not help yet:-( The ld.so.conf contained all the right directories and the ld.so.cache seemed to be updated but for whatever reason, the installer could still not find the library.  So I created another symbolic link:

gentoo-mw libstdc++-v3 # cd /usr/lib
gentoo-mw lib # ln -s libstdc++-v3/libstdc++-libc6.2-2.so.3 .

Now the installer was happy.

But the final application server would try to start and then fail. It turned out, my hostname gentoo-mw was not updated with the IP address from DHCP:-( So a ping localhost was fine but a ping gentoo-mw would not know how to resolve the name:-( The application server is trying to use both and failed.

So I used a trick I'd seen on my SuSE systems. They update the /etc/hosts file when the dhcp client gets an IP address. When there is no DHCP available (on a disconnected laptop for instance), they give the hostname an IP address 127.0.0.2. So I tried that on this Gentoo box and it seems to work just fine;-)

gentoo-mw ~ # fgrep gentoo-mw /etc/hosts
127.0.0.2       gentoo-mw

Now a ping gentoo-mw worked fine and the application server was ready to start.

I did a couple of installs and uninstalls until I found all the problems but for you, it should now just be a simple install (as the user who will use Creator!):

marco@gentoo-mw ~ $ ./creator-2-linux-en.bin

I hope this helps some people to use their favorite Linux distribution;-)

Have fun,
-- Marco
( Feb 09 2006, 10:24:50 AM PST ) Permalink

20060208 Wednesday February 08, 2006

Sun Java Studio Creator 2 and Java System Application Server 8.2

The good news: It simply works;-) Get the Application Server 8.2 and install it. Then add it as a Remote Server to Creator's Server Navigator.  Now you can deploy your applications to it ;-).

Maybe some people want to try that;-)

But I would not recomment replacing the `bundled' application server in Creator.  This would create a lot of problems because  we make heavy use of the bundled database engine for our examples etc. Application Server 8.2 switched to Apache Derby as bundled DB engine.

Have fun,
-- Marco


( Feb 08 2006, 01:51:11 PM PST ) Permalink

20060130 Monday January 30, 2006

Where am I from?

           
Google Map imageWhere did I come from? I played a bit with Google Maps. And I found a nice picture of the area where I grew up.  The map to the left shows the city where I was born and the village where I spend most of my earlier fun time;-)

It also shows all four places where I went to school before I went to the university.

People always ask me, where I'm from. But there are no really big cities in that area, or at least not too many famous ones which are also well known here in the US.

For Europeans: I was born in the city where the inventor of the "western china/porcelain" was born.  My Gymnasium/High School was in the city which has a famous glass and optics history among other things;-)

Have fun;-)
-- Marco
( Jan 30 2006, 09:42:56 PM PST ) Permalink

Creator Applications and setup directory:-(

Just a word of caution: Don't create a directory called "setup"  in the project  root.   That is a reserved directory name for NetBeans. Creator itself inherited that NB hehavior partially. So if you do create such a directory, you might end up with very strange errors when you try to build or deploy your project.

Have fun;-)
-- Marco

( Jan 30 2006, 12:23:00 PM PST ) Permalink

20060127 Friday January 27, 2006

I found Dru Devore's Blog

Maybe it's widely known. But I did just find it. Check it out at http://weblogs.java.net/blog/ddevore/.  There are good Creator related posts on it.

Thanks Dru;-)

-- Marco
( Jan 27 2006, 11:09:09 PM PST ) Permalink

Creator 2 Applications and Oracle OC4J - The conclusion
I finally found the problem. I believe the Oracle HTTP Server/OC4J combination sends a bad HTTP Content-Location Header:

marco@linux:~> wget -S http://sles.sonic.net:7777/oratest
--22:41:57-- http://sles.sonic.net:7777/oratest
=> `oratest'
Resolving sles.sonic.net... 192.168.1.107
Connecting to sles.sonic.net|192.168.1.107|:7777... connected.
HTTP request sent, awaiting response...
HTTP/1.1 301 Moved Permanently
Date: Sat, 28 Jan 2006 06:42:03 GMT
Server: Oracle-Application-Server-10g/10.1.2.0.2 Oracle-HTTP-Server
Cache-Control: private
Location: http://sles.sonic.net:7777/oratest/
Connection: close
Content-Type: application/octet-stream
Location: http://sles.sonic.net:7777/oratest/ [following]
--22:41:57-- http://sles.sonic.net:7777/oratest/
=> `index.html'
Connecting to sles.sonic.net|192.168.1.107|:7777... connected.
HTTP request sent, awaiting response...
HTTP/1.1 200 OK
Date: Sat, 28 Jan 2006 06:42:03 GMT
Server: Oracle-Application-Server-10g/10.1.2.0.2 Oracle-HTTP-Server
Content-Location: http://sles.sonic.net:12501/oratest/Page1.jsp
Set-Cookie: JSESSIONID=7f00000230d5675863965c6b4979a0ebc9ce3af82d9c.e34Ma3uPbhqMe34RbxaPbNaRc310n6jAmljGr5XDqQLvpAe; path=/oratest
Cache-Control: private
Content-Language: en-US
Connection: close
Content-Type: text/html; charset=ISO-8859-1
Length: unspecified [text/html]

[ <=> ] 2,016 --.--K/s

22:41:57 (73.95 MB/s) - `index.html' saved [2016]
See the last Content-Location above, that's the communication port between the HTTP server and  OC4J:-(

And KDE's Konqueror believed that Content-Location when it tried to request more pieces and finally for the POST on the button press:-(

Mozilla/FireFox/IE seem not to care too much about that error. They work.



That solves the last mystery with the OC4J;-)

Have fun,
-- Marco


Update Sat Jan 28 12:36:29 PST 2006:

 
See KDE bugs 51185 and 82747. Apparently Konqueror did the right thing but too many servers don't send the right information in that HTTP Header element.

So now I only have to wait for a released version of KDE 3.5.

Thanks,
-- Marco

( Jan 27 2006, 10:51:47 PM PST ) Permalink

Creator 2 Applications and Oracle OC4J - A Bit Closer

An update to my last posting - I found one problem;-)

Apparently OC4J does employ some kind of *.TLD caching by default and that does not work with our applications which bring their taglibs with them. The error message did not help much in this case:-(

The solution: Switch of the jsp-cache-tlds either globally or for the Creator applications. There are two ways to do that, the hard way and the not so hard way;-)

The not so hard way works only when you have the Oracle Enterprise Manager up and running:
The harder way;-)
Now you should be able to access the welcome page of your application;-)



But I found that I still have problems with the round trip setup:-(  When I hit the button, which should only set the value on a static text field on the same page. I end up here:




Somehow the communication between the HTTP server and OC4J does not yet seem to work as expected:-(  But I had cases where the same application sometimes worked. So it might just be some timing issue??

Hopefully to be continued.

Have a nice weekend
-- Marco
( Jan 27 2006, 09:15:24 PM PST ) Permalink

20060125 Wednesday January 25, 2006

Creator 2 and Oracles OC4J:-(

I wanted to try some simple Creator generated applications with Oracles Application Server (OC4J) 10g. But so far, it's a No-Go:-(

I exported the application as a J2EE 1.3 compliant war file and I could deploy it. So far, everything seemed to be happy.  But when I tried to view the start page, I end up with an internal server error:

500 Internal Server Error

OracleJSP: oracle.jsp.parse.JspParseException:
/Page1.jsp: Line # 2, <jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:ui="http://www.sun.com/web/ui">
Error: java.lang.IndexOutOfBoundsException


This looks like Creator and OC4J do have a very different understanding on the jsp file format:-( If somebody has a suggestion on how/what to fix to make this work, I would like to know.

Thanks & have fun,
-- Marco
( Jan 25 2006, 03:53:30 PM PST ) Permalink

We finally made it;-)

It took a long time but Sun Java Studio Creator 2 was released today;-) I hope you can enjoy it;-) See all the new and exciting features at Creators official web site and get it for free. (I have no idea why they choose me in the picture there)

I will now probably be busy answering all the deployment related questions.

Have fun;-)
-- Marco

( Jan 25 2006, 09:18:28 AM PST ) Permalink Comments [1]

20051209 Friday December 09, 2005

Creator (Java SE) and Asian Fonts

Maybe the following is common knowledge in the areas where that problem would be more serious. Sorry, I can't read or understand any of the Asian languages, so I wasn't able to find much on the subject.

I was trying to look at a localization problem in Creator on my SuSE Linux box. So I have an account on my box which runs in a Japanese locale. I tried to start Creator there and hey, why do I only see little empty squares instead of glyphs? I have a couple of Japanese fonts installed and KDE is mostly happy with the selection;-)

It turns out the jvm has it's own font configuration setup. When you know what to look for, java.sun.com has a nice description. So I looked at the source files and quickly realized that SuSE Linux is not really supported with Asian fonts:-(

The description above has a little note that changing/adding those fontconfig files is a modification of the JRE and that Sun does not support modified JRE's. So keep that in mind when you read and/or follow the reminder of this.  I live always outside of the officially supported setups, so for me that note was not a problem;-)

So I compared the fontconfig files for RedHat and SuSE and so I found what I needed to look for;-) I got and installed the following packages (Those packages might have similar names in other distros!)
Now came the fun part:-( The fonts had different font names from the ones in the RedHat fontconfig. So I looked at all the fonts and created a new fontconfig for my system. That works at least for my Japanese setup. Here is a link to my fontconfig.SuSE.properties. This file would go into JRE_HOME/lib/.

I'm happy now and can look at my initial problem;-)

Have fun and don't forget to reproduce your problems with the little squares before reporting;-)
-- Marco
( Dec 09 2005, 01:43:51 PM PST ) Permalink Comments [1]

20051129 Tuesday November 29, 2005

Creator on Ubuntu

Ok, that's only a quick link to David's writeup on how he got the application server for Creator to install on Ubuntu.  That's the only part of a Creator install, which might have special requirements.

Something very similar will probably be relevant to all Debian based Linux distributions.

I hope this helps some people.

Have fun.
-- Marco
( Nov 29 2005, 08:36:37 PM PST ) Permalink Comments [0]

20051124 Thursday November 24, 2005

Java Studio Creator and Resin

That question came up, so I tried it.  Creator applications work mostly with Resin 3.0.15.  I filed one problem for Resin (RSN-512).  But that is easily worked around with a little index.jsp file in the applications root diretory.  That index.jsp should just do the forward to the real JSF start page.

So you have two solutions:
  1. Use the Export War for a J2EE 1.3 compliant container. That will create the needed forwarding start page.
  2. Export the war file  for J2EE 1.4 and add the index.jsp yourself.
 The code for the index.jsp should look like:
<?xml version="1.0"?>
<jsp:root  version="1.2" xmlns:jsp="http://java.sun.com/JSP/Page">
  <jsp:forward page="faces/Page1.jsp"/>
</jsp:root>

Just change the Page1 above to your real start page;-)

Have fun;-)
-- Marco

( Nov 24 2005, 06:58:21 PM PST ) Permalink Comments [1]

My Adventure in Component Land

I found a post on the Creator forum asking how to integrate a embedded Windows Media Player into a Creator project.

So I thought, that would be a good time to try and write some custom components.

You could add some elements as static HTML but then the JSF framework would not know anything about it and you would not be able to to change the parameter programatically from the application. So that's not a good idea.

Edwin has kind of a tutorial on how to write a component library at his wiki page.  So I took some time and played with it.

That's a screen shot of the result;-)


I would not try to put both, an embedded Windows Media Player and a Real Player onto the same page;-) That might get a bit noisy.

Here is a link to my components. They are not fully tested and might not be complete, but I hope they can work as a starting point for somebody;-)  The download contains all the sources and a prebuild complib in the dist directory.  Just import that complib into a Creator 2 EA with the Component Library Manager and you should be ready to play with it.

I'm normally working more on the backend of Creator, so maybe on Monday our component guys will tell me what I did wrong;-)  But I think the results are not that bad for five hours play time;-) Especially given that I normally don't even work on Windows;-)

Have fun & a good turkey ;-)
-- Marco

( Nov 24 2005, 05:54:11 PM PST ) Permalink Comments [9]