RE: Build process fails on german system

2008-02-25 Thread Juergen.Schumacher
Everything looks fine now. Thanks (-:

Cheers,
Jürgen.

-Original Message-
From: Luciano Resende [mailto:[EMAIL PROTECTED] 
Sent: Monday, February 25, 2008 12:33 AM
To: tuscany-user@ws.apache.org
Subject: Re: Build process fails on german system

I have added the workaround under revision #630706.
Jürgen, let me know if you still have other issues.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Build process fails on german system

2008-02-24 Thread Luciano Resende
I have added the workaround under revision #630706.
Jürgen, let me know if you still have other issues.

On Sun, Feb 24, 2008 at 12:28 PM, Simon Nash <[EMAIL PROTECTED]> wrote:
> Luciano Resende wrote:
>  > In this particular sample scenario, what if we always set the system
>  > property in case of a SecurityException ? This would avoid issues in
>  > multiple/different languages.
>  >
>  It feels like a hack, as it could pick up the wrong exception condition.
>  Despite this, I think it's the best solution for this issue.  We should
>  never be comparing the text of the detail string.
>
>Simon
>
>
>
>  > On Wed, Feb 20, 2008 at 9:23 AM, Mike Edwards
>  > <[EMAIL PROTECTED]> wrote:
>  >> Hmm,  this looks like one of the those flaws in Java exceptions - there
>  >>  is no way of having something like a number to uniquely identify an
>  >>  exception beyond its class - using strings is a bad idea, for exactly
>  >>  this issue with language conversions.
>  >>
>  >>  This has led to the message string being used to identify sub-cases for
>  >>  exception types, with nasty consequences as found here.
>  >>
>  >>  I suppose the "pure" way of doing it would be for there to be a subclass
>  >>  of SecurityException that deals with the case of not being able to find
>  >>  a LoginConfiguration.  But I can understand that it quickly gets tedious
>  >>  to create ever more new exception classes. So people don't.
>  >>
>  >>
>  >>  Yours,  Mike.
>  >>
>  >>
>  >>  [EMAIL PROTECTED] wrote:
>  >>
>  >>
>  >>> Hi,
>  >>  >
>  >>  >> Could you please let me know what was the exception you had to modify 
> ?
>  >>  >
>  >>  > Of course. Here's the diff, the file is in
>  >>  > 
> java\sca\samples\calculator-implementation-policies\src\test\java\calculator\
>  >>  >
>  >>  > Index: CalculatorTestCase.java
>  >>  > ===
>  >>  > --- CalculatorTestCase.java   (revision 629059)
>  >>  > +++ CalculatorTestCase.java   (working copy)
>  >>  > @@ -38,7 +38,7 @@
>  >>  >  try {
>  >>  >  Configuration secConf = Configuration.getConfiguration();
>  >>  >  } catch ( java.lang.SecurityException e ) {
>  >>  > -if ( e.getMessage().equals("Unable to locate a login 
> configuration") ) {
>  >>  > +if ( e.getMessage().equals("Anmeldekonfiguration kann 
> nicht gefunden werden.") ) {
>  >>  >  System.setProperty("java.security.auth.login.config", 
> "target/classes/CalculatorJass.config");
>  >>  >  } else {
>  >>  >  throw e;
>  >>  >
>  >>  > Cheers,
>  >>  > Jürgen.
>  >>  >
>  >>  >
>  >>  > -
>  >>  > To unsubscribe, e-mail: [EMAIL PROTECTED]
>  >>  > For additional commands, e-mail: [EMAIL PROTECTED]
>  >>  >
>  >>  >
>  >>
>  >>  -
>  >>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  >>  For additional commands, e-mail: [EMAIL PROTECTED]
>  >>
>  >>
>  >
>  >
>  >
>
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
Luciano Resende
Apache Tuscany Committer
http://people.apache.org/~lresende
http://lresende.blogspot.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Build process fails on german system

2008-02-24 Thread Simon Nash

Luciano Resende wrote:

In this particular sample scenario, what if we always set the system
property in case of a SecurityException ? This would avoid issues in
multiple/different languages.


It feels like a hack, as it could pick up the wrong exception condition.
Despite this, I think it's the best solution for this issue.  We should
never be comparing the text of the detail string.

  Simon


On Wed, Feb 20, 2008 at 9:23 AM, Mike Edwards
<[EMAIL PROTECTED]> wrote:

Hmm,  this looks like one of the those flaws in Java exceptions - there
 is no way of having something like a number to uniquely identify an
 exception beyond its class - using strings is a bad idea, for exactly
 this issue with language conversions.

 This has led to the message string being used to identify sub-cases for
 exception types, with nasty consequences as found here.

 I suppose the "pure" way of doing it would be for there to be a subclass
 of SecurityException that deals with the case of not being able to find
 a LoginConfiguration.  But I can understand that it quickly gets tedious
 to create ever more new exception classes. So people don't.


 Yours,  Mike.


 [EMAIL PROTECTED] wrote:



Hi,

 >
 >> Could you please let me know what was the exception you had to modify ?
 >
 > Of course. Here's the diff, the file is in
 > java\sca\samples\calculator-implementation-policies\src\test\java\calculator\
 >
 > Index: CalculatorTestCase.java
 > ===
 > --- CalculatorTestCase.java   (revision 629059)
 > +++ CalculatorTestCase.java   (working copy)
 > @@ -38,7 +38,7 @@
 >  try {
 >  Configuration secConf = Configuration.getConfiguration();
 >  } catch ( java.lang.SecurityException e ) {
 > -if ( e.getMessage().equals("Unable to locate a login 
configuration") ) {
 > +if ( e.getMessage().equals("Anmeldekonfiguration kann nicht gefunden 
werden.") ) {
 >  System.setProperty("java.security.auth.login.config", 
"target/classes/CalculatorJass.config");
 >  } else {
 >  throw e;
 >
 > Cheers,
 > Jürgen.
 >
 >
 > -
 > To unsubscribe, e-mail: [EMAIL PROTECTED]
 > For additional commands, e-mail: [EMAIL PROTECTED]
 >
 >

 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]









-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Build process fails on german system

2008-02-22 Thread Luciano Resende
In this particular sample scenario, what if we always set the system
property in case of a SecurityException ? This would avoid issues in
multiple/different languages.

On Wed, Feb 20, 2008 at 9:23 AM, Mike Edwards
<[EMAIL PROTECTED]> wrote:
> Hmm,  this looks like one of the those flaws in Java exceptions - there
>  is no way of having something like a number to uniquely identify an
>  exception beyond its class - using strings is a bad idea, for exactly
>  this issue with language conversions.
>
>  This has led to the message string being used to identify sub-cases for
>  exception types, with nasty consequences as found here.
>
>  I suppose the "pure" way of doing it would be for there to be a subclass
>  of SecurityException that deals with the case of not being able to find
>  a LoginConfiguration.  But I can understand that it quickly gets tedious
>  to create ever more new exception classes. So people don't.
>
>
>  Yours,  Mike.
>
>
>  [EMAIL PROTECTED] wrote:
>
>
> > Hi,
>  >
>  >> Could you please let me know what was the exception you had to modify ?
>  >
>  > Of course. Here's the diff, the file is in
>  > 
> java\sca\samples\calculator-implementation-policies\src\test\java\calculator\
>  >
>  > Index: CalculatorTestCase.java
>  > ===
>  > --- CalculatorTestCase.java   (revision 629059)
>  > +++ CalculatorTestCase.java   (working copy)
>  > @@ -38,7 +38,7 @@
>  >  try {
>  >  Configuration secConf = Configuration.getConfiguration();
>  >  } catch ( java.lang.SecurityException e ) {
>  > -if ( e.getMessage().equals("Unable to locate a login 
> configuration") ) {
>  > +if ( e.getMessage().equals("Anmeldekonfiguration kann nicht 
> gefunden werden.") ) {
>  >  System.setProperty("java.security.auth.login.config", 
> "target/classes/CalculatorJass.config");
>  >  } else {
>  >  throw e;
>  >
>  > Cheers,
>  > Jürgen.
>  >
>  >
>  > -
>  > To unsubscribe, e-mail: [EMAIL PROTECTED]
>  > For additional commands, e-mail: [EMAIL PROTECTED]
>  >
>  >
>
>  -
>  To unsubscribe, e-mail: [EMAIL PROTECTED]
>  For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
Luciano Resende
Apache Tuscany Committer
http://people.apache.org/~lresende
http://lresende.blogspot.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Build process fails on german system

2008-02-20 Thread Mike Edwards
Hmm,  this looks like one of the those flaws in Java exceptions - there 
is no way of having something like a number to uniquely identify an 
exception beyond its class - using strings is a bad idea, for exactly 
this issue with language conversions.


This has led to the message string being used to identify sub-cases for 
exception types, with nasty consequences as found here.


I suppose the "pure" way of doing it would be for there to be a subclass 
of SecurityException that deals with the case of not being able to find 
a LoginConfiguration.  But I can understand that it quickly gets tedious 
to create ever more new exception classes. So people don't.



Yours,  Mike.

[EMAIL PROTECTED] wrote:

Hi,


Could you please let me know what was the exception you had to modify ?


Of course. Here's the diff, the file is in 
java\sca\samples\calculator-implementation-policies\src\test\java\calculator\


Index: CalculatorTestCase.java
===
--- CalculatorTestCase.java (revision 629059)
+++ CalculatorTestCase.java (working copy)
@@ -38,7 +38,7 @@
 try {
 Configuration secConf = Configuration.getConfiguration();
 } catch ( java.lang.SecurityException e ) {
-if ( e.getMessage().equals("Unable to locate a login 
configuration") ) {
+if ( e.getMessage().equals("Anmeldekonfiguration kann nicht gefunden 
werden.") ) {
 System.setProperty("java.security.auth.login.config", 
"target/classes/CalculatorJass.config");
 } else {
 throw e;

Cheers,
Jürgen.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



RE: Build process fails on german system

2008-02-20 Thread Juergen.Schumacher
Hi,

> Could you please let me know what was the exception you had to modify ?

Of course. Here's the diff, the file is in 
java\sca\samples\calculator-implementation-policies\src\test\java\calculator\

Index: CalculatorTestCase.java
===
--- CalculatorTestCase.java (revision 629059)
+++ CalculatorTestCase.java (working copy)
@@ -38,7 +38,7 @@
 try {
 Configuration secConf = Configuration.getConfiguration();
 } catch ( java.lang.SecurityException e ) {
-if ( e.getMessage().equals("Unable to locate a login 
configuration") ) {
+if ( e.getMessage().equals("Anmeldekonfiguration kann nicht 
gefunden werden.") ) {
 System.setProperty("java.security.auth.login.config", 
"target/classes/CalculatorJass.config");
 } else {
 throw e;

Cheers,
Jürgen.


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Build process fails on german system

2008-02-19 Thread Luciano Resende
Could you please let me know what was the exception you had to modify ?

On Feb 19, 2008 2:20 AM,  <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I cannot build Tuscany SCA from the source code in the repository
> on my system, because it fails when running the test in
> samples\calculator-implementation-policies: The test case checks
> for an exception message text which depends on the default locale
> of the operating system. The only way I could get this test to run
> was to change the test case to check for the german exception text
> instead. Each attempt to convince maven to run this test with
> -Duser.language=en failed (but I'm not really used to maven, anyway).
> Any idea how this can be achieved?
>
> Cheers,
> Jürgen Schumacher
> 
>
> empolis GmbH | Europaallee 10 | 67657 Kaiserslautern
> [EMAIL PROTECTED] | www.empolis.com
>
> Sitz Gütersloh | Amtsgericht Gütersloh HRB 3971
> Geschäftsführer: Bernhard Ribbrock, Dr. Stefan Wess
>
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
Luciano Resende
Apache Tuscany Committer
http://people.apache.org/~lresende
http://lresende.blogspot.com/

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Build process fails on german system

2008-02-19 Thread Juergen.Schumacher
Hello,

I cannot build Tuscany SCA from the source code in the repository 
on my system, because it fails when running the test in
samples\calculator-implementation-policies: The test case checks
for an exception message text which depends on the default locale
of the operating system. The only way I could get this test to run
was to change the test case to check for the german exception text
instead. Each attempt to convince maven to run this test with
-Duser.language=en failed (but I'm not really used to maven, anyway).
Any idea how this can be achieved?

Cheers,
Jürgen Schumacher


empolis GmbH | Europaallee 10 | 67657 Kaiserslautern
[EMAIL PROTECTED] | www.empolis.com

Sitz Gütersloh | Amtsgericht Gütersloh HRB 3971
Geschäftsführer: Bernhard Ribbrock, Dr. Stefan Wess



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]