4 Replies Latest reply on Nov 2, 2001 2:42 PM by Jiri Bel

    Free database and JBoss with correct national encoding

    Jiri Bel Newbie

      Hi

      I'm looking for FREE Database (and right JDBC driver) that can cooperate with JBoss in national encoding - especially Windows1250 or UTF-8.

      I tried Interbase, but I couldn't correctly configure Interclient properties in jboss.jcml.
      I also tried Interbase with Borland AppServer and here it goes fine.
      Does JBoss send connection properties to JDBC driver?
      I wrote about this problem here, but nobody answer.
      I think many other people have the same problem, so please, look at this.

      When I tried MySQL, I have had the same problem (JDBC driver ?).

      I tried also Oracle8.1.7&JBoss2.4.3_Tomcat3.2.3 and here goes everything correctly without any JDBC properties configuration.

      So please, if you can display national characters from any free database, please, public your configuration.
      I think, you will help many people.


      Thank you very much.

      CABA

      ps: If you have the same problem, please reply this message too. To know that I'm not alone. :)

        • 1. Re: Free database and JBoss with correct national encoding
          David Jencks Master

          How do you configure the encoding in Borland Appserver? Can you configure a standalone interclient connection with the desired character encoding, getting the connection from DriverManager?

          • 2. Re: Free database and JBoss with correct national encoding
            Jiri Bel Newbie

            Here is my AppServer configuration:

            ejb-inprise.xml

            <datasource-definitions>

            <jndi-name>foo/DS</jndi-name> jdbc:interbase://localhost/C:\database\FOO.GDB
            SYSDBA
            masterkey
            <driver-class-name>interbase.interclient.Driver</driver-class-name>
            <jdbc-property>
            <prop-name>charSet</prop-name>
            <prop-value>Cp1250</prop-value>
            </jdbc-property>


            </datasource-definitions>

            Standalone client:
            I use JDBC Pilot (integrated in JBuilder5)
            Here I have to use this settings:
            URL: jdbc:interbase://localhost/C:\database\FOO.GDB
            Driver: interbase.interclient.Driver
            Username:
            Use extended properties: YES
            Extended properties: user=sysdba,password=masterkey,charSet=Cp1250

            With this configuration everything goes fine.

            IBConsole:
            Here I during registering database set
            Default Character Set: WIN1250

            But IBConsole has one strange feature (or bug).
            If I create database in IBConsole with this default character set, I can't immediately modify the data.
            I have to unregister and register again the database.
            Then it goes correctly. :-)






            • 3. Re: Free database and JBoss with correct national encoding
              David Jencks Master

              Did you try including in the XADataSourceLoader config for interbase

              charSet=Cp1250;userName=SYSDBA;password=masterkey

              ?

              Remove the userName and Password properties too... of all the ridiculous configuration methods.....grrrr...

              I'm not sure if the userName and password are quite right for interclient, check the docs. This will (if the separate userName is missing) make the XADataSourceImpl use DriverManager.getConnection(url, properties) which should give you what you want.

              • 4. Re: Free database and JBoss with correct national encoding
                Jiri Bel Newbie

                Thank you very much, David.
                It's OK now.

                I wrote comma, not semicolon !!! =:-O
                It was my fault, because in JBuilder I have to separate properties by comma.

                So. The right configuration is here.


                foo/DS
                org.jboss.pool.jdbc.xa.wrapper.XADataSourceImpl
                charSet=Cp1250;user=SYSDBA;password=masterkey
                jdbc:interbase://localhost/C:\database\foo.GDB


                Thank you a lot one more time.

                Have a nice weekend.