Main | Next page »
Monday Jan 23, 2012

Character encoding de_DE on Linux Debian

On my debian server today I run into a problem with the encoding of XSL templates running on a GlassFish server. The problem was that German characters where not displayed correctly.

After a long time of searching, I figured out that the reason for that problem was not my MySQL database, nor my GlassFish installation. It was simply the missing German language support on my linux debian.

You can test the installed locales with the following command:

locale -a

In my case only 'en_US.utf8' was listed.

In debian you can simply add the german language support by changing the file /etc/locale.gen. Simply uncomment the lines:

de_DE ISO-8859-1
de_DE.UTF-8 UTF-8
de_DE@euro ISO-8859-15

and run the command:

locale-gen

After restarting my GlassFish server the xsl transformation works fine with german characters.

The command "locale -a" now displays the following locale:

C
de_DE
de_DE@euro
de_DE.iso88591
de_DE.iso885915@euro
de_DE.utf8
deutsch
en_US.utf8
german
POSIX

 



Thursday Jan 12, 2012

Eclipse and Gnome Shell

Today I stumbled into a problem with my eclipse IDE running in Ubuntu 11.04 with Gnome shell. When trying to run the BIRT plugin with external XML resources the popup dialog prompting for username/password did no longer appear and I got a http error message 401. I think similar problems can also appear with other plugins in eclipse or eclipse based applications.

To solve such a problem it is necessary to provide a customized startup script. To create such a script change into the folder were your eclipse is installed and create a new file named 'eclipse_gnome'

Next make it executable by running the command

chmod +x ~/eclipse_gnome

Now edit the file with the following lines of code

#!/bin/sh
export GDK_NATIVE_WINDOWS=true
./eclipse

With the GDK_NATIVE_WINDOWS variable eclipse changes the way to handle windows internal. And this will fix difernt problems working with eclipse in Gnome shell.

To start eclipse use the new script.

If you have installed eclipse through the ubuntu software-center then your eclipse executable is located in the folder /usr/lib/eclipse/eclipse. In that case you can change the content of your start script like this:

#!/bin/sh
export GDK_NATIVE_WINDOWS=true
/usr/lib/eclipse/eclipse

 

 

Saturday Nov 12, 2011

Gnome3 - Anpassen

Gnome3 - Titelleiste von Anwendungen im maximierten Zustand aublenden [Read More]

Wednesday Nov 09, 2011

Birt and Parameter Driven XML Data Source URL

This is a very usfull link how to parameter XML Data Source URIs in Eclipse Birt:

http://www.birt-exchange.org/org/devshare/designing-birt-reports/533-parameter-driven-xml-data-source-url/

The Trick is to add a 'beforeOpen' Script Event to the XML DataSource. The Script looks like this:

filelist = this.getExtensionProperty("FILELIST");
filelisturl = filelist.substring(0,filelist.indexOf("=")+1);
this.setExtensionProperty("FILELIST", filelisturl + params["TickerSymbol"]);

This means that if you define a Report Parameter named 'TickerSymbol' the value will be added to the XML Data Source URL after the '=' char.

You can also use Variables to replace a part of your XML Datasource URL. In this case the script event can look like this:

filelist = this.getExtensionProperty("FILELIST");
filelisturl = filelist.substring(0,filelist.indexOf("=")+1);
this.setExtensionProperty("FILELIST", filelisturl + vars["NewVar"]);

This means that the part after '=' will be replaced with the current value of the variable named 'NewVar'


 

Thursday Oct 06, 2011

MySQL and indicies

If you need multiple indecies in a MySQL table over more then one column it is necessary to create only one index for  each table containing all affected columns. If you add more then one index to a table MySQL uses only one of them during optimization. So be careful about your index schemas.

Monday Aug 15, 2011

Eclipse Indigo - Maven and SVN

With the latest release from Eclipse - Indigo - now Maven is well supported. So it is no longer an ordeal to install maven support and especially svn integration.

To add the Maven with SVN into Indigo it is sufficient to got to "help -> install new software"

There you can select the Indigo plugin repository 'Indigo - http://download.eclipse.org/releases/indigo'

Go to the section 'Collaboration' and select the features "m2e - Maven Integration for Eclispe".

 

Now you have maven support provided by the sonatype plugin "m2Eclipse"

If you need also Subversion support you should add the Subclipse Plugin. (this works in most cases better than the Subversive SVN Team Provider). To add sublicpse to Ecipse Indigo you need to add the following plugin site:

http://subclipse.tigris.org/update_1.6.x

From this update site you can choose all Sublicpse Plugins to bee installed.

Checking out a Maven Project from a SVN repository

To check out an existing Maven project from an subversion repository you need the additional scm connector. To get this connector installed simply create at first a new project from the 'New Project wizard' - (menue 'File -> new project')

Select the project type : "Maven -> Checkout Maven Projects from SCM":

 

Now you will see the dialog box to select your Target location:

 

The first time you can not choose a valid SCM URL type. You need first to install a SCM Connector for Maven and SVN. Click on the LInk 'm2e Marketplace'

You will see the m2e Marketplace where you can now select the "m2e-sublicpse" or the "m2e-subversive" connector (this depends on the subversion plugin you installed before - as noted here I recommend sublipse instead of subversion! - do not pay attention to the next screen shot!):

 

Note: If you are using a different SCM system you have to select the corresponding connector type

After the Installation finished you can select the SCM URL Type and enter your repository URL:

 

Alternatively you can also checkout a project from the SCM view with the option "checkout as maven project"


Friday Jul 01, 2011

Disabling Glassfish-specific (Non-portable) JNDI names

