You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Yves Vindevogel <yv...@implements.be> on 2004/03/31 10:48:41 UTC

java start

Hi,

Do I have to pass certain parameters to Java VM or JDBC to tell that 
the encoding must be Latin1 or Iso-8859-1
I have my <dburl>jdbc:postgresql://myserver/mydb?charSet=latin1
I also have the DFileEncoding=iso-8859-1 in my Java_options.

Yet, my database returns Ascii only.

Met vriendelijke groeten,
Bien à vous,
Kind regards,

Yves Vindevogel
Implements

Mail: yves.vindevogel@implements.be  - Mobile: +32 (478) 80 82 91

Kempische Steenweg 206 - 3500 Hasselt - Tel-Fax: +32 (11) 43 55 76
Markt 18c  -  9700 Oudenaarde  -  Tel: +32 (55) 30 55 76

Web: http://www.implements.be

First they ignore you.  Then they laugh at you.  Then they fight you.  
Then you win.
Mahatma Ghandi.

Re: java start

Posted by Yves Vindevogel <yv...@implements.be>.
I never did this ....

BTW: I do have the problem on Linux too.  But Alex is running an older 
JVM (I think) on Linux than on OSX

On 31 Mar 2004, at 13:36, Bertrand Delacretaz wrote:

> Le 31 mars 04, à 13:25, Alexander Schatten a écrit :
>
>> ...I have the same problem, and I think I tried everything that was 
>> suggested: the same app works with no problems on Linux, but not on 
>> OS X: and yesterday I tried DBVisualizer and connected using the same 
>> driver to the same database and there the äöü umlauts work, but not 
>> in Cocoon...
>
> The next step (if you didn't do it yet) would be to debug what's 
> happening at the Cocoon level, using for example the LogTransformer to 
> find out exactly where the encoding starts being wrong, and next look 
> at the java level, by debugging the Cocoon components (using a 
> debugger or log messages, or adding such messages where needed).
>
> -Bertrand
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>
>
Met vriendelijke groeten,
Bien à vous,
Kind regards,

Yves Vindevogel
Implements

Mail: yves.vindevogel@implements.be  - Mobile: +32 (478) 80 82 91

Kempische Steenweg 206 - 3500 Hasselt - Tel-Fax: +32 (11) 43 55 76
Markt 18c  -  9700 Oudenaarde  -  Tel: +32 (55) 30 55 76

Web: http://www.implements.be

First they ignore you.  Then they laugh at you.  Then they fight you.  
Then you win.
Mahatma Ghandi.

Re: java start

Posted by Bertrand Delacretaz <bd...@codeconsult.ch>.
Le 31 mars 04, à 13:25, Alexander Schatten a écrit :

> ...I have the same problem, and I think I tried everything that was 
> suggested: the same app works with no problems on Linux, but not on OS 
> X: and yesterday I tried DBVisualizer and connected using the same 
> driver to the same database and there the äöü umlauts work, but not in 
> Cocoon...

The next step (if you didn't do it yet) would be to debug what's 
happening at the Cocoon level, using for example the LogTransformer to 
find out exactly where the encoding starts being wrong, and next look 
at the java level, by debugging the Cocoon components (using a debugger 
or log messages, or adding such messages where needed).

-Bertrand


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: OS X JAVA_HOME Follow-up

Posted by Yves Vindevogel <yv...@implements.be>.
In Terminal, you can go to /etc.  You find a file profile there.
This file will globally change your settings, including the JAVA_HOME

On 01 Apr 2004, at 05:12, Marc Driftmeyer wrote:

> As most have discovered by now BASH has a .bashrc file.
>
> What OS X does not include, by default, is a .profile.
>
> -----------------------------------------------------------------------
> As in my case with Debian Linux:
>
> Here is my .bashrc
>
> # ~/.bashrc: executed by bash(1) for non-login shells.
>
> export PS1='<\u@\h:\w>'
> umask 022
>
> # You may uncomment the following lines if you want `ls' to be
> colorized:
> #export LS_OPTIONS='--color=auto'
> # eval `dircolors`
>  alias ls='ls $LS_OPTIONS'
>  alias ll='ls $LS_OPTIONS -l'
>  alias l='ls $LS_OPTIONS -lA'
> # enable color support of ls and also add handy aliases
> if [ "$TERM" != "dumb" ]; then
>         eval `dircolors -b`
>         alias ls='ls --color=auto'
>         alias dir='ls --color=auto --format=vertical'
>         alias vdir='ls --color=auto --format=long'
> fi
> #
> # Some more alias to avoid making mistakes:
>  alias rm='rm -i'
>  alias cp='cp -i'
>  alias mv='mv -i'
>
> #GNUStep initiation for Tools and Root Preferences
>  . /usr/lib/GNUstep/System/Makefiles/GNUstep.sh
>  /usr/lib/GNUstep/System/Tools/gdnc
> # /usr/lib/GNUstep/System/Tools/gpbs
>
> LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/lib/:/usr/lib:/usr/lib/kde3"
>
> Not a whole lot of JAVA_HOME stuff right?
>
> Here is my .profile that is referenced with BASH
>
> # ~/.profile: executed by Bourne-compatible login shells.
>
> if [ -f ~/.bashrc ]; then
>   . ~/.bashrc
> fi
>
>
> # QT 3.2.3 Compiled Classes and Frameworks
>
>
> #QTDIR=/usr/local/qt
> #MANPATH=$QTDIR/doc/man:$MANPATH
> #LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH
>
>
> # GNUStep Root Paths
> GNUSTEP_SYSTEM_ROOT=/usr/lib/GNUstep/System
> GNUSTEP_LOCAL_ROOT=/usr/local/lib/GNUstep/Local
> GNUSTEP_NETWORK_ROOT=/usr/local/lib/GNUstep/Network
>
>
> #PStill
> PSTILL_PATH=/usr/local/bin/pstill_dist
>
> #Forrest CVS Configuration Variables
>
> FORREST_HOME=/usr/local/SunJava/xml-forrest/build/dist/shbat/bin
>
> #System Path Concatenated Listing
>
> PATH=/usr/local/bin:/etc/alternatives:/usr/sbin:/usr/bin:/sbin:/bin:/ 
> usr/bin/X11
>
> #Java SDK 1.4.2 SDK Path Settings
> JAVA_HOME=/usr/local/SunJava/j2sdk1.4.2/
>
> #Apache Jakarta Tomcat Settings
> CATALINA_HOME=/usr/share/tomcat4/
> BASEDIR=/usr/share/tomcat4/
>
> #System Classpath Settings
> CLASSPATH=.:$JAVA_HOME/lib/:$JAVA_HOME/jre/lib:/lib:/usr/lib:/usr/ 
> local/pgsql/lib/:/usr/local/pgsql/include:/usr/lib/kde3
>
> #System Export Pathways
> #export QTDIR PATH MANPATH LD_LIBRARY_PATH JAVA_HOME CLASSPATH
> CATALINA_HOME BASEDIR
> export PATH JAVA_HOME FORREST_HOME PSTILL_PATH CLASSPATH CATALINA_HOME
> GNUSTEP_SYSTEM_ROOT GNUSTEP_LOCAL_ROOT GNUSTEP_NETWORK_ROOT BASEDIR
>
> mesg n
> -----------------------------------------------------------------------
> OS X Specific
>
> If you create a JAVA_HOME within your newly created .profile and
> include:
>
> # ~/.profile: executed by Bourne-compatible login shells.
>
> if [ -f ~/.bashrc ]; then
>   . ~/.bashrc
> fi
>
> #Java SDK 1.4.2 SDK Path Settings
> JAVA_HOME=/usr
>
> #System Path Concatenated Listing
>
> PATH=/usr/local/bin:/etc/alternatives:/usr/sbin:/usr/bin:/sbin:/bin:/ 
> usr/bin/X11
>
> export PATH JAVA_HOME
>
> I bet you'll have better luck with Cocoon.
>
> -Marc
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Small Business $15K Web Design Giveaway
> http://promotions.yahoo.com/design_giveaway/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>
Met vriendelijke groeten,
Bien à vous,
Kind regards,

Yves Vindevogel
Implements

Mail: yves.vindevogel@implements.be  - Mobile: +32 (478) 80 82 91

Kempische Steenweg 206 - 3500 Hasselt - Tel-Fax: +32 (11) 43 55 76
Markt 18c  -  9700 Oudenaarde  -  Tel: +32 (55) 30 55 76

Web: http://www.implements.be

First they ignore you.  Then they laugh at you.  Then they fight you.   
Then you win.
Mahatma Ghandi.

Re: OS X JAVA_HOME Follow-up

Posted by Bertrand Delacretaz <bd...@codeconsult.ch>.
Le 1 avr. 04, à 05:12, Marc Driftmeyer a écrit :

> As most have discovered by now BASH has a .bashrc file.
>
> What OS X does not include, by default, is a .profile.

.bash_login is supported on macosx

Also, you can put session-wide environment definitions in 
$HOME/.MacOSX/environment.plist, and they are valid for all programs, 
even those which are started from the macosx GUI.

-Bertrand

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: OS X JAVA_HOME Follow-up

Posted by Dirk-Willem van Gulik <di...@webweaving.org>.
On Apr 1, 2004, at 5:12 AM, Marc Driftmeyer wrote:

> As most have discovered by now BASH has a .bashrc file.

You _DO_ want to read:

	How do I set environment for all processes launched by a  specific  
user?
	http://developer.apple.com/qa/qa2001/qa1067.html
		... stuff about editing XML plists...

which comes as a surprise to us unix hackers. The concept behind  
env-variables is in

	http://developer.apple.com/documentation/MacOSX/Conceptual/ 
BPRuntimeConfig/Concepts/EnvironmentVars.html

which is the OSX way to do things - which is insanely helpful for  
non-terminal
sort of double clicking on a 'jar' and expecting it to be fine :-)

Also note that apple makes very effecitve use of the symlinks in  
(System|~|)/Library/Java/Home;

Dw


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


OS X JAVA_HOME Follow-up

Posted by Marc Driftmeyer <md...@yahoo.com>.
As most have discovered by now BASH has a .bashrc file.

What OS X does not include, by default, is a .profile.

-----------------------------------------------------------------------
As in my case with Debian Linux:

Here is my .bashrc

# ~/.bashrc: executed by bash(1) for non-login shells.

export PS1='<\u@\h:\w>'
umask 022

# You may uncomment the following lines if you want `ls' to be
colorized:
#export LS_OPTIONS='--color=auto'
# eval `dircolors`
 alias ls='ls $LS_OPTIONS'
 alias ll='ls $LS_OPTIONS -l'
 alias l='ls $LS_OPTIONS -lA'
# enable color support of ls and also add handy aliases
if [ "$TERM" != "dumb" ]; then
        eval `dircolors -b`
        alias ls='ls --color=auto'
        alias dir='ls --color=auto --format=vertical'
        alias vdir='ls --color=auto --format=long'
fi
#
# Some more alias to avoid making mistakes:
 alias rm='rm -i'
 alias cp='cp -i'
 alias mv='mv -i'

#GNUStep initiation for Tools and Root Preferences
 . /usr/lib/GNUstep/System/Makefiles/GNUstep.sh
 /usr/lib/GNUstep/System/Tools/gdnc
# /usr/lib/GNUstep/System/Tools/gpbs

LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/lib/:/usr/lib:/usr/lib/kde3"

Not a whole lot of JAVA_HOME stuff right?

Here is my .profile that is referenced with BASH

# ~/.profile: executed by Bourne-compatible login shells.

if [ -f ~/.bashrc ]; then
  . ~/.bashrc
fi


# QT 3.2.3 Compiled Classes and Frameworks


#QTDIR=/usr/local/qt
#MANPATH=$QTDIR/doc/man:$MANPATH
#LD_LIBRARY_PATH=$QTDIR/lib:$LD_LIBRARY_PATH


# GNUStep Root Paths
GNUSTEP_SYSTEM_ROOT=/usr/lib/GNUstep/System
GNUSTEP_LOCAL_ROOT=/usr/local/lib/GNUstep/Local
GNUSTEP_NETWORK_ROOT=/usr/local/lib/GNUstep/Network


#PStill
PSTILL_PATH=/usr/local/bin/pstill_dist

#Forrest CVS Configuration Variables

FORREST_HOME=/usr/local/SunJava/xml-forrest/build/dist/shbat/bin

#System Path Concatenated Listing

PATH=/usr/local/bin:/etc/alternatives:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11

#Java SDK 1.4.2 SDK Path Settings
JAVA_HOME=/usr/local/SunJava/j2sdk1.4.2/

#Apache Jakarta Tomcat Settings
CATALINA_HOME=/usr/share/tomcat4/
BASEDIR=/usr/share/tomcat4/

#System Classpath Settings
CLASSPATH=.:$JAVA_HOME/lib/:$JAVA_HOME/jre/lib:/lib:/usr/lib:/usr/local/pgsql/lib/:/usr/local/pgsql/include:/usr/lib/kde3

#System Export Pathways
#export QTDIR PATH MANPATH LD_LIBRARY_PATH JAVA_HOME CLASSPATH
CATALINA_HOME BASEDIR
export PATH JAVA_HOME FORREST_HOME PSTILL_PATH CLASSPATH CATALINA_HOME
GNUSTEP_SYSTEM_ROOT GNUSTEP_LOCAL_ROOT GNUSTEP_NETWORK_ROOT BASEDIR

mesg n
-----------------------------------------------------------------------
OS X Specific

If you create a JAVA_HOME within your newly created .profile and
include:

# ~/.profile: executed by Bourne-compatible login shells.

if [ -f ~/.bashrc ]; then
  . ~/.bashrc
fi

#Java SDK 1.4.2 SDK Path Settings
JAVA_HOME=/usr

#System Path Concatenated Listing

PATH=/usr/local/bin:/etc/alternatives:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11

export PATH JAVA_HOME

I bet you'll have better luck with Cocoon.

-Marc 

__________________________________
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: java start

Posted by Alexander Schatten <al...@gmx.at>.
Bertrand Delacretaz wrote:

> Le 31 mars 04, à 10:48, Yves Vindevogel a écrit :
>
>> Hi,
>>
>> Do I have to pass certain parameters to Java VM or JDBC to tell that 
>> the encoding must be Latin1 or Iso-8859-1
>> I have my <dburl>jdbc:postgresql://myserver/mydb?charSet=latin1
>
>
> Dunno about this one
>
>> I also have the DFileEncoding=iso-8859-1 in my Java_options.
>
>
> Should be  -Dfile.encoding=iso-8859-1
>
>> Yet, my database returns Ascii only.
>
>
> Did you try with plain JDBC, with a simple test program outside of 
> Cocoon? If it doesn't work in this case it will never work. Or maybe 
> try with a java-based query utility like SquirrelSQL
>

I have the same problem, and I think I tried everything that was 
suggested: the same app works with no problems on Linux, but not on OS 
X: and yesterday I tried DBVisualizer and connected using the same 
driver to the same database and there the äöü umlauts work, but not in 
Cocoon...

no idea anymore...


alex


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: java start

Posted by Yves Vindevogel <yv...@implements.be>.
Ooops, it was Dfile.encoding instead of Dfileencoding.  My mistake.  I 
didn't check the code, thought I knew it.

>>
>>> I also have the DFileEncoding=iso-8859-1 in my Java_options.
>>
>> Should be  -Dfile.encoding=iso-8859-1


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: java start

Posted by Yves Vindevogel <yv...@implements.be>.
Hi,

>
>> I also have the DFileEncoding=iso-8859-1 in my Java_options.
>
> Should be  -Dfile.encoding=iso-8859-1
>
Ok, will put that ... could already be one reason.

>> Yet, my database returns Ascii only.
>
> Did you try with plain JDBC, with a simple test program outside of 
> Cocoon? If it doesn't work in this case it will never work. Or maybe 
> try with a java-based query utility like SquirrelSQL
>

Mainly cocoon, but I'm trying with SQL4J (on OSX) and I get an error 
too.  But, I don't know whether I can set the ?charset there.
Currently looking into that ...


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: java start

Posted by Bertrand Delacretaz <bd...@codeconsult.ch>.
Le 31 mars 04, à 10:48, Yves Vindevogel a écrit :

> Hi,
>
> Do I have to pass certain parameters to Java VM or JDBC to tell that 
> the encoding must be Latin1 or Iso-8859-1
> I have my <dburl>jdbc:postgresql://myserver/mydb?charSet=latin1

Dunno about this one

> I also have the DFileEncoding=iso-8859-1 in my Java_options.

Should be  -Dfile.encoding=iso-8859-1

> Yet, my database returns Ascii only.

Did you try with plain JDBC, with a simple test program outside of 
Cocoon? If it doesn't work in this case it will never work. Or maybe 
try with a java-based query utility like SquirrelSQL

-Bertrand


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org