|
From: Ian S. <ian...@tr...> - 2007-12-28 00:47:38
Attachments:
iansmith.vcf
|
Oh, ok, I have a theory: This may be a locale problem and a bug in the parsing code. The immediate workaround would be to set your locale for java (or perhaps the whole machine if that can't be done--use the windows regional settings control panel) to be English (en) with the region being US. The problem is that the french locale (probably set to something like fr, FR_EURO) using "," as the separator for floating point numbers and parts of our code must depend on "." being the separator (which is the case with en, US). http://www.exampledepot.com/egs/java.util/SetDefLocale.html If you want to try to actually fix the problem (to great applause from Europe!) I'd look at the XMLElement.java file (in ogoglio-common/src/main/java/nanoxml) around line 1114. Float.parseFloat isn't interantionalized http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4449157 so I would figure that it could be changed to use DecimalFormat http://java.sun.com/j2se/1.4.2/docs/api/java/text/DecimalFormat.html Please advise if you get this to work! thanks ian smith |
|
From: Ian S. <ian...@tr...> - 2007-12-28 18:44:16
Attachments:
iansmith.vcf
|
Argh, I'll fix the tutorial and sample server.xml right now. That's my
fault.
However, you should make the value of simFilter = "false" for a
development machine. You can use any value for simFilterPort, but I use
"0". When simFilter is false, the simFilterPort will not be used.
FYI: The only time you need simFilter turned on is when you are running
a production machine and you don't want "outside" connections to it's
sim port. That's why those configuration options are in there at all.
I believe that tomcat is smart enough to "fix" pathnames like
conf/users.xml when on a windows machine.
thanks for tracking this down on windows!
ian
<Environment name="simFilter" value="false" type="java.lang.String"/>
<!-- simFilterPortDoesn't matter unless simFilter is true and
developers don't want that-->
<!-- but you want to keep in here so that tools that examine
this file can find it -->
<Environment name="simFilterPort" value="0"
type="java.lang.String"/>
Michel DENIS wrote:
>
> Ian: yeh your theory seems correct: as a first step I changed the
> Windows regional settings to English/US, rebooted and it works. Later
> I will attempt the clean way .. but first I'd like to see the whole
> thing working...
> After that I maven'ed again, had to correct the tomcat.home, maven'ed
> again and broke on a mismatch between server.xml (from tomcat) and
> context.xml (from ogoglio-server): simFilter and simFilterPort are in
> context.xml but not in server.xml (the Ogoglio Developer Tutorial does
> not ask for these 2 lines to be added) .. the run suggests to add
> these to server.xml but I don't know the "values" to enter inline:
>
> [INFO]
> ------------------------------------------------------------------------
>
> [INFO] Building Unnamed - com.ogoglio:ogoglio-server:war:0.0.1-SNAPSHOT
>
> [INFO] task-segment: [clean, install]
>
> [INFO]
> ------------------------------------------------------------------------
>
> [INFO] [clean:clean]
>
> [INFO] Deleting directory C:\tmp\trunk\ogoglio-server\target
>
> [INFO] [resources:resources]
>
> [INFO] Using default encoding to copy filtered resources.
>
> [INFO] [og:verifyEnvironment {execution: verifyXMLProperties}]
>
> [INFO] Verifying project context variables against server.xml config
> in tomcat.
>
> [ERROR] Bad tomcat config file server.xml. You seem to be missing:
>
> [ERROR] <Environment name="simFilterPort" value="someValue"
> type="java.lang.String"/>
>
> [ERROR] <Environment name="simFilter" value="someValue"
> type="java.lang.String"/>
>
> [INFO]
> ------------------------------------------------------------------------
>
> [ERROR] BUILD FAILURE
>
> [INFO]
> ------------------------------------------------------------------------
>
> [INFO] Failed to verify that server.xml and context.xml are in sync!
>
> [INFO]
> ------------------------------------------------------------------------
>
>
> Do you know which values (for "someValue"'s) I should enter ?
>
> BTW i just see that I did not modify the pathname for UserDatabase in
> server.xml: I left it to "conf/tomcat-users.xml" and did not get an
> error (yet) .. for Windows I suspect that here too I should change the
> / into a \ .. ?
>
>
> Thanks,
> -michel
>
> > Message du 28/12/07 01:47
> > De : "Ian Smith"
> > A : "Michel DENIS" , ogo...@li...
> > Copie à :
> > Objet : Re: Ogoglio-developers post from
> mic...@or... requires approval
> >
> > Oh, ok, I have a theory: This may be a locale problem and a bug
> in the
> > parsing code. The immediate workaround would be to set your
> locale for
> > java (or perhaps the whole machine if that can't be done--use the
> > windows regional settings control panel) to be English (en) with
> the
> > region being US. The problem is that the french locale (probably
> set to
> > something like fr, FR_EURO) using "," as the separator for floating
> > point numbers and parts of our code must depend on "." being the
> > separator (which is the case with en, US).
> >
> > http://www.exampledepot.com/egs/java.util/SetDefLocale.html
> >
> >
> > If you want to try to actually fix the problem (to great
> applause from
> > Europe!) I'd look at the XMLElement.java file (in
> > ogoglio-common/src/main/java/nanoxml) around line 1114.
> > Float.parseFloat isn't interantionalized
> >
> > http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4449157
> >
> > so I would figure that it could be changed to use DecimalFormat
> >
> > http://java.sun.com/j2se/1.4.2/docs/api/java/text/DecimalFormat.html
> >
> > Please advise if you get this to work!
> > thanks
> > ian smith
> >
> >
> > [ iansmith.vcf (0.3 Ko) ]
>
--
/////////////////////////////////////////
Ian Smith, CTO, Transmutable Networks LLC
Emai: ian...@tr...
Mobi: +1.415.867.6532
Blog: http://blog.iansmith.name
Phys: shores of puget sound
/////////////////////////////////////////
|