Today I run into a problem with my EJB 3.1 application after I tried to deploy more than one app with the same EJB module on the same glassfish domain. This results in a JNDI-Naming conflict telling you, that the EJB name is already bound. But since the new concept of JEE6 global portable jndi names this should not happen? 

Here is a discussion about the problem: http://home.java.net/node/702307

The solution is quite simple as Glassfish provides a new property to disable the generation of the glassfish-specific non-portable  jndi names (which were only provided because of backward compatibility. Simply add the param 'disable-nonportable-jndi-names' with the value 'true' directly into the EJB-Container additional-property section. This will avoid the create of thus names.

See also the following pages for more deails about this topic:

http://download.oracle.com/docs/cd/E18930_01/html/821-2417/gkhtw.html

http://download.oracle.com/docs/cd/E18930_01/html/821-2418/beanx.html#gkndi

http://download.oracle.com/docs/cd/E18930_01/html/821-2416/gglpq.html


Thursday Jun 23, 2011

Web Traffic Tool

Last night I finalized the first version of my new Web Statistik Tool. It includes now trend analyzer and custom time frames.
Read more about this project at: https://code.google.com/p/manik-web-stat/
Your Feedback is welcome.

Thursday Jun 16, 2011

New Web Traffice Analyzer

I started a new open source project providing a web statistic tool. The goal of the project is especially to analyze the web traffic of web applications like JEE WAR or EAR modules. But Manik-Web-Stat can be also used to analyse any kind of web traffic independent from the web servers technology and architecture.

You can read more about the project on: http://code.google.com/p/manik-web-stat/

Your feedback is welcome and you can join the project!

Sunday Jun 12, 2011

Glassfish 3.1 - AccessLog Format

In Glassfish 3.1 there is a uncommon default setting for the AccessLog Format. 

you will see the following default setting for the Access Loggin Format:

%client.name% %auth-user-name% %datetime% %request% %status% %response.length% 

If you like to see the much more commoon NCSA Log Format you can simply change the value into:

common 

or

combined

See also this Blog from Igor: http://blog.igorminar.com/2009/12/configuring-common-access-log-format-in.html

Tuesday May 31, 2011

Glassfish running in Headless mode

Today I tried to run a Glassfish 3.1 Server on a Linux SuSE box. But the server did not run properly. In the server.log a error message occurred during accessing a jsf application:

Could not initialize class sun.awt.X11GraphicsEnvironment 

This problem can be solved setting the glassfish server in a 'headless mode'. This can be done from the Glassfish administration console:

  • Login to Glassfish Admin console
  • Go to - Configurations - Server Config - JVM Settings - JVM Options TAB - Select Add JVM Option
  • Add "-Djava.awt.headless=true" in the text field.
  • Hit "Save" button.
  • Restart the server.

Now the error message is gone.

Thursday May 19, 2011

Installing Oracle SQL*Plus on Linux Ubuntu

Today I found a very usefull link how to install Oracle SQL*Plus in Ubuntu:

http://samushka.blogspot.com/2009/04/installing-oracle-sqlplus-in-ubuntu.html

Thanks to Sammy Veira

Friday May 13, 2011

When a software architecture is good architecture?

I think there is some evidence that indicates the quality of software architecture.
Most of all software has to be simple. To much code or to much configuration is always an indicator for unsolved problems. Often it happens, the architects behind such software argue that there software is flexible and highly configurable. Yes and of course there are tons of documentation. But in most situations you feel lost and unable to adopt the concepts behind such solutions. You can find this kind of software often in large companies and government agencies. It seems those companies are a fertile breeding ground for complex software. And I think at the end it is a poor situation which smothered any innovation.

So on the other hand an indicator for good software architecture is the fact that software is easy to use. You will find simple interfaces and you can easily understand what you have to do with those software. You will not need to configure standard behavior. And of course the software runs - even if you use it in your own project. Good software architecture may also provide a documentation. But it is much better if you only need a short readme.txt to understand the general concepts. It is not easy to archive this ideal world of software architecture. But you can see this kind of software in much open source projects. The reason for good software in the open source area is that those people want help others. One goal of open source software is to wrote software for other developers. Open source developers want the software being used by much people as possible. And they want to improve there software so they are searching for a dialog with other developers.

And so we are at the core of the problem. If you wrote software only to solve one specific problem and to avoid any dialog or user feedback you will not think about the question how other developers may use your software. In fact you protect your software from foreign usage.
But when you wrote software to solve your problem and maybe also the problem of one or more other developers you will try to make your software understandable. You try to keep it simple. And you try to find a way your software will help other developers to solve there problems. And this will lead you on the way of good software architecture.
 

Tuesday Apr 19, 2011

Eclipse Helios - Glassfish no Debugger

After I upgrated to Eclipse Helios it seems the debugging of glassfish (2.1) did not work with the current Oracle Glassfish Tool Plugin. When trying to debug a web application the debugger stops but eclipse is unable to show up the code line.
I found this solution:

http://stackoverflow.com/questions/4305881/how-do-i-debug-glassfish-3-using-eclipse-helios

For me this works when I am starting glassfish external using the debugg option (in Glassfish console: application server->vm settings) and than creating a Remote-Debug Configuration in eclipse.


Saturday Apr 09, 2011

Eclipse Helios - JSF Content Assist for xhtml files

After I upgrade my Eclipse IDE form Galileo (3.5) to Helios (3.6) I wondered that the Content Assist for xhtml files is not working. This was a problem with all early versions of eclipse (See my blog for Eclipse Galileo).

Read my tutorial how to configure Eclipse Helios to support the Content Assist for XHTML Files in JEE Web Modules. 


[Read More]